Triangle Angle Calculator
Enter three sides (SSS) or two sides plus the angle between them (SAS), and this calculator finds all three interior angles, the missing side, the area, and the perimeter using the law of cosines.
Input method
Interior angle opposite side a, computed via the law of cosines
- 1
Numerator b² + c² − a²
7² + 9² − 5² = 105 - 2
Denominator 2bc
2 × 7 × 9 = 126 - 3
cos A
105 ÷ 126 = 0.833333 - 4
Angle A = arccos(cos A)
arccos(0.833333) = 33.557
How does this calculator work?
For SSS (three sides): cos A = (b² + c² − a²) / (2bc); repeat for B and C. For SAS (two sides + included angle C): find c = √(a² + b² − 2ab cos C), then use the same law of cosines for A and B. Area = ½ab sin C. All three angles must sum to 180°.
Formula
How this is calculated
The law of cosines generalises the Pythagorean theorem to any triangle: for side a opposite angle A, the formula is a² = b² + c² − 2bc cos A, which rearranges to cos A = (b² + c² − a²) / (2bc). In the SSS case you provide all three sides and apply this formula three times (cycling through a, b, c) to compute each angle. The third angle is found as 180° minus the other two, serving as a precision check.
In the SAS case you provide two sides a, b and the angle C between them. The law of cosines gives the missing side directly: c = √(a² + b² − 2ab cos C). Once all three sides are known, the two remaining angles are computed as in the SSS case. The area for SAS uses the sine formula: Area = ½ × a × b × sin C, which is exact and avoids any rounding that might accumulate from computing c first.
Inputs are rejected if they violate the triangle inequality (SSS) or if the included angle is not strictly between 0° and 180° (SAS). All angles must be positive; an angle of 0° or 180° would produce a degenerate line rather than a triangle. Results are shown to four decimals.
Frequently asked questions
The law of cosines states that for any triangle with sides a, b, c and angles A, B, C: a² = b² + c² − 2bc cos A. It reduces to the Pythagorean theorem when A = 90° (cos 90° = 0). Rearranged, cos A = (b² + c² − a²) / (2bc), which lets you find any angle from all three sides.
Use SSS when you have all three side lengths measured. Use SAS when you have two sides and the angle between them — for example the two arms of a V-shape and the opening angle. Both cases fully determine the triangle (unlike SSA, which can be ambiguous).
The triangle inequality requires each side to be strictly less than the sum of the other two. For SAS the included angle must be strictly between 0° and 180°. Values at those boundaries produce a degenerate triangle (a straight line) with zero area.
Also known as
TG we-Calculate Editorial Team. (2026). Triangle Angle Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/triangle-angle-calculator
TG we-Calculate Editorial Team. "Triangle Angle Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/triangle-angle-calculator.
TG we-Calculate Editorial Team, "Triangle Angle Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/triangle-angle-calculator
@misc{wecalculate_triangle_angle_calculator, title = {Triangle Angle Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/triangle-angle-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
