Maths

Triangle Calculator

Solve a triangle from three known sides and/or angles, including ambiguous SSA cases.

By Nitin Raturi · Last reviewed

Known measurements

How to use this Triangle Calculator

Enter exactly three known side lengths and/or angles; the calculator fills in the rest.

  1. Choose three measurements from sides a, b, c and angles A, B, C. Matching lowercase and uppercase letters are opposite pairs.
  2. Use degrees for angles and one consistent unit for all sides. Leave the other fields blank.
  3. Read the solved sides, angles, area, radii, heights, medians and triangle type.
  4. For an SSA case, check whether the calculator shows one or two valid triangles.
  5. Copy the page address to share the accepted inputs.

Good to know

  • Three angles alone do not set a size; include at least one side.
  • A sketch is normalised to fit the page and is not to scale.
  • Tap the ⓘ beside any field for its range and role.

Enter exactly three values. Use one unit for all sides; angles are in degrees.

Side a

Side a is opposite angle A. It has the same length unit as sides b and c.

How to fill it in

  • Enter a positive length, up to 10,00,00,00,00,000.
  • Keep the same unit for every side; the calculator does not need you to name that unit.
  • Leave this blank when it is not one of your three known measurements.

Example

In the default 3–4–5 triangle, side a is 3 and the opposite angle A is 36.87°.

Side b

Side b is opposite angle B. All side inputs must use one consistent length unit.

How to fill it in

  • Enter a positive length, up to 10,00,00,00,00,000.
  • Leave this blank when you know a different side or angle.
  • Three sides must satisfy the strict triangle inequality.

Example

The default 3–4–5 triangle has side b=4 and angle B=53.13°.

Side c

Side c is opposite angle C. It is also the baseline used for the small triangle sketch.

How to fill it in

  • Enter a positive length, up to 10,00,00,00,00,000.
  • Use the same unit for sides a, b and c.
  • Leave it blank unless it is one of your three known measurements.

Example

In the 3–4–5 example, c=5 and the area is 6 square units.

Angle A

Angle A is opposite side a. Enter degrees, not radians.

How to fill it in

  • Use a value greater than 0° and less than 180°.
  • Two angles and one side solve an ASA or AAS triangle.
  • With two sides, check whether A is opposite one of those sides: if so, this is the ambiguous SSA case.

Example

For a=6, b=8, A=30°, there are 2 possible triangles; both are shown.

Tip: Side a, angle A; side b, angle B; and side c, angle C are opposite pairs.

Angle B

Angle B is opposite side b. Enter its interior angle in degrees.

How to fill it in

  • Use a value greater than 0° and less than 180°.
  • Keep the three interior angles below 180° in total.
  • Leave it blank unless it is one of your three known measurements.

Example

With a=5, A=30° and B=60°, the remaining angle is 90°.

Angle C

Angle C is opposite side c. It is the included angle between sides a and b.

How to fill it in

  • Use a value greater than 0° and less than 180°.
  • Two sides plus their included angle give one SAS solution.
  • If your angle is not between the two known sides, the case is SSA and may have two solutions.

Example

With a=3, b=4 and C=60°, the calculator finds c=3.6056 and area 5.1962 square units.

Solved triangle

Solved triangle 1Triangle 1: sides a 3, b 4, c 5; angles A 36.87 degrees, B 53.13 degrees, C 90 degrees. The drawing is normalised and not to scale.a = 3b = 4c = 5A 36.87°B 53.13°C 90°
Triangle 1 · labels show the solved measurements. The sketch is not to scale.

Text alternative: Triangle 1: sides a 3, b 4, c 5; angles A 36.87 degrees, B 53.13 degrees, C 90 degrees. The drawing is normalised and not to scale.

Side a
3
Side b
4
Side c
5
Angle A
36.8699°
Angle B
53.1301°
Angle C
90°
Area (Heron)
6 square units
Area (½ab sin C)
6 square units
Perimeter
12 units
Semi-perimeter
6 units
Inradius
1 units
Circumradius
2.5 units
Height to side a
4 units
Height to side b
3 units
Height to side c
2.4 units
Median to side a
4.272 units
Median to side b
3.6056 units
Median to side c
2.5 units
Side type
scalene
Angle type
right

Lengths use your chosen unit; areas use that unit squared. Three angles alone do not set a triangle’s size. The diagram is normalised and not to scale.

How this calculator works

Three matching measurements determine the rest of a triangle. For the default 3–4–5 example, the calculator finds three angles and area 6 square units.

  1. Step 1Choose a known caseSSS · SAS · ASA/AAS · SSAEnter exactly three measurements, including at least one side.
  2. Step 2Apply a triangle ruleSine or cosine ruleThe angle-side pairing decides which rule can solve the missing values.
  3. Step 3Check the geometry36.87° + 53.13° + 90° = 180°The result also checks area by two formulas.

The letters follow a fixed convention: lowercase side a is opposite uppercase angle A, and likewise for b/B and c/C. Lengths can use any unit, but all entered sides must use the same one.

The main solve cases

  • SSS, SAS, ASA or AASOne triangleThree sides; two sides and their included angle; or two angles plus one side.
  • SSA2 possible trianglesThe sine rule can produce an angle and its supplement. The calculator displays both when both fit.
Three angles alone reveal a shape, not its scale, so at least one side is required.

Worked example

A triangle with sides 3, 4 and 5 has perimeter 12 units and area 6 square units.

Solving the 3–4–5 triangle
Semi-perimeter
s = (a + b + c) ÷ 2
Heron area
K = √[s(s − a)(s − b)(s − c)]
Angle check
A + B + C = 180°
  • a, b, cthe three side lengths 3, 4, 5
  • shalf the perimeter 6
  • Ktriangle area 6 square units
  1. Perimeter3 + 4 + 512 units
  2. Semi-perimeter12 ÷ 26 units
  3. Heron area√(6 × 3 × 2 × 1)6 square units
  4. Sine area check½ × a × b × sin C6 square units

The area values agree because both formulas describe the same triangle. The calculator keeps full precision internally and rounds only the displayed values.

Reading your result

The default triangle is scalene and right; each solved value is tied to the letter printed on the diagram.

  • Sides and anglesAll three side lengths and their opposite angles.
  • Area and perimeterArea by Heron and by ½ab sin C, plus perimeter and semi-perimeter.
  • Radii, heights and mediansThe inradius, circumradius, perpendicular heights and vertex-to-midpoint medians.
  • Triangle typeSide class and angle class, with documented numeric tolerances.

A height measures a perpendicular drop to the opposite side; a median reaches that side’s midpoint. The SVG sketch is labelled and accessible, but is normalised to fit and is not a scale drawing.

Why SSA may show two results

The SSA example a=6, b=8, A=30° has 2 valid branches; both are shown so you can compare their angles.

The sine rule can identify two angles with the same sine: an acute angle and its supplement. Each candidate is kept only when the remaining angle is positive. A branch that fails that check is not a triangle.

Assumptions and limits

This tool solves flat, Euclidean triangles from consistent measurements; it does not guess a unit or fit conflicting extra data.

  • Spherical geometryThe rules assume a flat plane, not triangles drawn on a globe.
  • Named unitsThe tool cannot know whether a side is in centimetres, metres or another unit.
  • Extra measurementsExactly three values are accepted; inconsistent redundant measurements are not averaged.

Angle classification treats values within 1e−9° of a right angle as right. Side classification treats lengths within 1e−9 times the largest side as equal. These tolerances change the type label only.

A triangle is often one part of a bigger shape problem. Other tools cover the pieces around it.

For the area of rectangles, circles and other shapes, use the area calculator or the circle calculator. If you know corner coordinates, the distance calculator gives side lengths, and the slope calculator gives angles.

For a sloped roof, the roofing calculator turns a footprint and pitch into rafter length and area.

Common mistakes

Match each side to its opposite angle, and do not mix length units.

  • Mistake: Entering A as the angle between b and c.

    Instead: A is opposite a; the angle between b and c is A.

  • Mistake: Using three angles and expecting a unique size.

    Instead: Add one side; the angles alone only set the shape.

  • Mistake: Treating SSA as always having one answer.

    Instead: Check whether the page shows both valid triangles.

  • Mistake: Reading the SVG as a scale drawing.

    Instead: Use the numeric sides and angles; the sketch is normalised.

More verified examples

For the AAS inputs a=5, A=30° and B=60°, the missing angle is 90°; the SAS example a=3, b=4, C=60° gives area 5.1962 square units.

Both examples are generated from the same tested calculation used by the form. The source list and equations describe the conventions used by the solver.

Sources and methodology

The solve rules follow standard Euclidean trigonometry; each displayed example is calculated by the tested triangle logic.

The law of sines and law of cosines describe side-angle relationships. Heron’s formula gives area from three sides; triangle area identities link area with radii and semi-perimeter. Sources were accessed 22 October 2026. Page details show the byline, review date and changelog.

Read how we test our calculators, or browse more maths calculators.

Frequently asked questions

Which measurements can I enter?

Enter exactly three known values: three sides (SSS), two sides and their included angle (SAS), two angles and one side (ASA or AAS), or two sides and a non-included angle (SSA). At least one value must be a side to set the scale.

Why can SSA have two answers?

The sine rule can give an angle and its supplement. Both may leave a positive third angle, so a=6, b=8, A=30° produces two valid triangles. The calculator shows both rather than choosing one.

Can three angles determine a triangle?

No. The angles fix the shape but not its size. Enter at least one side as well as two angles.

What units should I use?

Use the same length unit for all three side values. Angles must be in degrees. The tool labels lengths as units and area as square units because you choose the length unit.

Why are there two area values?

The result compares Heron's formula with half of ab sin C. They are equivalent for a valid triangle; for the 3–4–5 default both give 6 square units.

What do heights and medians mean?

A height is the perpendicular distance from a vertex to the opposite side. A median joins a vertex to the midpoint of the opposite side. Each is reported for all three sides.

Is the sketch drawn to scale?

No. The labelled SVG is normalised to fit its box, so it shows orientation and side/angle labels rather than exact proportions.

How does the calculator handle nearly right or equal-sided triangles?

It classifies side equality within a relative tolerance of 1e−9 times the largest side, and right angles within 1e−9 degrees. These tolerances affect labels only, not measurements.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 22 Oct 2026; next review due by . Found an error? Tell us.

Changelog

  • : First release. The 3–4–5 example has area 6 and perimeter 12; the 5–30°–60° AAS example has angle C=90°.