Triangle Calculator — Solve Any Triangle

Choose SSS, SAS, ASA/AAS, SSA, a right triangle, or an area method, then enter only what you know. The calculator checks your values and returns missing sides and angles, area, classifications, derived measurements, worked steps, and an approximately to-scale diagram. Ambiguous SSA cases return both triangles. Standard notation is used: side a is opposite angle A, and likewise for b/B and c/C.

Choose a calculation mode

Help me choose

Select the statement that matches what you know:

units
Example: 3

units
Example: 4

units
Example: 5

°
At vertex A

°
At vertex B

°
At vertex C

units
Height to base a

Add another known value to verify

Optional values are checked against every solution. Inconsistent measurements are never ignored.

Try an example

Advertisement

Results and worked steps

How to choose SSS, SAS, ASA/AAS, or SSA

Mark the values you know on a sketch first. Side a must sit opposite angle A, side b opposite B, and side c opposite C. Then choose the matching pattern:

  • SSS: use three side lengths. For 5, 6, and 7, the Law of Cosines finds each angle, then Heron’s formula gives area.
  • SAS: use two sides and the angle physically between them. With a = 7, b = 9, and C = 60°, calculate c² = 7² + 9² − 2(7)(9)cos(60°).
  • ASA/AAS: use two angles and any side. First find the third angle from 180° − A − B, then scale the sides with the Law of Sines.
  • SSA: use an angle, its opposite side, and a second side. Check both inverse-sine angles because the data can produce zero, one, or two triangles.

Three angles alone determine only a shape, not its size. At least one side is needed to distinguish, for example, a triangle with 3 cm sides from a similar one with 3 m sides.

Right triangles, triangle inequality, and area

For a right triangle with C = 90°, side c is the hypotenuse. Two legs use c = √(a² + b²); a hypotenuse and a leg use b = √(c² − a²). Trigonometric ratios then find the acute angles.

Three proposed sides are valid only when the sum of every pair is greater than the remaining side. Thus 2, 3, and 5 are degenerate because 2 + 3 = 5; they form a straight segment, not a triangle.

Choose an area formula from the available data:

  • Base and height: K = ½aha. Example: base 8 and height 5 give 20 square units.
  • Two sides and included angle: K = ½ab sin(C). Example: a = 7, b = 9, C = 60° gives about 27.28 square units.
  • Three sides: s = (a+b+c)/2; K = √(s(s−a)(s−b)(s−c)).

Worked examples

SSS: solve a 5–6–7 triangle

Enter a = 5, b = 6, c = 7. Select SSS. For angle A, substitute into the Law of Cosines: A = cos⁻¹((6² + 7² − 5²)/(2·6·7)) ≈ 44.42°. Heron’s formula uses s = 9 and returns area ≈ 14.70 square units.

SAS: sides 7 and 9 with included angle 60°

Enter a = 7, b = 9, C = 60°. Select SAS. c = √(7² + 9² − 2·7·9·cos 60°) = √67 ≈ 8.185, then use the Law of Cosines for A and B.

ASA/AAS: A = 50°, B = 60°, c = 8

Select ASA/AAS with known side c. First, C = 180° − 50° − 60° = 70°. Then a = 8 sin(50°)/sin(70°) ≈ 6.522 and b = 8 sin(60°)/sin(70°) ≈ 7.373.

SSA: A = 30°, a = 7, b = 10

Select SSA. sin B = 10 sin(30°)/7 = 5/7, so B can be about 45.58° or 134.42°. Both leave a positive angle C, producing two valid triangles.

Methodology and review

Author and reviewer: Starlight Tools mathematics editorial team. Review scope: Euclidean triangle geometry and numerical implementation. Last reviewed: 15 July 2026.

The implementation uses the Law of Cosines, Law of Sines, Heron’s formula, the Pythagorean theorem, and standard area identities. It computes with full JavaScript floating-point precision and rounds only the display. Domain comparisons use a 10−12 numerical tolerance; extra measurements are accepted within 0.01% to accommodate measured or rounded inputs.

Verification cases: 3–4–5 returns C = 90° and area 6; equilateral 2–2–2 returns three 60° angles and area √3; 2–3–5 is rejected as degenerate; A = 30°, a = 7, b = 10 returns two SSA solutions.

All calculations run locally in your browser; input values are not uploaded.

Triangle Calculator: FAQs

How many values are needed to solve a triangle?

Usually three independent values are required, including at least one side. Valid cases include SSS, SAS, ASA, AAS, and sometimes SSA. A right triangle can be solved from two additional values because the 90-degree angle is already known.

Are three angles enough to solve a triangle?

No. Three angles fix the shape but not the scale, so infinitely many similar triangles are possible. At least one side length is needed.

How do I find a missing side?

Use the Pythagorean theorem for a right triangle, the Law of Cosines for SSS or SAS data, or the Law of Sines when an opposite side-angle pair is known.

How do I find a missing angle?

Use the 180-degree angle sum when two angles are known. With three sides, use the inverse Law of Cosines; with an opposite side-angle pair, use the inverse Law of Sines.

How are right triangles handled?

Choose Right triangle, select the known-value pattern, and enter two values. The calculator fixes angle C at 90 degrees and uses the Pythagorean theorem plus trigonometric ratios.

Why can SSA produce two triangles?

The sine of an acute angle equals the sine of its supplementary obtuse angle. If both possible angle sums stay below 180 degrees, the same SSA data describes two different triangles.

What units can I use?

Length inputs and outputs may be unitless or use millimetres, centimetres, metres, kilometres, inches, feet, yards, or miles. Angles may be entered and displayed in degrees or radians. All side lengths in one calculation must use the selected unit.

What does significant-figure rounding mean?

It controls only the displayed digits. Calculations keep full floating-point precision internally, so changing the display precision does not change the underlying solution.

Why are my side lengths invalid?

Each side must be positive and finite, and the sum of any two sides must be greater than the third. Equality makes a degenerate straight line rather than a triangle.

Explore more tools