A law of cosines calculator with three boxes: enter sides a and b plus the included angle C to get the third side c and both remaining angles instantly - the Pythagorean theorem that works for any triangle.
Three boxes, pre-filled with a = 10, b = 12, C = 30°. Click Calculate. This law of cosines calculator form takes the SAS setup: two sides and the angle between them. The law of cosines calculator is the SAS machine.
The law of cosines calculator keeps full precision, so 10, 12, and 30 return c ≈ 6.013, A ≈ 56.3°, B ≈ 93.7°.
This page is more than a static law of cosines calculator — it is also an AI tutor you can ask questions:
The Pythagorean theorem has one blind spot: it only works when the angle is 90°. The law of cosines removes that restriction — it is the Pythagorean theorem generalized to every triangle, and this law of cosines calculator runs it. Compare the two:
The new term is the correction for the tilt. Point the angle wide (C near 180°) and cos C approaches −1, so the correction adds and c stretches. Squeeze it narrow (C near 0°) and cos C approaches 1, so c shrinks toward the gap between the sides. Set C = 90° and cos 90° = 0: the correction vanishes and the law of cosines calculator becomes the Pythagorean theorem exactly.
Read the picture first: two sides pinned at the angle C, third side waiting. Now the symbols the law of cosines calculator uses:
| | perimeter, once the third side lands || | area from the two known sides and their angle || | inradius; is the semi-perimeter — all four of these ride along in the law of cosines calculator || | circumradius, the circle through all three vertices || Symbol | Meaning | |---|---| | , , | sides opposite angles , , | | | the included angle between sides and |
Every number the law of cosines calculator returns is the first row plus two arccosines. Check any law of cosines calculator output by summing the three angles: they must total 180°. This is the law of cosines calculator's built-in lie detector.
Give the law of cosines calculator its home-game: a = 10, b = 12, and the angle between them C = 30°.
These exact numbers come pre-loaded in the law of cosines calculator above — click Calculate and the law of cosines calculator confirms all three instantly.
Use the law of cosines to find angle measures when all three sides are known. A triangle has sides 20, 25, and 18; find the angle opposite the side 20.
Three sides lock the triangle with no ambiguity — every angle comes out unique. The law of cosines calculator form above covers SAS. For this law of cosines SSS situation, ask the AI to run the rearranged version step by step.
Watch the correction term work with the law of cosines calculator: sides a = 3 and b = 4, first with C = 90°, then with C = 60°.
The law of cosines calculator shows the sweep live: keep 3 and 4 fixed, walk C from 90° down to 60°. Watch the law of cosines calculator's side c shrink from 5 to 3.61.
Four slips the law of cosines calculator catches every day:
Two paths leave a trailhead at a 50° angle. One is 7 km long, the other 10 km. How far apart are their endpoints, to two decimals? Check your answer with the law of cosines calculator above.
A triangular lot has sides 8, 11, and 13. Find the angle opposite the side of length 13, to one decimal. Check your setup with the law of cosines calculator page AI.
Cosines for SAS (two sides plus the angle between them) and SSS (three sides). Sines for ASA, AAS, and SSA. Quick test: an angle squeezed between two sides means the law of cosines calculator is the right tool.
One line of coordinates does it. Put C at the origin, B at (a, 0), and A at (b·cos C, b·sin C). Then c² = (a − b·cos C)² + (b·sin C)² = a² + b² − 2ab·cos C. That is the whole law of cosines proof — and the same cos law proof in words: the third side is the Pythagorean distance between the two far endpoints.
The form is SAS. For the law of cosines SSS arrangement, rearrange to cos C = (a² + b² − c²)/(2ab) and take arccos. Or ask the AI on this page: it runs the same law of cosines calculator engine on your three sides.
The angle tilts side b away from side a, so they overlap less. The overlap is exactly ab·cos C counted twice — the term removes it. At C = 90° nothing overlaps and the term is zero — the law of cosines calculator shows this instantly.
Degrees. Type 30 for thirty degrees, not 0.52. The law of cosines calculator converts to radians internally before the law of cosines calculator computes the cosine.
It is the generalization. Set C = 90° in the law of cosines calculator: cos 90° = 0, the correction dies, and c² = a² + b² drops out. A right triangle gives the law of cosines calculator nothing but Pythagorean answers.
No. SAS and SSS each determine exactly one triangle, so every law of cosines calculator run is unique. The two-triangle ambiguity only lives in the sines rule's SSA case.