How to use the triangle calculator
- Pick what you know. Three sides (SSS), two sides and the angle between them (SAS), two angles and the side between them (ASA), two angles and another side (AAS), or two sides and an angle that is not between them (SSA).
- Enter the three values. Side a is opposite angle A, side b opposite angle B and side c opposite angle C, the labeling used in OpenStax’s Algebra and Trigonometry 2e. Angles are in degrees.
- Read the solved triangle. The area is the large figure; the cards list all three sides and angles, the perimeter and the height to side c. The drawing updates as you type.
The calculator opens on the textbook’s Heron’s formula example (section 10.2, Example 5): sides of 10, 15 and 7. Its area is about 29.4 square units, and the largest angle is obtuse.
Law of Sines or Law of Cosines?
Two rules solve every triangle that a set of measurements determines. The Law of Sines relates each side to the sine of its opposite angle:
It needs a known side together with its opposite angle, so it handles ASA, AAS and SSA. The Law of Cosines generalizes the Pythagorean theorem:
It handles SAS, where the known angle sits between the known sides, and SSS, where no angle is known. When C = 90°, cos C = 0 and the formula reduces to a² + b² = c².
| You know | Start with |
|---|---|
| SSS | Law of Cosines for an angle |
| SAS | Law of Cosines for the third side |
| ASA, AAS | Angle sum, then Law of Sines |
| SSA | Law of Sines; check for two answers |
Three angles alone (AAA) don’t fix a size: every scaled copy of the triangle has the same angles, so the calculator asks for at least one side.
Worked examples from the textbook
AAS (section 10.1, Example 1). A = 50°, C = 30° and a = 10. The third angle is B = 180° − 50° − 30° = 100°. Then c = 10 × sin 30° ÷ sin 50° ≈ 6.5 and b = 10 × sin 100° ÷ sin 50° ≈ 12.9. Choose “2 angles, other side (AAS)” and enter 50, 100 and 10 to check.
SAS (10.2, Example 1). Sides 10 and 12 with a 30° angle between them: the third side is √(244 − 120√3) ≈ 6.013.
SSS (10.2, Example 2). With a = 20, b = 25 and c = 18, cos A = (25² + 18² − 20²) ÷ (2 × 25 × 18) = 549 ÷ 900 ≈ 0.61, so A ≈ 52.4°.
A boat trip (10.2, Example 4). A boat travels 10 miles, turns 20 degrees and travels 8 more. The angle inside the triangle is 180° − 20° = 160°, so the distance back to port is √(8² + 10² − 2 × 8 × 10 × cos 160°) ≈ 17.7 miles. The “Boat” example loads it.
The ambiguous case (SSA)
Two sides and an angle opposite one of them may describe no triangle, one triangle or two. The textbook calls this the ambiguous case. The Law of Sines gives sin B, but two angles between 0° and 180° share each sine value: B and 180° − B.
- Two triangles (Example 2). A = 35°, a = 6, b = 8. sin B = 8 sin 35° ÷ 6 ≈ 0.7648, so B ≈ 49.9° or 130.1°. Both leave room for a positive third angle (95.1° or 14.9°), so both triangles exist. Use the “Triangle 1” and “Triangle 2” switch to see each.
- One triangle (Example 3). C = 85°, c = 12, b = 9 gives B ≈ 48.3° or 131.7°, but 131.7° + 85° is more than 180°, so only the first works, with A ≈ 46.7°.
- No triangle (Example 4). A side of 4 opposite 50° and another side of 10 would need sin B ≈ 1.915. No angle has a sine above 1, so the side of 4 is too short to reach.
In the calculator, Example 3 is entered as side a = 12, side b = 9 and angle A = 85°, since the letters only name which side faces which angle.
Area, perimeter and height
Once all three sides are known, the calculator finds the area with Heron’s formula, which needs no height:
For sides 10, 15 and 7, s = 16 and the area is √(16 × 6 × 1 × 9) = √864 ≈ 29.4. With two sides and the angle between them you can also use Area = ½ab sin C, from section 10.1; both give the same answer.
The height to side c is 2 × area ÷ c, the perpendicular distance from vertex C to the line through side c. The perimeter is a + b + c, twice s.
Classifying the triangle
The note under the area names the triangle two ways. By sides: equilateral (all three equal), isosceles (two equal) or scalene (none equal). By angles: acute (all under 90°), right (one exactly 90°) or obtuse (one over 90°).
If the three sides you enter can’t close up, the calculator says so. The triangle inequality requires each side to be shorter than the other two combined; 1, 2 and 3 fail because 1 + 2 is not more than 3.
Rounding and checking
The textbook rounds to the nearest tenth; the calculator shows four decimal places so you can round to whatever your problem asks for. Rounding early can shift later answers slightly, so it is better to carry full precision and round at the end. A quick check: the angles should add to 180°, the longest side should face the largest angle, and the shortest side the smallest.
Where non-right triangles come up
Surveyors measure two distances and the angle between them to find a third distance they can’t walk, the SAS case. Navigators use it for courses with a turn, like the boat example. The textbook’s section 10.1 finds the altitude of an aircraft from two observing stations 20 miles apart with angles of elevation of 15° and 35°, an ASA problem followed by a right-triangle step. Builders use SSS to check that a triangular frame has the angles they expect, and Heron’s formula gives the area of a triangular lot from its three frontages.
Sources & assumptions
How this calculator gets its numbers. Full method: our methodology.
- Side a is opposite angle A, b opposite B and c opposite C; angles are in degrees.
- Law of Sines: a/sin A = b/sin B = c/sin C. Law of Cosines: c² = a² + b² − 2ab cos C.
- Area by Heron’s formula, √(s(s − a)(s − b)(s − c)) with s = half the perimeter; SSA can give 0, 1 or 2 triangles.
Sources
- OpenStax (Rice University), Algebra and Trigonometry 2e, 10.1 Non-right Triangles: Law of Sines. Law of Sines, the SSA ambiguous case (Examples 2–4) and area = ½ab sin C.
- OpenStax (Rice University), Algebra and Trigonometry 2e, 10.2 Non-right Triangles: Law of Cosines. Law of Cosines for SAS and SSS (Examples 1, 2 and 4) and Heron’s formula (Example 5: area ≈ 29.4).
Last reviewed . For a right triangle with SOH CAH TOA, use the right triangle calculator.
Frequently asked questions
How do I solve a triangle with three sides?
Use the Law of Cosines for one angle, for example cos A = (b² + c² − a²) ÷ 2bc, then repeat for a second angle and subtract both from 180° for the third.
When do I use the Law of Sines?
When you know a side and the angle opposite it, plus one more side or angle: the ASA, AAS and SSA cases.
Why are there two answers?
In the SSA case, two different angles can have the same sine, so two triangles may fit the measurements. The calculator shows both when they exist.
How do I find the area of a triangle without the height?
With three sides, use Heron’s formula. With two sides and the angle between them, use ½ab sin C.
Can I solve a triangle from three angles?
No. Three angles fix the shape but not the size, so you need at least one side length.
Does this work for right triangles?
Yes, since the laws apply to every triangle. The right triangle calculator is quicker when one angle is known to be 90°.