Triangle Solver
Solve a triangle from SSS, SAS or ASA inputs.
Overview
The Triangle Solver takes three input values — three sides (SSS), two sides and the included angle (SAS) or two angles and a side (ASA) — and fills in the remaining sides, angles and area. It is the geometry sidekick you wish you had during exam time.
It is built for trigonometry students checking homework, surveyors triangulating a plot, builders verifying that a corner is actually 90 degrees and game developers cooking up collision tests. The formulas are well-known but easy to mix up; the solver picks the right one and shows its work.
How it works
For three given sides, the Law of Cosines computes each angle: cos A = (b² + c² - a²) / (2 * b * c). For SAS, the same law gives the third side, then the Law of Sines finds the remaining angles. For ASA, the missing angle is 180° - A - B, then the Law of Sines finds the missing sides.
Area uses whichever formula fits the inputs: (1/2) * b * c * sin A for SAS, Heron's formula sqrt(s * (s - a) * (s - b) * (s - c)) (with s = (a + b + c) / 2) for SSS, and a Sines-based equivalent for ASA.
Examples
SSS: a=3, b=4, c=5 → A=36.87°, B=53.13°, C=90°, area 6
SAS: a=5, b=7, C=60° → c ≈ 6.24, A ≈ 44.4°, B ≈ 75.6°, area ≈ 15.16
ASA: A=30°, B=60°, c=10 → C=90°, a=5, b ≈ 8.66, area ≈ 21.65
FAQ
What if the inputs don't form a valid triangle?
For SSS, the longest side must be shorter than the sum of the other two. For ASA, the angle sum must be less than 180°. The solver flags impossible cases.
Is there an SSA mode?
SSA (two sides and a non-included angle) is the ambiguous case — it can have zero, one or two valid triangles. The solver focuses on the unambiguous SSS, SAS and ASA configurations.
How accurate is the area for very thin triangles?
Heron's formula can lose precision when one side approaches the sum of the other two. For such cases, a numerically stabler reformulation is used internally.
Does it handle obtuse triangles?
Yes — angles up to 180° (exclusive) are supported. An obtuse angle shows up as a value greater than 90°.
Can it tell me if the triangle is right-angled?
Implicitly yes — if any computed angle equals 90° (within floating-point tolerance), the triangle is right-angled.