Law of Cosines Calculator
Calculate law of cosines instantly in your browser.
Loading calculator…
What this tool does
Calculate law of cosines instantly in your browser. The included angle is the angle between the two known sides; standard notation puts side c opposite angle C.
How to use the Law of Cosines Calculator
- Enter or select solve for.
- Enter or select side a.
- Enter or select side b.
- Enter or select side c.
- Enter or select included angle c (degrees).
- Read the calculated result; change any measurement to compare alternatives.
Formula
c² = a² + b² − 2ab·cos C finds a side from two sides and the included angle; rearranged, cos C = (a² + b² − c²)/(2ab) finds an angle from three sides. With C = 90° it reduces to the Pythagorean theorem.
- mode
- Solve for
- a
- Side a
- b
- Side b
- c
- Side c
- angC
- Included angle C (degrees)
The included angle is the angle between the two known sides; standard notation puts side c opposite angle C.
Worked example
For law of cosines calculator, the following measurements illustrate the exact method: Solve for: side; Side a: 5; Side b: 7; Side c: 8; Included angle C (degrees): 60.
Inputs
- Solve forSide c (from a, b and included angle C)
- Side a5
- Side b7
- Side c8
- Included angle C (degrees)60
Result
- Side c6.24
- Area (½ab·sin C)15.16
- Perimeter18.24
Results explained
- Side c
- Side c from the formula above. The included angle is the angle between the two known sides; standard notation puts side c opposite angle C.
- Area (½ab·sin C)
- Area (½ab·sin C) from the formula above. The included angle is the angle between the two known sides; standard notation puts side c opposite angle C.
- Perimeter
- Perimeter from the formula above. The included angle is the angle between the two known sides; standard notation puts side c opposite angle C.
Frequently asked questions
c² = a² + b² − 2ab·cos C finds a side from two sides and the included angle; rearranged, cos C = (a² + b² − c²)/(2ab) finds an angle from three sides. With C = 90° it reduces to the Pythagorean theorem.
The included angle is the angle between the two known sides; standard notation puts side c opposite angle C.
Where mathematically meaningful, yes. Fields specify permitted ranges and undefined operations display an error.
Exact integer calculations use safe integers; decimal calculations use browser floating point, so small rounding differences can occur.
All values remain in your browser and are never uploaded.