Trigonometry calculator
Calculate the sine, cosine and tangent of an angle and convert degrees to radians.
In radians: 0.523599 rad
Calculations are based on Estonia's tax rates in force for 2026. Results are informational.
Last updated: 2026-06-03
Trigonometric functions
Sine, cosine and tangent describe the relationship between an angle and the sides of a right triangle. The tangent is undefined when the cosine is zero (90°, 270°). Radians = degrees × π / 180.
How it is calculated
Formula
angle in radians = degrees × π ÷ 180. sin, cos, tan are computed from this angle; tan is undefined when cos = 0 (90° + 180°·k).
Example
30° → sin 0.5; cos ≈ 0.866; tan ≈ 0.577.
Degrees or radians: the most common trap
If your calculator or phone is in radian mode and you type sin 30, you get about -0.988 instead of 0.5. The device reads 30 as 30 radians, which is almost 1719 degrees. When an answer looks odd, check the DEG or RAD indicator on the screen first.
The same applies to spreadsheets and code. In Excel and Google Sheets the SIN function expects radians, so write =SIN(RADIANS(30)). JavaScript's Math.sin works in radians too. This calculator always takes the angle in degrees and shows the radians separately, so there is no confusion.
SOH-CAH-TOA: which function to use
In a right triangle the sides are always named relative to the angle you are looking at: the opposite side faces the angle, the adjacent side touches it, and the hypotenuse faces the right angle. The mnemonic SOH-CAH-TOA captures the three ratios.
- sin α = opposite ÷ hypotenuse (S-O-H)
- cos α = adjacent ÷ hypotenuse (C-A-H)
- tan α = opposite ÷ adjacent (T-O-A)
Special angles table
These values are worth memorising, since tests often ask for them without a calculator. The exact values come from half an equilateral triangle (30° and 60°) and the diagonal of a square (45°).
- 0°: sin 0, cos 1, tan 0
- 30°: sin 1/2 = 0.5, cos √3/2 ≈ 0.866, tan √3/3 ≈ 0.577
- 45°: sin and cos √2/2 ≈ 0.707, tan 1
- 60°: sin √3/2 ≈ 0.866, cos 1/2 = 0.5, tan √3 ≈ 1.732
- 90°: sin 1, cos 0, tan undefined
Roof pitch, ladders and ramps
A 30° roof over half a house width of 4 m. The ridge sits 4 × tan 30° ≈ 4 × 0.577 ≈ 2.31 m above the walls and the rafter is 4 ÷ cos 30° ≈ 4 ÷ 0.866 ≈ 4.62 m long. Slope as a percentage is tan × 100: 30° is ≈ 57.7% and 45° is exactly 100%.
Going the other way you need an inverse function. If the ridge is 2.5 m high over a 4 m half-width, tan α = 2.5 ÷ 4 = 0.625 and α = arctan 0.625 ≈ 32.0°. A ramp with a 6% slope has an angle of arctan 0.06 ≈ 3.43°. This calculator only goes from angle to function; for the inverse use the tan⁻¹ key on a scientific calculator.
A 5 m ladder at 75°: its foot is 5 × cos 75° ≈ 5 × 0.2588 ≈ 1.29 m from the wall and its top is 5 × sin 75° ≈ 5 × 0.9659 ≈ 4.83 m high.
The sine and cosine rules for any triangle
When the triangle has no right angle, two rules help. The sine rule: a ÷ sin A = b ÷ sin B = c ÷ sin C. Example: A = 40°, B = 60°, a = 10. The third angle is C = 180 - 40 - 60 = 80°. Then b = 10 × sin 60° ÷ sin 40° ≈ 10 × 0.866 ÷ 0.643 ≈ 13.47 and c = 10 × sin 80° ÷ sin 40° ≈ 15.32.
The cosine rule fits when you know two sides and the angle between them: c² = a² + b² - 2ab × cos C. Example: a = 7, b = 9, C = 60°. c² = 49 + 81 - 2 × 7 × 9 × 0.5 = 130 - 63 = 67, so c ≈ 8.19. With C = 90°, cos C = 0 and the formula turns into Pythagoras.
Angles above 90° and negative angles
On the unit circle sin is the point's y-coordinate and cos its x-coordinate, so values can be negative. sin 150° = 0.5, the same as for 30°, but cos 150° ≈ -0.866. For a negative angle sin(-30°) = -0.5 while cos(-30°) stays 0.866. A full turn changes nothing: 390° gives the same values as 30°.
As the angle approaches 90°, the tangent grows very fast: tan 89.9° ≈ 572.96. At exactly 90° the cosine is zero and the tangent is undefined. Floating-point arithmetic would not give exactly zero for cos 90°, which is why the calculator rounds results to six decimals.
Frequently asked questions
How do I convert degrees to radians?+
Multiply the degrees by π ÷ 180. For example, 180° = π radians.
Why is the tangent sometimes undefined?+
The tangent is undefined when the cosine is zero, i.e. at angles 90° + 180°·k.