Law of cosines calculator
The law of cosines is the Pythagorean theorem with a correction term for the angle not being a right angle.
Third side
6.666 344 592 93
- Angle A
- 46.237 49 degrees
- Angle B
- 96.762 51 degrees
- Area
- 26.479 861 018 7
- Perimeter
- 25.666 344 592 9
Show the working
- Side a = 8
- Side b = 11
- Included angle C = 37
- rad_c = rad(37) = 0.645 772
- Third side = sqrt(8^2 + 11^2 - 2*8*11*cos(0.645 772)) = 6.666 34
- Angle A = 6.666 34 > 0 ? deg(acos(clamp((11^2 + 6.666 34^2 - 8^2)/(2*11*6.666 34), -1, 1))) : 0 = 46.2375
- Angle B = 180 - 46.2375 - 37 = 96.7625
- Area = 8 * 11 * sin(0.645 772) / 2 = 26.4799
- Perimeter = 8 + 11 + 6.666 34 = 25.6663
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- c^2 = a^2 + b^2 - 2ab cos(C)
- area = (1/2) a b sin(C)