Naming and the five cases
The calculator uses the standard convention: the vertices are A, B and C, and each side is named after the opposite vertex, so side a is opposite angle A. Three independent pieces of information, at least one of them a side, fix a triangle:
| Case | You know | Method |
|---|---|---|
| SSS | three sides | law of cosines for the angles |
| SAS | two sides and the angle between them | law of cosines for the third side |
| ASA | two angles and the side between them | angle sum, then law of sines |
| AAS | two angles and a side opposite one of them | angle sum, then law of sines |
| SSA | two sides and an angle opposite one of them | law of sines — 0, 1 or 2 solutions |
Three angles alone (AAA) only fix the shape, not the size, so at least one side is always needed.
The laws of cosines and sines
Two laws do all the work:
a2 = b2 + c2 − 2bc·cos A (law of cosines)
a ÷ sin A = b ÷ sin B = c ÷ sin C = 2R (law of sines)
The law of cosines is the Pythagorean theorem with a correction term; when A = 90°, cos A = 0 and it becomes a2 = b2 + c2. The law of sines links each side to its opposite angle, and the common ratio equals the diameter 2R of the circumscribed circle.
The area comes from Heron's formula, which needs only the three sides:
s = (a + b + c) ÷ 2, Area = √(s(s − a)(s − b)(s − c))
The calculator also reports each height (h = 2 × Area ÷ base), the medians, the inradius r = Area ÷ s and the circumradius R. A triangle is only possible when the two shorter sides add up to more than the longest (the triangle inequality) and the angles total 180°; otherwise you get a clear message instead of a result.
Worked example (default SSS)
Sides a = 8, b = 6, c = 7.
- A = arccos((62 + 72 − 82) ÷ (2 × 6 × 7)) = arccos(21 ÷ 84) = arccos(0.25) = 75.52°.
- B = arccos((82 + 72 − 62) ÷ (2 × 8 × 7)) = arccos(0.6875) = 46.57°.
- C = 180° − 75.52° − 46.57° = 57.91°.
- s = (8 + 6 + 7) ÷ 2 = 10.5; Area = √(10.5 × 2.5 × 4.5 × 3.5) = √413.44 = 20.33.
- Perimeter 21, height to side a = 2 × 20.33 ÷ 8 = 5.08. All angles are below 90° and no sides are equal, so it is a scalene acute triangle.
The ambiguous case (SSA)
Given two sides and a non-included angle, side a acts like a swinging arm hinged at C. It may be too short to reach the base (no triangle), just touch it (one right triangle), or cut it in two places (two triangles). From the law of sines, sin B = b·sin A ÷ a, and both B and 180° − B can be valid.
Example: a = 5, b = 8, A = 30°. Then sin B = 8 × 0.5 ÷ 5 = 0.8, so B = 53.13° or 126.87°. The first gives C = 96.87°, c = 9.93 and area 19.86; the second gives C = 23.13°, c = 3.93 and area 7.86. The calculator shows both triangles side by side. When a ≥ b only one solution exists, and when a < b·sin A there is none. For quick right-triangle work choose the Right tab and enter any two values.
Frequently asked questions
Why does SSA sometimes give two triangles?
Because the sine of an angle and the sine of its supplement are equal, the law of sines gives two candidate angles. Both are valid whenever they leave room for a positive third angle.
How do I solve a right triangle quickly?
Choose the Right tab. The right angle is at C and c is the hypotenuse. Enter any two of leg a, leg b, hypotenuse c and angle A and leave the rest empty; for example legs 3 and 4 give hypotenuse 5.
Why can't I make a triangle from 1, 2 and 3?
The two shorter sides must add up to more than the longest. 1 + 2 equals 3, so the "triangle" collapses into a straight line with zero area.
Are angles in degrees or radians?
All angles are entered and shown in degrees. To convert, multiply degrees by π/180 to get radians.
Last reviewed: