Triangle Calculator

Give any three values including at least one side, and get every side and angle, the area, perimeter, heights, medians, both radii, vertex coordinates and a diagram drawn to scale.

Just enter your values below — results update automatically.
Known values

Fill in any three boxes, at least one of them a side. Side a is opposite angle A, and so on. Leave the rest empty.

Side a
Side b
Side c

Angle A °
Angle B °
Angle C °

Angles in

Result
Which three values work
SSSAll three sides. Always gives exactly one triangle, if the sides can close at all.
SASTwo sides and the angle between them. Always one triangle.
ASATwo angles and the side between them. Always one triangle.
AASTwo angles and a side not between them. Also one triangle, since the third angle follows.
SSATwo sides and an angle not between them. Sometimes two triangles, sometimes none — the ambiguous case.
AAAThree angles. Fixes the shape but not the size, so it cannot be solved.
The formulas used
Law of sinesa / sin A = b / sin B = c / sin C
Law of cosinesc² = a² + b² − 2ab cos C
Heron's formulaarea = √( s(s−a)(s−b)(s−c) ), where s is the semiperimeter
Heighthᵀ = 2 × area / a
Medianmᵀ = √( (2b² + 2c² − a²) / 4 )
Inradiusr = area / s
CircumradiusR = a / (2 sin A)

Why three values, and why one must be a side

A triangle has six measurements — three sides and three angles — and they are not independent. Fix any three of them, with one caveat, and the other three follow with no choice left.

The caveat is that at least one must be a side. Three angles describe a shape but not a size: a triangle with angles 60°, 60° and 60° could be a centimetre across or a kilometre, and every one of that infinite family fits your three numbers equally well. One side pins the scale, and everything else is then forced.

This is also why the third angle is never really an extra piece of information. The three always add to 180°, so once you know two, the third is arithmetic rather than measurement.

The five solvable cases

The combinations have names, and knowing which one you have tells you which method applies and whether the answer is unique.

  • SSS — three sides. Solved by the law of cosines. One triangle, provided the sides can close at all.
  • SAS — two sides and the angle between them. Law of cosines for the third side, then the rest. Always one triangle.
  • ASA — two angles and the side between them. The third angle is immediate, then the law of sines. One triangle.
  • AAS — two angles and a side not between them. Same as ASA once the third angle is worked out. One triangle.
  • SSA — two sides and an angle not between them. This is the awkward one, and it gets its own section.

The pattern worth remembering: every case except SSA gives exactly one answer or none. SSA is the only one that can give two, and it does so for a reason that is easy to state.

The ambiguous case, and how to avoid it

Give two sides and the angle that sits between them and the triangle is locked. Give two sides and an angle somewhere else, and it may not be.

The reason is that sin(30°) and sin(150°) are both 0.5. When the law of sines hands back a sine, it cannot tell you which of two supplementary angles produced it — and often both give a valid triangle. Picture swinging a known side from a fixed point: it can cross the opposite line in two places, one place, or none at all.

So SSA has three possible outcomes:

  • No triangle — the swinging side is too short to reach.
  • One triangle — it just touches, or the geometry rules the obtuse option out.
  • Two triangles — it crosses twice, and both are genuinely valid answers.

This calculator reports the acute solution, which is the one intended in almost every textbook problem, and tells you plainly when no triangle exists at all. If your problem might be the two-solution kind, the fix is in the question rather than the tool: measure the angle between your two known sides instead, and the ambiguity disappears.

The two laws that do the work

The law of sines

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

Each side divided by the sine of its opposite angle gives the same number for all three — a number that happens to equal the diameter of the circle through all three vertices. It is the tool of choice whenever you have a matched side-and-angle pair plus one more thing.

The law of cosines

c² = a² + b² − 2ab cos C

This is Pythagoras with a correction term. When C is 90° the cosine is zero, the correction vanishes, and it collapses to c² = a² + b² exactly. When C is acute the term subtracts and the opposite side is shorter than Pythagoras would give; when obtuse, the cosine is negative and the side is longer. It handles SSS and SAS, the two cases the law of sines cannot start.

Three ways to find the area

  • Base and height: ½ × base × height. The familiar one, when you happen to know a perpendicular height.
  • Two sides and the included angle: ½ ab sin C. Convenient when you are already in the SAS case.
  • Heron's formula: √( s(s−a)(s−b)(s−c) ), with s the semiperimeter. Needs no angle and no choice of base.

This calculator uses Heron's formula, because by the time it reports anything all three sides are known and Heron needs nothing else. All three routes agree to the last decimal on the same triangle; they differ only in what they require you to have.

Heights, medians and the two circles

Heights (also called altitudes) run perpendicular from a vertex to the opposite side. There are three, one per side, and they are generally all different. On an obtuse triangle two of them land outside the triangle, on the extension of the side — which is correct, not an error.

Medians run from a vertex to the midpoint of the opposite side. All three cross at a single point, the centroid, which sits exactly two-thirds of the way along each median from its vertex. It is also the triangle's balance point: cut the shape out of card and it will balance on a pin at the centroid.

The inradius is the radius of the largest circle that fits inside, touching all three sides. Its centre, the incentre, is where the angle bisectors meet, and it is always inside the triangle.

The circumradius is the radius of the circle through all three vertices. Its centre is where the perpendicular bisectors of the sides meet, and unlike the incentre it can sit outside — on an obtuse triangle it always does. On a right triangle it lands exactly on the midpoint of the hypotenuse, which is why the circumradius of a right triangle is always half its longest side.

How triangles are named

Two independent labels, one for the sides and one for the angles, which is why a triangle usually carries both.

By sides: equilateral (all three equal), isosceles (exactly two equal), scalene (all different).

By angles: right (one angle exactly 90°), obtuse (one greater than 90°), acute (all three less than 90°).

Combine them and you get names like obtuse scalene or right isosceles. An equilateral triangle needs no angle word, since all three angles are necessarily 60°. Note also that no triangle can have two right angles or two obtuse ones — either would already use up 180° before the third angle got a share.

Where people go wrong

  • Mismatching a side with its angle. Side a is opposite angle A, not adjacent to it. Swapping them silently produces a different triangle.
  • Degrees typed while the calculator is in radians, or the reverse. The angle unit selector is directly under the inputs for exactly this reason.
  • Giving three angles and expecting a size. The most common refusal, and the reason is above.
  • Sides that cannot close. Any two must add to more than the third. Lengths of 1, 2 and 10 describe no triangle at all.
  • Ignoring the ambiguous case. If you have SSA, check whether a second answer exists before trusting the first.
  • Rounding partway. Feeding a rounded intermediate angle back in shifts everything downstream. Enter your original measurements and let the calculator carry full precision through.

Frequently asked questions

How many values do I need to solve a triangle?

Three, and at least one of them must be a side. Three angles fix the shape but not the size, because scaling a triangle up or down leaves every angle unchanged, so an infinite family of triangles matches any set of three angles. As soon as one side is pinned down, everything else follows.

What is the ambiguous case, and why does it matter?

When you give two sides and an angle that is not between them, two different triangles can sometimes satisfy the same three numbers, one acute and one obtuse. It happens because the sine of an angle and the sine of its supplement are equal, so the law of sines cannot tell them apart. Giving the angle that sits between your two known sides avoids the problem entirely.

What are the heights, medians, inradius and circumradius?

A height is the perpendicular distance from one vertex to the opposite side, and a triangle has three of them. A median runs from a vertex to the midpoint of the opposite side, and the three meet at the centroid. The inradius is the radius of the largest circle that fits inside the triangle, and the circumradius is the radius of the circle passing through all three vertices.

Why do the angles sometimes show as a fraction of pi?

Because some angles have exact radian values that are far more useful written as a fraction than as a decimal. Sixty degrees is pi over three, which is exact, while 1.0472 radians is a rounded approximation of the same thing. When an angle happens to land on one of these values the calculator shows the fraction alongside the decimal.

How is the area worked out?

From Heron's formula once all three sides are known: take the semiperimeter, which is half the perimeter, then multiply it by the semiperimeter minus each side in turn and take the square root of the product. It needs no angle and no choice of base, which makes it the reliable route once the triangle has been solved.

What do the vertex coordinates represent?

They place your triangle on a grid so you can plot it. Vertex A sits at the origin and vertex B on the positive x-axis at a distance equal to side c, which fixes the triangle in one particular position out of infinitely many. Every other point reported, including the centroid and the two circle centres, uses that same frame.

This calculator is provided for education and general reference. Results are computed in standard double-precision arithmetic and displayed to five decimal places. Where two sides and a non-included angle admit two valid triangles, the acute solution is reported; check whether the obtuse alternative also fits your problem before relying on it. Learn more about how we build and check these tools, or read our privacy policy.