How to use the triangle calculator
Each side and its opposite angle share a letter: side a faces angle A, and so on. Fill in exactly three of the six boxes, including at least one side, and leave the rest blank. Angles are in degrees. The calculator recognizes which case you have entered and solves it.
| You know | Case | Method |
|---|---|---|
| Three sides | SSS | Law of cosines for each angle |
| Two sides and the angle between them | SAS | Law of cosines for the third side, then SSS |
| Two angles and the side between them | ASA | Third angle = 180° − the others, then law of sines |
| Two angles and a side not between them | AAS | Same as ASA |
| Two sides and an angle not between them | SSA | May give 0, 1 or 2 triangles |
The results list all three sides and angles, the area, perimeter, the height to each side, the inradius and circumradius, and the triangle’s type. The type is acute, right or obtuse, and scalene, isosceles or equilateral.
Formulas used
- Law of cosines: c² = a² + b² − 2ab·cos C
- Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C
- Angle sum: A + B + C = 180°
- Area (Heron’s formula): √(s(s − a)(s − b)(s − c)), where s = (a + b + c) ÷ 2
- Height to side a: 2 × area ÷ a
- Inradius: area ÷ s. Circumradius: abc ÷ (4 × area)
For the SSA case, the calculator solves the law of cosines as a quadratic in the unknown side. This stays accurate when the answer is close to a right angle.
Worked example: the 3-4-5 triangle
The page opens with a = 3, b = 4, c = 5.
- Angle C: cos C = (3² + 4² − 5²) ÷ (2 × 3 × 4) = 0 ÷ 24 = 0, so C = 90°. This is a right triangle.
- Angle A: cos A = (4² + 5² − 3²) ÷ (2 × 4 × 5) = 32 ÷ 40 = 0.8, so A ≈ 36.87°.
- Angle B: 180° − 90° − 36.87° ≈ 53.13°.
- Area: s = 6, so the area is √(6 × 3 × 2 × 1) = √36 = 6.
- Heights: 2 × 6 ÷ 3 = 4, 2 × 6 ÷ 4 = 3, and 2 × 6 ÷ 5 = 2.4.
The ambiguous case in practice
Enter A = 30°, a = 6 and b = 10. Side a is longer than the height b·sin A = 5 but shorter than b, so it can meet the base in two places. The calculator returns two triangles:
- Triangle 1: B ≈ 56.44°, c ≈ 11.98
- Triangle 2: B ≈ 123.56°, c ≈ 5.34
If a were exactly 5, there would be one right triangle. If a were less than 5, there would be no triangle at all.
Limitations
- Angles must be in degrees and strictly between 0° and 180°.
- Results are rounded to 10 significant figures. Values typed from a rounded drawing may not close exactly, so the calculator checks the triangle inequality with a tiny tolerance.
- Entering more than three values is refused, even if they are consistent. Over-specified inputs rarely agree exactly after rounding.
- For a quick percentage comparison of two sides, such as the slope of a ramp, the percentage calculator can help.
Frequently asked questions
Why do I need at least one side?
Three angles fix a triangle's shape but not its size. A small triangle and a huge one can have identical angles, so at least one length is needed to pin down the actual dimensions.
What is the ambiguous case?
When you know two sides and an angle that is not between them (SSA), the side opposite the angle can sometimes swing to two different positions. That gives two valid triangles, one with an acute angle and one with an obtuse angle. The calculator shows both side by side.
Why does it say the sides cannot form a triangle?
In any triangle, the two shorter sides together must be longer than the longest side. Sides of 1, 2 and 5 fail this test. Sides of 1, 2 and 3 only reach the third side when lying flat, which is a straight line with no area.
Which side is opposite which angle?
By convention, side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C. Label your triangle this way before entering values.
Last reviewed: