Skip to main content
🔬 Advanced

Trigonometry Calculator – Sin, Cos, Tan & Inverse Functions

Calculate sine, cosine, tangent, and inverse trig functions. Solve right triangles and convert between degrees and radians. Free online trig calculator.

★★★★★ 4.8/5 · 📊 0 calculations · 🔒 Private & free

How Trigonometric Functions Are Calculated

Trigonometry is built on six fundamental functions that relate angles to the ratios of sides in a right triangle. For an angle θ in a right triangle with opposite side O, adjacent side A, and hypotenuse H, the three primary functions are:

Each primary function has a reciprocal: cosecant (csc θ = H/O), secant (sec θ = H/A), and cotangent (cot θ = A/O). The classic mnemonic SOH-CAH-TOA helps remember: Sine = Opposite/Hypotenuse, Cosine = Adjacent/Hypotenuse, Tangent = Opposite/Adjacent.

Beyond right triangles, trigonometric functions extend to all real numbers through the unit circle definition. A point on the unit circle at angle θ from the positive x-axis has coordinates (cos θ, sin θ). This generalization makes trig functions periodic: sine and cosine repeat every 2π radians (360°), while tangent repeats every π radians (180°).

Modern calculators evaluate trig functions using polynomial approximations derived from Taylor series. For example: sin(x) = x − x³/3! + x⁵/5! − x⁷/7! + … (where x is in radians). Computer processors use dedicated hardware (like the x87 FPU instruction set) to compute these expansions to full floating-point precision in nanoseconds. When you press "sin" on this calculator, JavaScript's Math.sin() function calls these hardware-accelerated routines.

The Six Trigonometric Functions Reference

Here is a complete reference of all six trig functions, their formulas, domains, ranges, and reciprocal relationships:

FunctionAbbreviationFormulaDomainRangeReciprocal
Sinesin θO/HAll real numbers[−1, 1]cosecant (csc)
Cosinecos θA/HAll real numbers[−1, 1]secant (sec)
Tangenttan θO/AAll except odd multiples of π/2(−∞, +∞)cotangent (cot)
Cosecantcsc θH/OAll except multiples of π(−∞,−1] ∪ [1,+∞)sine
Secantsec θH/AAll except odd multiples of π/2(−∞,−1] ∪ [1,+∞)cosine
Cotangentcot θA/OAll except multiples of π(−∞, +∞)tangent

The inverse trigonometric functions (arcsin, arccos, arctan) reverse the process — given a ratio, they return the angle. For instance, arcsin(0.5) = 30° because sin(30°) = 0.5. Inverse functions are essential in surveying, navigation, and physics when you know side lengths and need to find angles.

Trigonometric Values Reference Table

These common angle values appear frequently in mathematics, physics, and engineering. Memorizing them saves significant time on exams and in practical calculations:

DegreesRadianssincostancscseccot
0010undefined1undefined
30°π/61/2√3/2√3/322√3/3√3
45°π/4√2/2√2/21√2√21
60°π/3√3/21/2√32√3/32√3/3
90°π/210undefined1undefined0
120°2π/3√3/2−1/2−√32√3/3−2−√3/3
135°3π/4√2/2−√2/2−1√2−√2−1
150°5π/61/2−√3/2−√3/32−2√3/3−√3
180°π0−10undefined−1undefined
270°3π/2−10undefined−1undefined0
360°010undefined1undefined

Quick pattern to remember: For sine at 0°, 30°, 45°, 60°, 90°, the values follow the pattern √0/2, √1/2, √2/2, √3/2, √4/2 — which simplifies to 0, 1/2, √2/2, √3/2, 1. Cosine follows the same pattern in reverse order.

Degrees vs. Radians: Converting Between Angle Units

Angles can be measured in degrees or radians. Degrees divide a full rotation into 360 equal parts — a convention dating back to ancient Babylonian astronomy (their base-60 number system made 360 a natural choice). Radians measure the angle as the ratio of arc length to radius: a full circle equals 2π radians (approximately 6.2832 rad).

Conversion formulas:

Quick conversions: 1 radian ≈ 57.2958°. Common equivalences: 90° = π/2 rad, 180° = π rad, 360° = 2π rad. A useful shortcut: to convert degrees to radians, multiply by 0.01745; to convert radians to degrees, multiply by 57.296.

Radians are the natural unit in calculus and physics. The elegant derivative relationships — d/dx sin(x) = cos(x) and d/dx cos(x) = −sin(x) — only hold when x is in radians. In programming, Math.sin(), Math.cos(), and Math.tan() in JavaScript (and most other languages) expect radians. This calculator handles the conversion automatically based on your selected unit. For more angle conversions, try our Unit Circle Calculator.

Common Use Cases for Trigonometry

Trigonometric functions appear across virtually every field of science, engineering, and technology. Here are the most common real-world applications:

Step-by-Step Trigonometry Examples

Example 1: Finding a building's height

You stand 40 meters from a building and measure an elevation angle of 55° to the rooftop. What is the building's height?

  1. Identify: you know the adjacent side (40 m) and the angle (55°), and want the opposite side (height)
  2. Use tangent: tan(55°) = opposite / adjacent = height / 40
  3. Calculate: height = 40 × tan(55°) = 40 × 1.4281 = 57.12 meters

Example 2: Finding an angle from side lengths

A ladder leans against a wall. The ladder is 6 meters long and its base is 2 meters from the wall. What angle does it make with the ground?

  1. Identify: you know the hypotenuse (6 m) and adjacent side (2 m), and want the angle
  2. Use cosine: cos(θ) = adjacent / hypotenuse = 2 / 6 = 0.3333
  3. Apply inverse: θ = arccos(0.3333) = 70.53°
  4. Verify: The wall height = 6 × sin(70.53°) = 6 × 0.9428 = 5.66 m. Check: 2² + 5.66² = 4 + 32.04 = 36.04 ≈ 6² ✓

Example 3: Solving a complete right triangle

A right triangle has legs of 5 cm and 12 cm. Find all angles and the hypotenuse.

  1. Hypotenuse: c = √(5² + 12²) = √(25 + 144) = √169 = 13 cm (this is the classic 5-12-13 Pythagorean triple — see our Pythagorean Theorem Calculator)
  2. Angle A (opposite the 5 cm side): sin(A) = 5/13 = 0.3846, so A = arcsin(0.3846) = 22.62°
  3. Angle B (opposite the 12 cm side): B = 90° − 22.62° = 67.38°
  4. Verify: sin(67.38°) = 0.9231 ≈ 12/13 = 0.9231 ✓

Essential Trig Identities and Formulas

Trigonometric identities are equations that are true for all valid angle values. They are indispensable for simplifying expressions, solving equations, and proving mathematical results.

Pythagorean identities (derived from sin²θ + cos²θ = 1):

Double angle formulas:

Sum and difference formulas:

Half-angle formulas:

Law of Sines and Law of Cosines (for any triangle, not just right triangles):

These laws let you solve any triangle given sufficient information (ASA, SAS, SSS, or AAS). Use our Triangle Calculator to solve triangles using these laws automatically.

Tips and Common Mistakes

Avoid these frequent errors when working with trigonometric functions:

Trigonometry vs. Geometry: What's the Difference?

Trigonometry and geometry are closely related but serve different purposes. Understanding when to use each helps you solve problems more efficiently.

AspectGeometryTrigonometry
FocusShapes, areas, volumes, spatial relationshipsRelationships between angles and side lengths
Primary toolsTheorems (Pythagoras, congruence, similarity)Functions (sin, cos, tan) and identities
Triangle solvingNeeds special cases (right angle, similar triangles)Can solve ANY triangle with sufficient data
Applications beyond trianglesCircles, polygons, 3D solidsWaves, oscillations, periodic phenomena
ComputationOften exact (integer or root values)Often requires calculator/approximation
Prerequisite forTrigonometry, calculusCalculus, physics, engineering

In practice, trigonometry extends geometry's reach. Where geometry can tell you the area of a triangle given base and height, trigonometry can find that height from an angle measurement — making it indispensable for surveying, navigation, and any scenario where direct measurement is impractical. Our Slope Calculator uses trig concepts to calculate gradients and angles from coordinate data.

💡 Did you know?

Frequently Asked Questions

What is the difference between sin, cos, and tan?

In a right triangle: sine is the ratio of the opposite side to the hypotenuse (O/H); cosine is the ratio of the adjacent side to the hypotenuse (A/H); tangent is the ratio of the opposite side to the adjacent side (O/A). Remember the mnemonic SOH-CAH-TOA. Sine and cosine always produce values between −1 and 1, while tangent can be any real number (and is undefined at 90° and 270°).

How do I use inverse trig functions (arcsin, arccos, arctan)?

Inverse trigonometric functions find the angle given a ratio. If sin(θ) = 0.5, then θ = arcsin(0.5) = 30°. Use arcsin when you know opposite/hypotenuse; arccos for adjacent/hypotenuse; arctan for opposite/adjacent. On calculators, these are labeled sin⁻¹, cos⁻¹, tan⁻¹. Important: arcsin returns angles in [−90°, 90°], arccos in [0°, 180°], and arctan in (−90°, 90°). There may be additional valid solutions outside these ranges.

Why does tan(90°) not exist?

Tangent equals sin/cos. At 90°, cos(90°) = 0, making the division undefined. Geometrically, as the angle approaches 90° in a right triangle, the opposite side grows infinitely long relative to the adjacent side. On a graph, tangent approaches ±infinity near 90° — this creates a vertical asymptote. The same happens at 270°, 450°, and every odd multiple of 90°.

What are trig functions used for in real life?

Trigonometry is used in navigation (GPS triangulation, aviation, sailing), construction (roof pitch, ramp angles, structural engineering), physics (wave motion, AC circuits, optics), computer graphics (3D rendering, rotation, game engines), astronomy (parallax distance measurement, orbital mechanics), music (sound synthesis, audio processing), and medical imaging (CT scans use sinograms based on the Radon transform).

How do I convert between degrees and radians?

Multiply degrees by π/180 to get radians: 45° × π/180 = π/4 ≈ 0.7854 rad. Multiply radians by 180/π to get degrees: π/3 × 180/π = 60°. Quick mental math: 1 radian ≈ 57.3°. Most programming languages and scientific calculators use radians by default, so always verify your angle mode before calculating.

What is the unit circle and why is it important?

The unit circle is a circle with radius 1 centered at the origin. Any point on this circle at angle θ has coordinates (cos θ, sin θ). The unit circle extends trigonometric functions beyond right triangles to all angles — including negative angles and angles greater than 360°. It reveals the periodic nature of trig functions, their symmetries, and sign patterns across quadrants. Check our Unit Circle Calculator for interactive exploration.

What is the Law of Sines?

The Law of Sines states that in any triangle, the ratio of a side length to the sine of its opposite angle is constant: a/sin(A) = b/sin(B) = c/sin(C). This allows you to solve triangles when you know two angles and one side (AAS or ASA) or two sides and an angle opposite one of them (SSA — the ambiguous case). It complements the Law of Cosines, which is used for SAS and SSS cases.

Why do I get different answers from my calculator?

The most common reason is angle mode mismatch — your calculator is in radian mode when you entered degrees, or vice versa. Check the mode indicator (DEG/RAD) on your display. Other causes: different rounding settings, using approximate values for π, or the calculator returning a different branch of the inverse function (e.g., arcsin might give 30° when you expected 150°).

What are Pythagorean triples?

Pythagorean triples are sets of three positive integers (a, b, c) where a² + b² = c². The most famous is (3, 4, 5). Others include (5, 12, 13), (8, 15, 17), (7, 24, 25), and (20, 21, 29). Any multiple of a triple is also a triple — so (6, 8, 10) works too. These are useful in construction for verifying right angles: measure 3-4-5 along two walls to check they're square. Explore these with our Pythagorean Theorem Calculator.

How is trigonometry used in computer graphics?

Computer graphics use trig extensively. Rotation matrices use sin and cos to rotate objects in 2D and 3D space. Lighting calculations use the dot product (which involves cosine) to determine how much light hits a surface. Texture mapping, camera projection, and skeletal animation all rely on trigonometric calculations. Modern GPUs perform billions of trig operations per second to render real-time 3D graphics.

}, {"@type": “Question”, “name”: “How do I use inverse trig functions (arcsin, arccos, arctan)?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “Inverse functions find the angle given a ratio. If sin(\u03b8) = 0.5, then arcsin(0.5) = 30\u00b0. Use sin\u207b\u00b9, cos\u207b\u00b9, tan\u207b\u00b9 on your calculator. Note the restricted ranges: arcsin returns [-90\u00b0, 90\u00b0], arccos [0\u00b0, 180\u00b0].”}}, {"@type": “Question”, “name”: “Why does tan(90\u00b0) not exist?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “Tangent = sin/cos. At 90\u00b0, cos(90\u00b0) = 0, making division undefined. The tangent approaches \u00b1infinity near 90\u00b0, creating a vertical asymptote.”}}, {"@type": “Question”, “name”: “What are trig functions used for in real life?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “Navigation (GPS), construction (roof pitch, ramp angles), physics (waves, AC circuits), computer graphics (3D rendering), astronomy (parallax), music (sound synthesis), and medical imaging.”}}, {"@type": “Question”, “name”: “How do I convert between degrees and radians?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “Multiply degrees by \u03c0/180 to get radians. Multiply radians by 180/\u03c0 to get degrees. Quick reference: 1 radian \u2248 57.3\u00b0.”}}, {"@type": “Question”, “name”: “What is the unit circle and why is it important?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “The unit circle is a circle with radius 1 centered at the origin. Any point at angle \u03b8 has coordinates (cos \u03b8, sin \u03b8). It extends trig functions beyond right triangles to all angles.”}}, {"@type": “Question”, “name”: “What is the Law of Sines?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “a/sin(A) = b/sin(B) = c/sin(C). It lets you solve triangles when you know two angles and one side, or two sides and an opposite angle.”}}, {"@type": “Question”, “name”: “Why do I get different answers from my calculator?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “Usually angle mode mismatch - your calculator is in radian mode when you entered degrees, or vice versa. Check the DEG/RAD indicator.”}}, {"@type": “Question”, “name”: “What are Pythagorean triples?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “Sets of three integers (a, b, c) where a\u00b2 + b\u00b2 = c\u00b2. Famous examples: (3,4,5), (5,12,13), (8,15,17). Used in construction to verify right angles.”}}, {"@type": “Question”, “name”: “How is trigonometry used in computer graphics?”, “acceptedAnswer”: {"@type": “Answer”, “text”: “Rotation matrices use sin/cos for 2D/3D rotations. Lighting uses cosine for surface brightness. Texture mapping, camera projection, and animation all rely on trig. GPUs perform billions of trig ops per second.”}}]}