How to Solve Any Triangle: A Practical Triangle Calculator Guide
Solve a triangle from given sides and angles using the law of sines, law of cosines, and area formulas — with a worked example and real layout uses.
How to Solve Any Triangle: A Practical Triangle Calculator Guide
"Solving a triangle" means finding every side and every angle when you start with only a few of them. A triangle has six measurements — three sides and three angles — and if you know the right three, the other three are locked in. The hard part is picking the correct tool for the three you happen to have. This guide walks through how the triangle calculator decides between the law of sines and the law of cosines, how it computes area, and why some inputs produce two valid answers instead of one.
The Five Cases You Actually Meet
Every triangle problem reduces to one of five named cases, based on what you know:
- SSS — three sides.
- SAS — two sides and the angle between them.
- ASA — two angles and the side between them.
- AAS — two angles and a side opposite one of them.
- SSA — two sides and an angle that is not between them (the "ambiguous case").
Notice that you always need at least one side. Three angles alone (AAA) fixes the shape but not the size — there are infinitely many triangles with angles 60°, 60°, 60°, from a postage stamp to a football field. So the calculator asks you to pick a case first, then only shows the input fields that case requires. That single choice tells it which law to reach for.
Law of Cosines: When You Have No Ratio Yet
The law of cosines is the workhorse for SSS and SAS, because both of those cases start without a matched side-and-angle pair to anchor a ratio. For a triangle with sides a, b, c and the angle C opposite side c:
c² = a² + b² − 2ab·cos C
In SAS you know a, b, and the included angle C, so the formula hands you c directly. In SSS you know all three sides and rearrange to recover an angle:
cos C = (a² + b² − c²) / (2ab)
This is the only relationship that works when you have nothing but sides, which is exactly why the calculator routes SSS and SAS through it.
Law of Sines: Extending a Ratio You Already Own
Once you have one matched pair — a side and the angle opposite it — the law of sines lets you chase the rest:
a / sin A = b / sin B = c / sin C
ASA, AAS, and SSA all give you (or quickly produce) such a pair, so the calculator uses the law of sines to fill in the remaining sides and angles. A simple way to remember the split: cosines turns sides into angles when you have no ratio yet; sines stretches an existing ratio to find everything else. If you want a refresher on the sine, cosine, and tangent values feeding these formulas, the trigonometry calculator is a useful companion.
A Worked Example: The SAS Case
Take a homework-style problem: triangle ABC has a = 8, b = 6, and the included angle C = 40°. Find side c and the area.
First the missing side, via the law of cosines:
c² = 8² + 6² − 2·8·6·cos 40°
c² = 64 + 36 − 96·(0.766)
c² = 100 − 73.5 = 26.5
c = 5.15
Now the area, straight from the SAS data using the sine area formula:
area = ½·a·b·sin C = ½·8·6·sin 40°
area = 24·0.643 = 15.4 square units
From here the law of sines recovers the other two angles: sin A = a·sin C / c gives A ≈ 87.3°, and B is whatever is left after subtracting A and C from 180°, so B ≈ 52.7°. The whole triangle is solved from three numbers. The calculator does all of this in one screen and also reports area through Heron's formula, √(s(s−a)(s−b)(s−c)) with s = (a+b+c)/2, which matches the ½·a·b·sin C result to the last digit.
The Ambiguous SSA Case
SSA is the one that trips people up. When you know two sides and a non-included angle — say side a opposite angle A, plus side b — the law of sines gives sin B = b·sin A / a. The arcsine of that value has two angles in the range (0°, 180°): an acute one and its supplement. Both can sometimes form a real triangle.
Picture side a as a compass arm swinging from the end of side b. If a is long enough, it crosses the base line in two places, producing two genuinely different triangles that share the same a, b, and A. The calculator checks each candidate against the angle-sum rule and shows you one solution, two solutions, or none — drawn side by side so you can see the two shapes instead of guessing. That visual is what finally makes the "two answers" idea click for most students.
Where I Reach for It
I keep this calculator open whenever I'm sketching a build, not just for math drills. Last month I was planning a small lean-to: I knew the back wall ran 2.4 m, the roof needed a 25° pitch, and the front post was a fixed height. Rather than draft it three times in CAD, I dropped the two known measurements into the SAS and ASA modes and read off the rafter length and the apex angle in seconds. The to-scale drawing caught a mistake immediately — my first angle entry produced a triangle far flatter than the slope I wanted, so I knew I'd typed the wrong figure before cutting any wood. For layout work, seeing the shape redraw as you type is worth as much as the numbers.
What the Calculator Refuses to Do
Not every set of inputs describes a real triangle, and a good solver says so plainly. Two rules govern validity. The triangle inequality: each side must be shorter than the sum of the other two, so 1, 1, 5 can never close. The angle sum: the three interior angles must total exactly 180°, so if two known angles already reach 180° or more, nothing is left to solve. The calculator flags both, plus the SSA "side too short to reach the base" case, with a plain-language message rather than a misleading number. That honesty matters most in construction and CAD work, where a silently wrong answer costs material.
For problems that branch into algebra — finding side lengths that satisfy an equation, say — pair this with the quadratic equation solver. Between solving the triangle and solving the supporting algebra, most geometry homework and most quick layout questions fall apart in a couple of minutes.
Made by Toolora · Updated 2026-06-13