Triangle Calculator
Give a triangle any three pieces of information — three sides (SSS), two sides and the included angle (SAS), two angles and a side (ASA), and so on — and the rest is fully determined. This calculator runs the law of sines, law of cosines and basic trigonometry under the hood to hand back every side, every angle, the area, the perimeter and a to-scale diagram without you reaching for a calculator.
How triangle solving works
-
1
Pick which three values you know
SSS, SAS, ASA, AAS, or right-triangle shortcuts.
-
2
Enter the known values
Sides in any unit; angles in degrees or radians.
-
3
Calculator applies the right law
Cosines for SSS and SAS; sines for ASA and AAS.
-
4
Get every other value
The missing sides and angles, area, perimeter, altitude, circumradius.
Which law to use for which inputs
| Inputs | Law applied | Notes |
|---|---|---|
| SSS (3 sides) | Law of cosines | Must satisfy triangle inequality |
| SAS (2 sides + included angle) | Law of cosines | Uniquely determined |
| ASA (2 angles + included side) | Law of sines | Third angle = 180 − sum |
| AAS (2 angles + a non-included side) | Law of sines | Same as ASA after reordering |
| SSA (2 sides + non-included angle) | Law of sines | Ambiguous case — 0, 1 or 2 triangles |
The triangle inequality
For any valid triangle with sides a, b, c: each side must be less than the sum of the other two:
a + b > c
b + c > a
a + c > b
Inputs that violate this form no triangle — the calculator flags the error.
Area methods
Three common ways to compute triangle area:
- Base × height / 2 (when height is known).
- SAS formula:
½ × a × b × sin(C)(two sides and included angle). - Heron’s formula:
√(s(s-a)(s-b)(s-c))where s = (a+b+c)/2 (all three sides).
The calculator picks whichever formula matches your inputs.
Right triangles have shortcuts
For right triangles (one angle = 90°):
- Pythagorean theorem:
a² + b² = c²(c is the hypotenuse). - SOH-CAH-TOA: sin = opposite/hypotenuse, cos = adjacent/hypotenuse, tan = opposite/adjacent.
- Area = ½ × leg₁ × leg₂.
The SSA ambiguous case
Two sides and a non-included angle can produce 0, 1 or 2 valid triangles:
- If the given side is too short to reach the opposite leg: 0 triangles.
- If it exactly reaches (perpendicular landing): 1 right triangle.
- If longer than that but shorter than the adjacent side: 2 triangles (one obtuse, one acute version).
- If longer than the adjacent side: 1 triangle.
The calculator shows all solutions when ambiguity exists.
Frequently Asked Questions
Because the given side can “swing” to two positions that both form valid triangles — one acute, one obtuse. The law of sines yields two angle candidates, and only context can tell you which one applies (often a diagram or an obvious geometric constraint).
The triangle inequality fails. The calculator returns an error explaining which constraint is violated. Double-check your inputs; a common mistake is typing the wrong unit.
Degrees by default. Toggle to radians if you’re doing physics or calculus work. The unit only affects input/display; internal math uses radians.
No. All calculations run in your browser.