Skip to content
DailyCalc

Trigonometry Calculator

All six trigonometric ratios for an angle, the inverse functions, and a full right-triangle solver.

Last updated

Your details

Result

sin
0.50000000
cos
0.86602540
tan
0.57735027
csc (1 ÷ sin)
2.00000000
sec (1 ÷ cos)
1.15470054
cot (1 ÷ tan)
1.73205081
In radians
0.52359878

The ratios at 30°…

sin θ = opposite ÷ hypotenuse, cos θ = adjacent ÷ hypotenuse

θ = 30° = 0.523599 rad

sin θ = 0.5, cos θ = 0.866025

tan θ = sin θ ÷ cos θ = 0.57735027

sin 30° = 0.50000000

Formula — written step by step

The ratios at 30°…

sin θ = opposite ÷ hypotenuse, cos θ = adjacent ÷ hypotenuse

θ = 30° = 0.523599 rad

sin 30° = 0.5 exactly

cos 30° = √3 ÷ 2 = 0.866025

tan 30° = sin ÷ cos = 0.577350

sin 30° = 0.5

θ is the angle, measured from the adjacent side. The three primary ratios compare pairs of sides in a right triangle; the reciprocal ratios — cosecant, secant and cotangent — simply invert them.

A worked example

The height of a building from its shadow

Shadow length
42 m
Angle of elevation
38°
  1. The height is opposite the angle, the shadow adjacent
  2. tan 38° = height ÷ 42
  3. tan 38° = 0.781286
  4. height = 0.781286 × 42

Height = 32.81 m

Tangent is the right choice because it relates the two sides you have — opposite and adjacent — without needing the hypotenuse, which nobody can measure here. Choosing the ratio that uses only known sides is most of the skill in applied trigonometry.

How to use this calculator

  1. Choose what you are solving: the ratios of a known angle, the angle behind a known ratio, or a complete right triangle.
  2. Set the angle unit first. Degrees are the usual choice; radians are standard in calculus and gradians are rare outside surveying.
  3. For the triangle solver, enter any two of the five measurements — two sides, or a side and an acute angle. Two knowns fix a right triangle completely.
  4. Where a ratio has no value, such as tan at 90°, the calculator says so rather than showing the very large number floating-point arithmetic would otherwise produce.

The six ratios

Trigonometry begins with a simple observation: in a right triangle, the ratios between the sides depend only on the angles, not on the size of the triangle. Double every side and sine, cosine and tangent are unchanged. That is what makes the ratios useful — they let you find a distance you cannot measure from an angle you can.

Sine is opposite over hypotenuse, cosine adjacent over hypotenuse, and tangent opposite over adjacent. The other three are their reciprocals: cosecant inverts sine, secant inverts cosine, and cotangent inverts tangent. They add no new information but often make an equation tidier.

Degrees, radians and gradians

A full turn is 360 degrees, 2π radians or 400 gradians. Degrees are conventional in everyday work and navigation; radians are the natural unit in calculus, because the derivative of sine is cosine only when the angle is measured in radians; gradians survive mainly in some surveying traditions.

Mixing units is the most common error in trigonometry, and it fails quietly. Every programming language’s trigonometric functions take radians, so calling sin(30) in code gives −0.988 rather than 0.5 — a plausible-looking number that is completely wrong. This calculator asks for the unit explicitly rather than assuming.

Why tangent is undefined at 90°

Tangent is sine divided by cosine. At 90 degrees the cosine is exactly zero, so the division has no value — not infinity, simply undefined. As the angle approaches 90° from below, tangent grows without limit; approached from above it falls without limit, so no single value can be assigned.

Computers hide this badly. Because π/2 cannot be represented exactly in binary, Math.tan(Math.PI/2) returns roughly 1.633 × 10¹⁶ — an enormous but finite number that looks like an answer. This calculator detects the case and reports "Undefined", which is the truthful result.

Solving a right triangle

A right triangle has five unknowns beyond the right angle itself: three sides and two acute angles. Any two of them, provided at least one is a side, determine all the rest. Two angles alone fix only the shape, not the size, since every similar triangle shares them.

With two sides, Pythagoras gives the third and the arctangent gives the angles. With one side and one acute angle, the appropriate ratio gives the others directly. The solver here accepts any valid combination and rejects impossible ones — a leg longer than the hypotenuse, or an acute angle of 90 degrees or more.

Exact values worth knowing

θsincostan
0°010
30°1/2√3/21/√3
45°√2/2√2/21
60°√3/21/2√3
90°10Undefined

These come from two triangles: half an equilateral triangle gives the 30° and 60° values, and half a square gives 45°. Tangent has no value at 90°, because cosine is zero there and nothing can be divided by zero.

Frequently asked questions

What does SOH-CAH-TOA mean?

It is a mnemonic for the three primary ratios: Sine is Opposite over Hypotenuse, Cosine is Adjacent over Hypotenuse, Tangent is Opposite over Adjacent.

Why does my calculator give the wrong answer for sin 30?

It is almost certainly set to radians. sin(30 radians) is about −0.988, while sin(30°) is exactly 0.5. Check the angle unit before checking anything else.

What is the difference between sin⁻¹ and 1/sin?

They are completely different. sin⁻¹ is the inverse function, arcsine, which returns an angle from a ratio. 1/sin is the reciprocal, cosecant. The notation is unfortunate but standard.

Why does arcsin refuse values above 1?

Because sine never exceeds 1 for any real angle — the opposite side can never be longer than the hypotenuse. No angle has a sine of 1.5, so there is nothing for arcsine to return.

Do these ratios work for non-right triangles?

Not directly. For triangles without a right angle you need the law of sines or the law of cosines, which generalise these relationships.