Trigonometry calculator

Solve any triangle from sides and angles (law of sines and cosines, ambiguous SSA case, right triangles), find sin, cos and tan, and convert degrees

loading Trigonometry calculator
About this tool

What is a trigonometry calculator?

A trigonometry calculator solves triangles and works with angles. You give it the parts of a triangle you know, and it finds every other side and angle, plus the area, the perimeter and the radii of the inscribed and circumscribed circles. It also draws the triangle to scale, so you can see whether the answer makes sense.

It covers the cases you meet in school and in surveying, carpentry and graphics: three sides (SSS), two sides and the angle between them (SAS), two angles and the side between them (ASA), two angles and a side that is not between them (AAS), two sides and an angle that is not between them (SSA), and the right triangle. The SSA case is special because it can have no triangle, one, or two. When two fit, the tool lists both and draws the second one dashed.

Two more modes round it out. One gives sine, cosine, tangent, cotangent, secant and cosecant of any angle, with its quadrant and reference angle, and also the inverse functions arcsin, arccos and arctan. The other converts angles between degrees, radians, gradians and turns, and between decimal degrees and degrees, minutes and seconds. Everything is computed in your browser with full floating point precision.

How to solve a triangle

  1. Pick "Solve a triangle" and choose what you know, for example "Three sides".
  2. Type the values. Sides use any unit as long as it is the same for all of them. Angles are in degrees.
  3. Read the sides, angles, area, perimeter and circle radii. The drawing updates as you type.
  4. For the ambiguous case, check the table: it shows both answers, and the first one fills the result lines.
  5. To get trigonometric functions, switch to the angle mode, type the angle and choose degrees, radians or gradians.
  6. To convert an angle, pick "Convert an angle", choose the unit you have and read the others, including degrees, minutes and seconds.

Examples

Three sides: 3, 4 and 5

The law of cosines gives A = 36.87°, B = 53.13° and C = 90°. The area is 6, the perimeter 12, the inscribed circle has radius 1 and the circumscribed one 2.5, which is half the hypotenuse.

Two sides and the angle between: 7, 10 and 60°

The third side is c = √(7² + 10² − 2 × 7 × 10 × cos 60°) = √79 = 8.8882. The other angles then come from the law of sines.

Two angles and a side: A = 40°, B = 60°, c = 5

C = 180° − 40° − 60° = 80°. By the law of sines, a = 5 × sin 40° / sin 80° = 3.2635 and b = 5 × sin 60° / sin 80° = 4.3969.

The ambiguous case: a = 3, b = 4, A = 40°

sin B = 4 × sin 40° / 3 = 0.857, so B can be 58.99° or 121.01°. Both fit, giving c = 4.6099 or c = 1.5185.

A right triangle: leg 10 and angle 30°

With leg a = 10 and A = 30°, the other leg is 10 / tan 30° = 17.3205 and the hypotenuse is 10 / sin 30° = 20.

Angle conversions

45° is π/4 radians and 50 gradians. 45.5083° is 45° 30′ 30″, since 0.5083 × 60 = 30.5 minutes. And arcsin(0.5) is 30°.

Common mistakes

  • Mixing radians and degrees. sin 30 is 0.5 only in degrees. In radians, 30 rad is a very different angle. Check the unit.
  • Putting the angle at the wrong side. In this tool side a is opposite angle A, b opposite B and c opposite C.
  • Forgetting the second SSA solution. When the angle is acute and the given side is shorter than the other but longer than b × sin A, two triangles exist.
  • Angles that add up to 180° or more. No triangle has them, and the tool says so.
  • Treating tan 90° as a number. It is undefined, and the tool shows that instead of a huge value.
  • Rounding too early. Keep all digits until the end, as the calculator does.

Frequently asked questions

What are the law of sines and the law of cosines?

The law of sines says a / sin A = b / sin B = c / sin C. The law of cosines says c² = a² + b² − 2ab cos C. Together they solve any triangle.

How many answers can SSA have?

None, one or two. The tool checks sin B and reports the number of triangles that really fit.

How do I find the area of a triangle?

Half the product of two sides and the sine of the angle between them. For other shapes, use the geometry calculator.

What is a gradian?

A right angle is 100 gradians, so a full turn is 400. It is used in some surveying and in some calculators.

How do I convert units like degrees to radians elsewhere?

Multiply degrees by π / 180. For other kinds of units use the unit converter.

Report a problem