Triangle Solver, Explained

After reading this you can take any three facts about a triangle (three sides, two sides and an angle, or two angles and a side) and find every remaining side, angle and the area by hand, checking the calculator's output as you go.

A triangle has six measurements: three sides a, b, c and three angles A, B, C. You do not need all six to pin down the shape. In most cases three well-chosen values fix the triangle completely. The Triangle Solver takes those three and reports the other three, plus the area and the circumscribed and inscribed radii.

Here is the hook. Give it sides a = 5, b = 6, c = 7 and it returns angles of about 44.42°, 57.12° and 78.46°, with area 14.70. Nothing was measured with a protractor. Two trig laws did all the work, and the rest of this article shows exactly how.

The four solvable cases

The naming convention lists what you know in order around the triangle. S means a side, A means an angle.

SSS
All three sides. The triangle is fixed up to reflection, so there is always exactly one solution when the sides can form a triangle.
SAS
Two sides and the angle between them. Also fixed: one solution.
ASA
Two angles and the side between them. The third angle is forced, so one solution.
SSA
Two sides and an angle opposite one of them. This is the tricky case. It can give zero, one or two triangles.

One combination is missing on purpose: AAA. Three angles fix the shape but not the size. A triangle with angles 60°, 60°, 60° and side 1 looks the same as one with side 100. Angles alone give no scale, so AAA has infinitely many solutions and is not a solvable case here.

The included angle in SAS matters. In this tool the field Angle C is the angle between sides a and b. Feeding an angle that is not between the two known sides turns the problem into SSA, with all the ambiguity that brings.

The two laws that solve every case

Everything reduces to two identities. The law of cosines links three sides and one angle:

c^2 = a^2 + b^2 - 2ab\cos C

Here c is the side opposite angle C. When C = 90^\circ the cosine is zero and this collapses to the Pythagorean theorem c^2 = a^2 + b^2. The cosine term is the correction for a non-right angle. A wider angle (larger C) pushes c longer; a narrower one pulls it shorter.

The law of sines links each side to the sine of its opposite angle:

\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C} = 2R

Every ratio equals the same constant, and that constant is 2R, twice the radius of the circle through all three vertices. That single fact gives you the circumradius for free once you know any side and its opposite angle.

The strategy per case: SSS and SAS start with the law of cosines because you have enough sides for it. ASA and SSA start with the law of sines because you have an angle paired with its opposite side. After the first unknown falls, the rest follow, and the angles must sum to 180^\circ.

Worked example: SSS with sides 5, 6, 7

Solving a = 5, b = 6, c = 7

This is the demo data. Set Mode to SSS, enter the three sides, and press Calculate. Here is the arithmetic behind the answer.

  1. Find angle A (opposite a = 5) from the law of cosines rearranged: \cos A = \frac{b^2 + c^2 - a^2}{2bc} = \frac{36 + 49 - 25}{2 \cdot 6 \cdot 7} = \frac{60}{84} = 0.7143, so A = 44.42^\circ.
  2. Find angle B: \cos B = \frac{a^2 + c^2 - b^2}{2ac} = \frac{25 + 49 - 36}{2 \cdot 5 \cdot 7} = \frac{38}{70} = 0.5429, so B = 57.12^\circ.
  3. Get angle C from the sum: C = 180^\circ - 44.42^\circ - 57.12^\circ = 78.46^\circ.
  4. Area from Heron's formula. The semiperimeter is s = (5 + 6 + 7)/2 = 9, so area = \sqrt{9(9-5)(9-6)(9-7)} = \sqrt{9 \cdot 4 \cdot 3 \cdot 2} = \sqrt{216} = 14.70.

Cross-check with the law of sines: 2R = a/\sin A = 5/\sin 44.42^\circ = 5/0.7000 = 7.143, so the circumradius is 3.572. The inradius is area over semiperimeter, r = 14.70/9 = 1.633.

Reading the results

The solver reports more than the three unknowns. Each extra value answers a specific question.

Area
The enclosed region. Two shortcuts appear above: Heron's formula when you have three sides, and \text{Area} = \tfrac{1}{2}ab\sin C when you have two sides and the included angle.
Circumradius R
Radius of the circle passing through all three vertices, equal to \frac{a}{2\sin A}. For the example above, 3.572.
Inradius r
Radius of the largest circle that fits inside, touching all three sides. It equals area divided by semiperimeter, 1.633 here.
Perimeter
The sum of the sides, 18 in the example.

Angles are reported in degrees. If your three angles do not add to 180 in the output, something upstream is wrong, usually an impossible side combination.

The SSA ambiguous case

SSA is the only case that can produce two valid triangles, and understanding why is the point of this section. You know two sides and an angle opposite one of them. Suppose you know a, b and angle A. The law of sines gives \sin B = \frac{b \sin A}{a}. A sine value between 0 and 1 has two angles that produce it: an acute one and its supplement. If both keep the angle total under 180°, both triangles are real.

Watch the sign of the count. If \sin B \gt 1 the equation has no solution and no triangle exists. If \sin B = 1 there is exactly one right triangle. When the side opposite the known angle is shorter than the other side but long enough to reach, you get two triangles, and the tool reports both.

Concrete numbers. Take a = 7, b = 10, A = 40^\circ. Then \sin B = \frac{10 \sin 40^\circ}{7} = \frac{6.428}{7} = 0.9183. The two candidate angles are B = 66.71^\circ and B = 113.29^\circ. Both leave room under 180° once you add A = 40°, so both triangles are valid: one with C = 73.29^\circ and one with C = 26.71^\circ.

As angle A grows, sin B rises. Left of the marker near 44.4° two triangles exist. At the marker sin B hits 1 (one right triangle). To the right sin B exceeds 1 and no triangle fits.

With sides a = 7 and b = 10 fixed, increasing angle A raises sin B = 10 sin A / 7. At A = 40° that is 0.9183, giving two triangles (B = 66.71° or 113.29°). Near A = 44.4° sin B reaches 1 and the two solutions merge into one right triangle. Above that, sin B exceeds 1 and no triangle exists.

Common mistakes

The errors below cause most wrong answers.

  • Mislabeling the included angle. In SAS the angle sits between the two known sides. Use Angle C for the angle between a and b. Supplying an angle opposite one of the sides is SSA, not SAS.
  • Ignoring the second SSA triangle. If you only take the acute solution for angle B, you may miss a perfectly valid obtuse triangle. Always check whether the supplement also works.
  • Feeding sides that violate the triangle inequality. Any side must be shorter than the sum of the other two. Sides 2, 3, 10 fail because 2 + 3 = 5 \lt 10, so no triangle exists.
  • Rounding angles too early. If you round angle A to 44° before computing area, your area drifts. Keep four or more digits until the final step.

Related tools

If one of your angles is exactly 90°, the Right triangle calculator is faster because it uses Pythagoras directly. For the sine and cosine values behind the laws here, see the Trigonometry calculator. To measure a shape with more than three corners, use the Polygon area calculator from vertex coordinates or the Regular polygon calculator for equal-sided figures. The circumscribed and inscribed circles reported here can be studied further with the Circle calculator. If your triangle sits in a coordinate plane, the Coordinate geometry toolkit handles distances and midpoints, and the 3D solid geometry calculator extends the idea to volumes.

Frequently asked questions

Why can I not solve a triangle from three angles?

Three angles fix the shape but not the size. Angles 50°, 60°, 70° describe an infinite family of similar triangles at every scale. You need at least one side length to set the size.

How do I know if my three sides form a real triangle?

Check the triangle inequality: each side must be less than the sum of the other two. Sides 5, 6, 7 pass because 5 + 6 = 11 \gt 7. Sides 1, 1, 3 fail.

When exactly does SSA give two answers?

When the side opposite the known angle is shorter than the other known side, yet still long enough to reach the base. Numerically, when \frac{b\sin A}{a} lands strictly between 0 and 1 and both the acute angle and its supplement keep the total below 180°.

What is the difference between the two radii reported?

The circumradius R is the circle through all three corners, given by \frac{a}{2\sin A}. The inradius r is the circle inside touching all three sides, given by area over semiperimeter. For the 5, 6, 7 triangle they are 3.572 and 1.633.

Which area formula is most accurate?

All the formulas agree exactly in theory. In practice Heron's formula can lose precision for very thin triangles, so \tfrac{1}{2}ab\sin C is preferable when you already know two sides and their included angle.