Triangle Calculator

Solve any triangle from SSS, SAS, ASA, AAS, or SSA. Enter at least 3 values (including at least 1 side length) then click Calculate.

Triangle Input

Angle Unit:

Solving Methods

  • SSS — Law of Cosines to find all angles.
  • SAS — Law of Cosines to find the opposite side, then Law of Sines.
  • ASA / AAS — Third angle = 180° − A − B, then Law of Sines.
  • SSA (ambiguous) — Law of Sines; may yield 0, 1, or 2 solutions.

Tomasz is edging a triangular garden bed whose two straight sides measure 6 m and 9 m with a 40° corner between them, and she needs the third side for the edging and the area for the soil order. This calculator solves a triangle from any three values that include at least one side, covering the SSS, SAS, ASA, AAS and SSA cases.

Law of cosines, law of sines and Heron's formula

Which rule runs depends on what you enter. With three sides (SSS), the law of cosines gives each angle, for example cos A = (b² + c² − a²) / (2bc). With two sides and the angle between them (SAS), c² = a² + b² − 2ab·cos C finds the missing side first. With two angles and a side (ASA or AAS), the third angle is 180° − A − B, then the law of sines, a / sin A = b / sin B = c / sin C, supplies the sides. Two sides plus an angle that is not between them (SSA) also uses the law of sines and can produce zero, one or two triangles.

Once the triangle is known, the area comes from Heron's formula, √(s(s − a)(s − b)(s − c)) with s = (a + b + c) / 2. Heights are 2 × area / side, medians are ½√(2b² + 2c² − a²) and its two counterparts, the inradius is area / s, and the circumradius is abc / (4 × area). The page also places the triangle on axes with A at the origin and B on the x-axis, and reports the centroid, incenter and circumcenter in that frame.

Tomasz's bed: side a = 6, side b = 9 and angle C = 40° between them. Then c² = 6² + 9² − 2 × 6 × 9 × cos 40° = 117 − 82.73279986 = 34.26720014, so c = 5.85382. The angles are A = 41.2114° and B = 98.7886°, which with C add up to 180°. Heron's formula gives an area of 17.35527 square metres, matching ½ab·sin C. The perimeter is 20.85382, the inradius 1.66447 and the circumradius 4.55346. Everything is shown to five decimal places.

How to Use This Calculator

  1. Choose degrees or radians first. Switching later does not convert numbers you have already typed.
  2. Learn the naming: side a is opposite angle A, side b is opposite B, and side c is opposite C. Angle C is the one between sides a and b.
  3. Enter at least three values, with at least one of them a side length. Leave the rest blank.
  4. Press Calculate. The results do not update as you type.
  5. Read angles, sides, perimeter, semi-perimeter and area in the first cards.
  6. Scroll for heights, medians, inradius and circumradius, then for the vertex coordinates and the three centres.
  7. If two solutions appear, they are labelled as ambiguous SSA, and both are valid triangles.
  8. Use Clear to wipe all six boxes before starting a new problem.

Frequently Asked Questions

Why does the calculator sometimes return two triangles?

That is the SSA case, where you know two sides and an angle that is not between them. With A = 30°, a = 5 and b = 8, sin B = 0.8, so B can be 53.1301° or 126.8699°. The first gives c = 9.9282 and the second c = 3.9282, and both fit.

Can I solve a triangle from three angles?

No. Three angles only fix the shape, never the size, so the page says at least one side length must be provided. Add any one side and it works.

I entered angle A with sides a and b. Why is that not treated as SAS?

Because A is opposite a, not between a and b, so it is an SSA problem with a possible second answer. For SAS, the angle must sit between the two sides, which for sides a and b means angle C.

What happens if I switch to radians?

Existing numbers are not converted, so 90 typed under radians is rejected because each angle must be less than π. In radians, a right angle is entered as 1.5708. Clear the boxes after switching to avoid mixing units.

Why does 2, 3, 10 fail but 2, 3, 5 gives a different message?

Sides 2, 3 and 10 break the triangle inequality outright, and the page says so. Sides 2, 3 and 5 only just fail, because the triangle would be flat with zero area, and the page replies that no valid triangle exists.

What if I enter more values than needed?

The solver does not cross-check extras. If all three sides are entered, any angles you typed are ignored, so a wrong angle will not trigger a warning. Enter the minimum, then compare the returned angles with the ones you measured.