Updated
Using Law of cosines calculator
Find a triangle’s third side from two sides and the included angle: c² = a² + b² − 2ab cos C.
The angle must sit between the entered sides and be strictly between 0° and 180°. All lengths use one unit. A stable equivalent expression reduces cancellation.
A worked example
Example inputs: first adjacent side = 3, second adjacent side = 4, included angle (degrees) = 90. Opposite side length = 5.
Before you use the result
The angle must sit between the entered sides and be strictly between 0° and 180°. All lengths use one unit. A stable equivalent expression reduces cancellation.
Example results for first adjacent side
These examples use Second adjacent side: 4; Included angle (degrees): 90. They are reference calculations, not recommended settings.
| First adjacent side | Opposite side length |
|---|---|
| 1.5 | 4.27200187266 |
| 3 | 5 |
| 6 | 7.21110255093 |
Cite this page
ToolOctopus. “Law of cosines calculator.” Updated 2026-09-26. https://tooloctopus.com/law-of-cosines-calculator.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. Licence and source code.
