Skip to content
Advanced Calculator logo

Triangle Calculator

Enter any three sides or angles — including at least one side — to solve the whole triangle. You get every side and angle, the area, perimeter, heights, medians, inradius and circumradius, and a drawing to scale.

Enter any three values

Include at least one side. Side a is opposite angle A, b opposite B and c opposite C. Fields also accept expressions such as pi/3 or sqrt(2).

Angle unit
Sides
Angles
Try an example
Solved triangle
ABCabc
scaleneright
Side a3
Side b4
Side c5
Angle A0.643501 rad36.869898°
Angle B0.927295 rad53.130102°
Angle C1.570796 rad90°
Area6
Perimeter12
Semiperimeter6
Height to a4
Height to b3
Height to c2.4
Median to a4.272002
Median to b3.605551
Median to c2.5
InradiusLargest circle inside1
CircumradiusCircle through all three corners2.5

Solved from three sides (SSS).

How to use this calculator

  1. Label your triangle so each side has the same letter as the angle opposite it: side a faces angle A.
  2. Type exactly three values, at least one of them a side. Leave the other three boxes empty.
  3. Read the solution — it updates as you type. If two triangles fit, switch between them above the drawing.

The formulas

Law of cosines: a² = b² + c² − 2bc·cos A

Law of sines: a / sin A = b / sin B = c / sin C

Angle sum: A + B + C = 180°

Area = ½·ab·sin C

Height to a = 2 × area ÷ a

Median to a = ½·√(2b² + 2c² − a²)

Inradius = area ÷ semiperimeter

Circumradius = a ÷ (2 sin A)

Three sides (SSS) and two sides with the angle between them (SAS) are solved with the law of cosines. Two angles and a side (ASA or AAS) use the angle sum and the law of sines. Two sides and an angle not between them (SSA) use the law of sines and check for a second solution.

Worked examples

Three sides: 5, 5 and 8

  • Angle C: cos C = (25 + 25 − 64) ÷ 50 = −0.28, so C ≈ 106.26°
  • A = B = (180 − 106.26) ÷ 2 ≈ 36.87°
  • Area = ½ × 5 × 5 × sin 106.26° = 12

Distance across a lake (SAS)

From one spot, the two ends of a lake are 7 km and 9 km away, 60° apart.

  • a² = 7² + 9² − 2 × 7 × 9 × cos 60° = 49 + 81 − 63 = 67
  • Width ≈ 8.185 km

Frequently asked questions