Triangle Calculator

Solve any triangle — enter any 3 known values (sides and/or angles). Calculates all missing sides, angles, area, perimeter, and height using law of cosines and law of sines.

Choose what you know Law of Cosines & Sines
Sides: a, b, c — Angles opposite to them: A, B, C (in degrees)
Side a
Side b
Side c
Angle A (°)
Angle B (°)
Angle C (°)
FAQs
What is the law of cosines?
The law of cosines generalizes the Pythagorean theorem to any triangle: c² = a² + b² − 2ab·cos(C). You can rearrange for any side: a² = b² + c² − 2bc·cos(A). To find angles from sides: cos(C) = (a² + b² − c²) / 2ab. Use it when you know: three sides (SSS), or two sides and the included angle (SAS). When angle C = 90°, cos(90°) = 0, and the formula reduces to the Pythagorean theorem.
What is the law of sines?
The law of sines: a/sin(A) = b/sin(B) = c/sin(C). Use it when you know two angles and any side (AAS or ASA), or two sides and a non-included angle (SSA — the ambiguous case, which can have 0, 1, or 2 solutions). The law of sines doesn't work when all three angles are known (ASA needs a side to determine size) and gives ambiguous results in the SSA case when the given angle is acute.