Triangle Calculator
Solve any triangle from three known measurements: all sides and angles, area, perimeter, inradius, circumradius and altitudes — with the Law of Cosines and Law of Sines worked out, and both solutions when the SSA case is ambiguous.
Written by Suhaib Hassan. Every formula follows standard trigonometry, and the worked examples are re-derived by hand. Our methodology.
It applies the Law of Cosines or Law of Sines to the known case, checks the angles add to 180°, and cross-checks the area with Heron’s formula.
Most solvers hide the ambiguous SSA case. This one detects it, shows both triangles, and explains why they exist.
—
P ÷ 2
K ÷ s
abc ÷ 4K
2K ÷ side
Triangle diagram
Drawn to scale from the solved sides and angles. Turn the overlays on and off below.
Step-by-step working
—
The SSA ambiguous case
With two sides and an angle that is not between them, the sine rule can give zero, one or two triangles. Compare side a with the height h = b·sin A.
a < h no triangle
Side a is too short to reach the base line, so there is no solution (sin B would exceed 1).
a = h right triangle
Side a just touches the base at 90°, giving exactly one solution.
h < a < b two triangles
Side a can swing to meet the base at two points: one acute and one obtuse angle B (B₂ = 180° − B₁).
a ≥ b one triangle
Side a is at least as long as b, so only the acute angle B works. There is one unique solution.
Formulas used
Law of Cosines
Finds a side from two sides and the included angle (SAS), or an angle from three sides (SSS).
Law of Sines
Relates each side to the sine of its opposite angle; R is the circumradius.
Area
The trigonometric area and Heron’s formula agree; the page checks both.
Worked examples
Surveyor’s triangle (SAS)
Two boundary lines a = 7 m and b = 10 m meet at C = 65°.
c = 9.4781 m
A = 42.017°, B = 72.983°
K = ½·7·10·sin 65° = 31.7208 m²
3-4-5 triangle (SSS)
Sides 3, 4 and 5.
A = arccos(0.8) = 53.130°
B = arccos(0.6) = 36.870°
K = 6
Ambiguous case (SSA)
a = 8, b = 10, A = 35°: h = 10·sin 35° = 5.736, so h < a < b.
B₁ = 45.805° → C₁ = 99.195°, c₁ = 13.768
B₂ = 134.195° → C₂ = 10.805°, c₂ = 2.615
What does “solving a triangle” mean?
Solving a triangle means finding all three sides and all three angles from three known measurements, at least one of which is a side. The known combination is named for the order of the parts: SSS (three sides), SAS (two sides and the angle between them), ASA (two angles and the side between them), AAS (two angles and a side not between them) and SSA (two sides and an angle not between them).
Which formula for which case?
- SSS and SAS: Law of Cosines first, then Law of Sines or Cosines for the remaining angles.
- ASA and AAS: the third angle is 180° − A − B; then the Law of Sines gives the sides.
- SSA: the Law of Sines gives sin B; check for zero, one or two solutions.
- AAA (three angles) cannot be solved — it fixes the shape but not the size.
By Suhaib Hassan · Reviewed 28 September 2026 · How CalculatePilot verifies formulas →
Sources
- NIST Digital Library of Mathematical Functions, section 4.16, Solution of triangles.
- Heron of Alexandria, Metrica (c. 60 AD) — the area formula from the three sides.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics.
Frequently asked questions
Why is SSA called the ambiguous case?
Because the sine function gives the same value for an acute angle and its supplement (sin θ = sin(180° − θ)), the known angle can be met by an acute or an obtuse angle B. When h < a < b both are valid and two different triangles fit the data.
What is Heron’s formula and when is it better than ½ × base × height?
Heron’s formula gives the area from the three sides alone: K = √[s(s − a)(s − b)(s − c)], with s the semi-perimeter. It is convenient when you know all three sides but no height or angle.
What makes three side lengths a valid triangle?
The triangle inequality: each side must be shorter than the sum of the other two. If the longest side equals the sum of the other two the triangle is degenerate (a flat line), and if it is longer no triangle exists.
How do I convert between degrees, radians and gradians?
A full turn is 360° = 2π radians = 400 gradians. So radians = degrees × π ÷ 180 and gradians = degrees × 10 ÷ 9. The angle-unit switch on this page converts your inputs and results for you.
Why can’t three angles alone determine a triangle?
Any triangle scaled up or down keeps the same angles, so AAA describes a whole family of similar triangles. You need at least one side to fix the size.
How is the triangle classified?
By sides it is equilateral (all equal), isosceles (two equal) or scalene (none equal). By angles it is acute (all below 90°), right (one exactly 90°) or obtuse (one above 90°).
How triangle sides and angles are solved: triangle calculator guide.
Related calculators
Continue with geometry.