The triangle calculator solves any triangle from three known values. Enter three sides, two sides and an angle, or two angles and a side. It finds the missing sides and angles, the area and perimeter, and draws the triangle to scale with every step shown. When two different triangles fit your values (the SSA case), it shows both.
Enter any 3 values, with at least one side. Leave the other boxes empty.
Enter any 2 values, with at least one side. The right angle is C.
Use the same unit for every side (cm, m, inches, feet). Answers are rounded to 4 decimal places.
In short: Enter any 3 values with at least one side. The calculator uses the law of cosines when you know three sides or two sides and the angle between them, and the law of sines in the other cases.
How to Use the Triangle Calculator
- Pick a tab. Use Any triangle for most problems, or Right triangle when one angle is 90°.
- Enter what you know. Side a is opposite angle A, side b is opposite angle B and side c is opposite angle C. Leave the unknown boxes empty.
- Press Solve triangle. You get all three sides and angles, the area, perimeter, heights, medians, inradius and circumradius.
- Check the steps. Each step shows the formula with your numbers, so you can copy the method into your homework.
Which Values Can You Enter?
Three values are enough to fix a triangle, as long as at least one of them is a side. The letters describe what you know, in order around the triangle (S = side, A = angle).
| Case | What you know | How it is solved | Answers |
|---|---|---|---|
| SSS | Three sides | Law of cosines for two angles, then 180° for the third | One (if the sides can form a triangle) |
| SAS | Two sides and the angle between them | Law of cosines for the third side | One |
| ASA | Two angles and the side between them | Third angle from 180°, then law of sines | One |
| AAS | Two angles and a side not between them | Third angle from 180°, then law of sines | One |
| SSA | Two sides and an angle not between them | Law of sines | None, one or two |
| AAA | Three angles only | Cannot be solved | Shape known, size unknown |
Triangle Formulas the Calculator Uses
| What it finds | Formula |
|---|---|
| Third angle | A + B + C = 180° |
| Law of sines | a ÷ sin A = b ÷ sin B = c ÷ sin C |
| Law of cosines | c² = a² + b² − 2ab × cos C |
| Area (two sides and the angle between) | Area = ½ × a × b × sin C |
| Area (three sides, Heron’s formula) | Area = √(s(s − a)(s − b)(s − c)), where s = (a + b + c) ÷ 2 |
| Height to side a | ha = 2 × Area ÷ a |
| Median to side a | ma = ½ × √(2b² + 2c² − a²) |
| Inradius (inscribed circle) | r = Area ÷ s |
| Circumradius (circle through the corners) | R = a ÷ (2 × sin A) |
For a right triangle, the law of cosines becomes the Pythagorean theorem, a² + b² = c², because cos 90° = 0. The calculator then uses sine, cosine and tangent (SOH CAH TOA) for the angles.
Worked Examples
Example: Three sides (SSS): a = 5, b = 6, c = 7. cos A = (36 + 49 − 25) ÷ 84 = 0.714286, so A = 44.42°. In the same way B = 57.12°, and C = 180° − 44.42° − 57.12° = 78.46°. With Heron’s formula, s = 9 and the area is √(9 × 4 × 3 × 2) = √216 = 14.70.
Example: Two sides and the angle between them (SAS): b = 8, c = 11, A = 37°. a² = 64 + 121 − 176 × cos 37° = 44.44, so a = 6.67. Then B = 46.24° and C = 96.76°.
Example: Two angles and a side (ASA): c = 10, A = 50°, B = 60°. C = 180° − 50° − 60° = 70°. Then a = 10 × sin 50° ÷ sin 70° = 8.15 and b = 10 × sin 60° ÷ sin 70° = 9.22.
Example: Right triangle: legs 3 and 4. The hypotenuse is √(9 + 16) = 5, angle A = 36.87°, angle B = 53.13° and the area is ½ × 3 × 4 = 6.
The SSA Ambiguous Case: 0, 1 or 2 Triangles
SSA is the only case where the answer is not always one triangle. Say you know side b, angle A and side a (the side opposite A). Drop a height from corner C to the base: h = b × sin A. Side a has to swing down from C and touch the base, and it may touch it twice, once or not at all.

| When angle A is acute | Number of triangles | Example (b = 8, A = 35°, h = 4.59) |
|---|---|---|
| a < h | None: side a is too short | a = 3 |
| a = h | One right triangle | b = 8, A = 30°, a = 4 |
| h < a < b | Two triangles | a = 6: B = 49.89° or 130.11° |
| a ≥ b | One triangle | a = 10: B = 27.31° |
If angle A is 90° or more, there is one triangle when a is longer than b and none otherwise. The calculator checks all of this for you, shows both triangles when there are two, and explains why when there are none.
Common Mistakes When Solving Triangles
- Wrong angle mode. On a handheld calculator, check it is set to degrees (DEG), not radians, before you use sin or cos.
- Mixing up labels. Each side has the same letter as the angle opposite it, not the angle next to it.
- Impossible sides. The longest side must be shorter than the other two added together. 2, 3 and 6 cannot form a triangle because 2 + 3 = 5 is less than 6.
- Missing the second SSA answer. sin 49.89° and sin 130.11° are equal, so arcsin only gives you the first one.
- Rounding too early. Keep at least four decimal places until the final answer.
Triangle Calculator: FAQ
How do I find the missing side of a triangle?
If you know two sides and the angle between them, use the law of cosines: c² = a² + b² − 2ab × cos C. If you know two angles and one side, use the law of sines: a ÷ sin A = b ÷ sin B. In a right triangle, use a² + b² = c².
How do I find a missing angle of a triangle?
If you know the other two angles, subtract them from 180°. If you know all three sides, use the law of cosines: cos A = (b² + c² − a²) ÷ (2bc).
Can you solve a triangle with only three angles?
No. Three angles give the shape but not the size, so there are endless triangles of different sizes. You need at least one side.
What is the ambiguous case of a triangle?
It is the SSA case, where you know two sides and an angle that is not between them. Depending on the lengths, no triangle, one triangle or two different triangles can fit.
How do I find the area of a triangle with three sides?
Use Heron’s formula. Find s = (a + b + c) ÷ 2, then area = √(s(s − a)(s − b)(s − c)). For sides 5, 6 and 7, s = 9 and the area is √216 ≈ 14.70.
Does the triangle calculator work for right triangles?
Yes. Use the Right triangle tab, enter any two values with at least one side, and it uses the Pythagorean theorem and SOH CAH TOA.
Is the triangle calculator free?
Yes. It is free, needs no sign-up and runs in your browser.
Sources and Further Reading
- OpenStax, Precalculus, Section 8.2: Non-right Triangles: Law of Cosines, Rice University.
- OpenStax via LibreTexts, Non-right Triangles: Law of Sines (including the ambiguous case).
- Math is Fun, Solving Triangles.
- Math is Fun, Heron’s Formula.
Also try the scientific calculator for sin, cos and square roots, the solve for x calculator, and our guide to square roots and cube roots.