Skip to content
FiftyCalc Free calculators for all 50 states

Triangle Length Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter two sides of a triangle and the angle between them to get the length of the third side.

Result

Sample figures

Third side c—

Angle A, opposite side a (degrees) —

  • Angle B, opposite side b (degrees)—
  • Area (½ab sin C, square units)—
  • Perimeter—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Triangle Length Calculator

Side a: enter 0 or more. Prefilled example: 5.

Side b (same unit): enter 0 or more. Prefilled example: 7.

Angle C between a and b (0 to 180), in °: enter a number from 0 to 180. Prefilled example: 60.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Side a: enter 0 or more.
  2. Side b (same unit): enter 0 or more.
  3. Angle C between a and b (0 to 180), in °: enter a number from 0 to 180.
  4. Read the result: Third side c; the panel also shows Angle A, opposite side a (degrees), Angle B, opposite side b (degrees), Area (½ab sin C, square units) and Perimeter.

How this calculator works

The law of cosines gives the side opposite angle C: c² = a² + b² − 2ab cos C. With C = 90° it reduces to the Pythagorean theorem.

The other angles follow from the same law, A = arccos((b² + c² − a²) ÷ 2bc), and the angle sum A + B + C = 180°. The area is ½ab sin C.

The formula

  1. Sc=a2+b2−2×a×b×cos⁡(rad⁡(ac))
Symbols used in the formula
SymbolMeaningUnit
aSide a
bSide bsame unit
acAngle C between a and b (0 to 180)°
ScThird side c
rad(x)the angle x, converted from degrees to radians.

Worked example

Side a5
Side b (same unit)7
Angle C between a and b (0 to 180)60 °
Angle A, opposite side a (degrees)43.8979
Angle B, opposite side b (degrees)76.1021
Area (½ab sin C, square units)15.1554
Perimeter18.245
  1. Sc=52+72−2×5×7×cos⁡(rad⁡(60))=6.245

Third side c 6.245

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

How do I find the third side of a triangle?

If you know two sides and the angle between them, use c = √(a² + b² − 2ab cos C). For 5, 7 and 60° that is √39 ≈ 6.245.

What if the triangle has a right angle?

Set C = 90°: cos 90° = 0 and the formula becomes c = √(a² + b²).

What if I know two sides and an angle that is not between them?

That is the SSA case, solved with the law of sines; it can have zero, one or two triangles.

Questions answered

Related calculators