📐 Triangle Solver
Enter any 3 known values (sides a, b, c and/or angles A, B, C). Leave the unknown fields blank.
Sides a, b, c are opposite to angles A, B, C respectively.
Results
How a Triangle Solver Actually Works — And Why It's More Interesting Than You Think
Most people encounter triangles in school and assume the whole topic is just memorizing a handful of formulas before moving on to something more exciting. But the moment you actually dig into how you can recover a complete triangle from just three pieces of information — any three pieces — you start to see one of geometry's quieter miracles. A triangle, in some deep sense, is extraordinarily rigid. Once you know enough about it, the rest falls into place automatically.
That's exactly what a triangle solver does. You give it three known values — maybe two sides and an angle, maybe three sides, maybe two angles and a side — and it hands back everything else: all three sides, all three angles, the area, the perimeter. No guessing, no approximation beyond rounding. The math is exact.
The Two Laws Doing All the Heavy Lifting
Under the hood, a triangle solver is really just two classical theorems applied carefully depending on what information you start with.
The Law of Cosines is the heavy-lifter for situations where you know all three sides (SSS) or two sides with the angle between them (SAS). It generalizes the Pythagorean theorem — in fact, if your triangle happens to be a right triangle, it collapses directly into a² + b² = c². The full form looks like this:
a² = b² + c² − 2bc · cos(A)
Rearranged, you can solve for any angle when you know all three sides:
cos(A) = (b² + c² − a²) / (2bc)
This is the formula that makes the SSS case trivially solvable — plug in your three sides, get cosine of each angle, take the inverse cosine, done.
The Law of Sines handles the remaining cases — particularly AAS (two angles and a non-included side) and ASA (two angles and the side between them). It says:
a / sin(A) = b / sin(B) = c / sin(C)
This ratio — side length divided by the sine of the opposite angle — is constant across the whole triangle and actually equals the diameter of the triangle's circumscribed circle. Once you know one complete side-angle pair, you can find any other side by cross-multiplying.
The Six Possible Cases — and the Sneaky One
Depending on what three values you enter, your triangle falls into one of four classic configuration types:
SSS (three sides): The most straightforward case. Plug sides into the rearranged Law of Cosines to get each angle one by one. The only way this fails is if the sides violate the triangle inequality — the sum of any two sides must exceed the third.
SAS (two sides, included angle): Use the Law of Cosines to find the missing side, then use the Law of Sines or Cosines again to recover the remaining angles. Clean and unambiguous.
ASA or AAS (two angles, one side): Since angles in a triangle always sum to 180°, two known angles immediately give you the third. Once all three angles are known, one side is enough to use the Law of Sines to find the other two.
SSA (two sides, non-included angle): This is the famous ambiguous case, and it's the one that trips students up most reliably. Knowing two sides and an angle that is NOT between them doesn't always uniquely define a triangle. There can be zero, one, or two valid solutions depending on the relative sizes of the sides. A proper solver checks the discriminant carefully and either reports no solution (when the opposite side is too short to reach the base) or picks the geometrically valid solution based on additional constraints.
Why Three Values Are Always Enough (When They Are)
Here's a thought that's worth sitting with: you can't solve a triangle from just any three values. Three angles alone (AAA) tell you the shape but not the size — infinitely many triangles share the same angles, just scaled differently. That's why the solver needs at least one side among your three inputs (unless you're only asking about angles, but then area and perimeter are undefined anyway).
But once you have a side, everything locks in. The triangle can't wiggle or stretch to a different size without changing that side length. This rigidity is part of why triangles are so useful in structural engineering — a triangulated frame is far stronger than a rectangular one because the geometry is fixed. A rectangle can shear into a parallelogram; a triangle simply cannot deform without changing its side lengths.
Computing Area — Two Ways
Once you have all three sides, Heron's formula gives you the area without needing any angles:
Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2 is the semi-perimeter.
Alternatively, if you have two sides and their included angle, the formula Area = ½ab·sin(C) is often cleaner. Both approaches give identical results — they're just different algebraic paths to the same geometric truth.
Real-World Uses You Might Not Expect
Triangle solving isn't just a classroom exercise. Surveyors use it constantly — a technique called triangulation lets you determine the position of a distant point by measuring two known baseline distances and the angles to the target. Before GPS, this was how entire continents were mapped.
In navigation, pilots and sailors use the triangle formed by their origin, destination, and the effect of wind or current to calculate the actual heading they need to fly or sail. In structural engineering, load analysis in roof trusses comes down to solving dozens of small triangles. Even in computer graphics, every 3D model you see on screen is a mesh of triangles solved in real time by your GPU.
Tips for Using This Solver
A few practical notes when entering values. Sides can be in any unit — meters, feet, inches — just keep them consistent. Angles must be in degrees and each must be strictly between 0° and 180°. If you enter all three angles with no sides, the solver can tell you the angles are self-consistent but has no way to determine actual lengths.
For the SSA case, this solver takes the primary (acute or obtuse, whichever is geometrically valid given the inputs) solution. If you're working a problem where the obtuse solution is specifically required, note that the alternate solution has angle B' = 180° − B.
The results are rounded to four decimal places, which is more than enough precision for most practical and exam purposes. If you need more decimal places for a high-precision engineering calculation, the underlying math here is exact — you'd just need a higher-precision implementation.
Whether you're checking your homework, prepping for a geometry exam, or working through a real surveying problem, the triangle solver reduces what used to be a multi-step pencil-and-paper exercise to a few seconds of work. The laws of sines and cosines have been known for centuries — the solver just makes them instantly accessible.