Triangle Calculator

Enter any three valid pieces of a triangle, three sides, two sides and the angle between them, or two angles and any side, and get every remaining side and angle plus area, heights, medians, inradius and circumradius, with a labeled drawing to scale.

What you get
  • All five input combinationsSSS, SAS, ASA, AAS and the ambiguous SSA case.
  • Everything about the triangleArea, heights, medians, inradius, circumradius and type.
  • Labeled drawing to scaleSee the shape you solved, with sides and angles marked.

What do you know?

Results update as you type

Three side lengths (SSS). Any three sides work as long as the triangle inequality holds: the two shorter sides together must exceed the longest.

Runs entirely in your browser. Nothing you type is sent or saved

Triangle guide

What solving a triangle means

A triangle has six measurable parts: three sides (a, b and c) and three angles (A, B and C, each written opposite its side). Once any three suitable parts are known, every other part is fixed, and finding them is called solving the triangle. That single idea powers surveying, navigation, carpentry roof cuts and every CAD program, because it means a partial sketch of a triangle determines the whole shape.

This page works with the 3-4-5 triangle as its running example: sides a = 3, b = 4 and c = 5. It is the most famous triangle in mathematics, and every number quoted below can be checked against the calculator above.

The five input combinations, and when each applies

  • SSS, three sides: the most common starting point. All three sides are known and every angle must be recovered with the law of cosines. The only restriction is the triangle inequality: the two shorter sides together must exceed the longest side. Sides 2, 3 and 10 cannot close into a triangle.
  • SAS, two sides and the included angle: two sides and the angle squeezed between them. The angle must be the included one; SAS with a non-included angle is the ambiguous case handled separately below. The third side comes from the law of cosines.
  • ASA, two angles and the side between them: two angles plus the side joining them. The third angle is forced, since all three must total 180°.
  • AAS, two angles and a non-included side: same mathematics as ASA, since knowing two angles always reveals the third.
  • SSA, two sides and a non-included angle: the trap mode. Depending on the numbers there may be no triangle, exactly one, or two different triangles, which is the ambiguous case described in its own section below.
Choosing in one question: "do my two angles include the side I know?" If yes, pick ASA. If you know two sides and the angle between them, pick SAS. If you know two sides and an angle opposite one of them, pick SSA and watch for two answers.

The law of sines and the law of cosines

Two theorems do all the work. The law of sines pairs each side with the sine of its opposite angle:

a ÷ sin A = b ÷ sin B = c ÷ sin C

any side over the sine of its opposite angle equals any other such pair

The law of cosines is the Pythagorean theorem corrected for non-right angles:

c2 = a2 + b2 - 2ab·cos C

when C = 90°, cos C = 0 and this collapses to a² + b² = c²

Worked check with 3-4-5: side a = 3 faces angle A, and cos A = (b² + c² - a²) ÷ (2bc) = (16 + 25 - 9) ÷ 40 = 0.8, so A = 36.87°. Similarly cos B = 0.6 gives B = 53.13°, and A + B + C = 36.87 + 53.13 + 90 = 180° exactly. The law of sines agrees: a ÷ sin A = 3 ÷ 0.6 = 5, and c ÷ sin C = 5 ÷ 1 = 5, the same ratio across all three pairs as promised.

Area, heights and the two radii

Three different routes all reach the same area, which makes them useful cross-checks:

  • Heron's formula, from the three sides alone: compute the semiperimeter s = (a + b + c) ÷ 2 = 6, then Area = √(s(s-a)(s-b)(s-c)) = √(6 × 3 × 2 × 1) = √36 = 6.
  • Two sides and the included angle: Area = ½ab·sin C = ½ × 3 × 4 × 1 = 6.
  • Base and height: the height to the hypotenuse of a right triangle is h = 2 × Area ÷ c = 12 ÷ 5 = 2.4.

The calculator reports all three heights (each side treated as the base, h = 2 × Area ÷ side, giving 4, 3 and 2.4 here), the inradius, the radius of the circle that fits snugly inside, computed as Area ÷ s = 6 ÷ 6 = 1, and the circumradius, the radius of the circle through all three corners, abc ÷ (4 × Area) = 60 ÷ 24 = 2.5. For any right triangle the circumradius is exactly half the hypotenuse, a quick check worth remembering.

The triangle is also classified by its angles (acute, right or obtuse) and by its sides (equilateral, isosceles or scalene). The 3-4-5 triangle is right and scalene.

The ambiguous case: SSA

Knowing two sides and a non-included angle does not always pin down one triangle. Suppose angle A and sides a and b are known, with b longer than a. Swinging side b from vertex A can miss the base line entirely (no triangle), graze it (one right triangle), cross it twice (two different triangles), or reach past it (one triangle). The deciding quantity is the height h = b·sin A:

  • No solution when a < h: the swinging side is too short to reach the base.
  • One right triangle when a = h exactly.
  • Two solutions when h < a < b: the side can land short or long, producing a sharp triangle and an obtuse twin. The calculator shows both, labeled "Solution 1" and "Solution 2".
  • One solution when a ≥ b, or whenever A is obtuse or right and a > b.

Try sides a = 6, b = 8 with A = 40° in SSA mode: the calculator reports two valid triangles, because 6 sits between the height 8 × sin 40° = 5.14 and the side 8. This is why surveyors avoid SSA setups, and why the calculator refuses to silently pick one answer for you.

Using the calculator well

  • Match the mode to your data: the mode buttons describe what you know, and the labeled diagram above the fields shows which letter is a side and which is an angle. Side a always sits opposite angle A.
  • Angles are entered in degrees, from 0 to 180, exclusive. If your source uses radians, multiply by 57.2958 to convert before entering.
  • Watch the sum of angles: in ASA or AAS mode, two angles totaling 90° or more leave nothing for the third, and the calculator flags it instead of producing a nonsensical triangle.
  • Units flow through: enter sides in inches and every length, height and radius comes back in inches, with the area in square inches. Mix nothing; geometry formulas assume consistent units.
  • Check the drawing: the labeled figure renders to scale from your numbers, so a triangle that looks impossible usually is. If SSA mode offers two solutions, the drawing shows the first; read both tables before deciding which triangle matches your problem.
  • Right triangles are simpler: if you know your triangle has a 90° angle, the dedicated right triangle calculator needs only two parts and adds trig ratios.

A short history of solving triangles

Solving triangles is as old as land measurement. Egyptian rope-stretchers used 3-4-5 knotted cords to lay out right angles after the Nile's floods, around 2000 BC. Greek astronomers made the law of sines and law of cosines precise: Hipparchus built the first chord tables around 150 BC, and Ptolemy's Almagest systematized them for predicting planetary positions.

The word trigonometry itself entered European science in 1595 through Bartholomaeus Pitiscus's book of that name, just as navigation was making triangle solving a commercial necessity: a ship fixes its position by measuring angles to known landmarks, which is the ASA case wearing a sextant. Heron of Alexandria, writing in the first century AD, left the area formula that bears his name, and Leonhard Euler connected inradius and circumradius with his famous inequality R ≥ 2r, satisfied with equality only by equilateral triangles.

Common questions

Exactly three, and at least one must be a side: three angles fix the shape but not the size, so triangles with angles 30-60-90 can be drawn at any scale. Any combination with at least one side and a suitable arrangement works, which is why the calculator offers SSS, SAS, ASA, AAS and SSA.

The triangle inequality requires each side to be shorter than the other two combined. For sides 2, 3 and 10, the 2 and 3 together span only 5, so they cannot reach around the 10 and the shape never closes. The same rule explains why 1, 1 and 2 fails: equality means the two short sides lie flat against the long one, giving a degenerate line rather than a triangle.

Only which side you know: ASA gives the side running between the two known angles, AAS gives a side opposite one of them. Because two angles always determine the third, both cases contain the same information, and the calculator's mathematics for the two modes is identical. Pick whichever matches your diagram.

Sine is symmetric about 90 degrees: an angle of 40 degrees and one of 140 degrees have the same sine. In SSA mode, the law of sines hands you sin B, and both B = 40 degrees and B = 140 degrees satisfy it. Each choice leads to a valid triangle with different remaining parts, so the calculator presents both instead of guessing. The case is called ambiguous for exactly this reason.

Two ways, both shown above. Heron's formula needs only the three sides: take half the perimeter, multiply it by itself minus each side in turn, and take the square root. The two-sides-plus-angle route multiplies the two known sides, multiplies by the sine of their included angle, and halves the product. The calculator computes the area once and then works backwards to derive every height from it.

The inradius is the radius of the largest circle that fits inside the triangle, touching all three sides, and it equals the area divided by the semiperimeter. The circumradius is the radius of the circle passing through all three corners, equal to the product of the sides divided by four times the area. For a right triangle the circumradius always equals half the hypotenuse, and Euler proved the two radii can never get closer than R = 2r, with equality only for equilateral triangles.

No. Every formula here assumes flat, Euclidean geometry, where angles total exactly 180 degrees. Triangles drawn on a sphere's surface, the kind used in global navigation, have angles that sum to more than 180 degrees and obey spherical versions of the sine and cosine laws. For everyday, workshop and map-on-a-plane problems, the flat assumption is the correct one.

No. Every calculation runs in your browser. Nothing is stored or transmitted.

Three parts in. Every answer out.

Browse all math calculators