Your Equation

Library / Foundations: Maths / FMA-15

Foundations: Maths

Cosine rule

Third side of a triangle from two sides and the angle between them.

Ref
FMA-15
Rev
v1
Field
Foundations: Maths
Result
c [m]

Use two known sides and the angle C between them to find the third side. Rearranged it gives an angle when all three sides are known.

The cosine rule is Pythagoras with a correction term that depends on the angle between the sides.

Calculator

Solve for
m
m
320
m
320
°
20150
  • Angle opposite a88.67 °
  • Triangle area ½ab sin C15.32 m²

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Third side (m) current value 6.13 m
aSide aKey driver
3.8317.2
bSide b
16.1
CIncluded angle
3.7212.6
  • At C = 90° the cosine term vanishes and the rule becomes Pythagoras.
  • Use it for two sides and the included angle, or three sides and a missing angle.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing (m)Local stepChange in result
a Side a3 to 20 m3.8317.2213.39+10%+10.5 %
b Side b3 to 20 m6.1316.079.942+10%+0.143 %
C Included angle20 to 150 °3.71812.588.863+10%+7.11 %

Sweep of Included angle

Included angle (°)Third side (m)
203.718
36.254.948
52.56.348
68.757.746
859.057
101.310.23
117.511.22
133.812.01
15012.58

Sweep one variable

Third side (m)Hover, touch, or use the arrow keys on the chart
4681012 20406080100120140 Included angle (°) now 6.13

Variables and how each one contributes

c

Third side

Result · m

What the equation gives you. Everything else feeds it.

a

Side a

m · typical 3 to 20

One known side. Raises c.

b

Side b

m · typical 3 to 20

The other known side. Raises c.

C

Included angle

° · typical 20 to 150

Angle between sides a and b. Wider angles stretch the third side.

Worked example with the values above

  1. a² + b² = 89; 2ab cos C = 51.42.
  2. c² = 37.58.
  3. c = 6.13 m.

Assumptions and limits

  • Plane triangle.
  • C is the angle between a and b.

Common mistakes

  • Using an angle that is not between the two known sides.
  • Calculator in radian mode.

Statistics and uncertainty

The sides and the angle contribute errors of different weight; for angles near 0° or 180° the result is very sensitive to the angle reading.

Where it is used

  • Distance between two targets from ranges and bearing difference.
  • Navigation legs.

Maths you need

  • Pythagoras: the right-angle case
  • Cosine: cos of an angle

Related formulas

Practise this formula