CalcNest

Triangle Calculator

Enter any three sides or angles (at least one side) and get the rest of the triangle — angles, sides, area, perimeter, heights and type.

Angle A is opposite side a, B opposite b, C opposite c. Fill in exactly three boxes.

Result

—

  • Perimeter
  • Heights to a, b, c
  • Inradius · circumradius

Solving a triangle

Three independent measurements fix a triangle. Surveyors, roofers, navigators and anyone laying out a right angle with a tape measure use these relations daily: the 3-4-5 rule for a square corner, roof pitch from rise and run, or the distance across a river from one baseline and two sighted angles.

The formulas

Angles: A + B + C = 180° Law of sines: a / sin A = b / sin B = c / sin C = 2R Law of cosines: c² = a² + b² − 2ab·cos C Area: ½·ab·sin C = √(s(s−a)(s−b)(s−c)), s = (a+b+c)/2 Height to a: hₐ = 2·Area / a Inradius r = Area / s

Worked example

SAS: b = 5, c = 7, A = 49°. a² = 5² + 7² − 2·5·7·cos 49° = 74 − 45.924 = 28.076, so a ≈ 5.299.

Then cos B = (a² + c² − b²) / (2ac) gives B ≈ 45.4°, and C = 180° − 49° − 45.4° ≈ 85.6°. Area = ½·5·7·sin 49° ≈ 13.21.

SSA: A = 30°, a = 6, b = 10: sin B = 10·sin 30° / 6 = 0.8333, so B ≈ 56.44° or 123.56° — two valid triangles.

Notes

  • Angles are in degrees. Sides can be in any unit; area is in that unit squared.
  • Results are rounded to 4 decimals for display; calculations use full precision.

Sources: OpenStax, Algebra and Trigonometry 2e, §10.1 Non-right Triangles: Law of Sines and §10.2 Law of Cosines.

Frequently asked questions

Which three values do I need?

Any three of the six, as long as at least one is a side: three sides (SSS), two sides and the angle between them (SAS), two angles and a side (ASA or AAS), or two sides and an angle not between them (SSA). Three angles alone fix the shape but not the size.

Why does SSA sometimes give two triangles?

With two sides and an angle opposite one of them, the other side can swing to two positions — this is the "ambiguous case". If the side opposite the known angle is shorter than the other known side but long enough to reach, both an acute and an obtuse triangle fit. The calculator shows both.

How do I find the area of a triangle from three sides?

Use Heron's formula: with s = (a + b + c) / 2, area = √(s(s − a)(s − b)(s − c)). For sides 3, 4, 5: s = 6, area = √(6 × 3 × 2 × 1) = 6.

How do I solve a right triangle?

Enter 90 for the angle C and any two other values. With legs a and b, the hypotenuse is c = √(a² + b²) (Pythagoras); with one leg and an angle, use sine, cosine or tangent — the calculator does this through the general laws of sines and cosines, which include the right-angle case.