What this triangle calculator does
This tool takes the three side lengths of a triangle (the SSS case in geometry) and returns everything that can be derived from them: the area, the perimeter, the semi-perimeter, all three angles, the classification by sides (equilateral, isosceles, or scalene), and the classification by angles (acute, right, or obtuse). It verifies the triangle inequality before computing anything, so impossible inputs are rejected with a clear explanation rather than a nonsensical output. A graph draws the triangle at the correct shape so you can see it.
Formulas used
and similarly for B and C. Angles sum to 180°.
Variable definitions
- a, b, c — the three side lengths.
- P — perimeter.
- s — semi-perimeter (half the perimeter).
- A, B, C — the three interior angles, in degrees.
Worked examples
Example 1: 3-4-5 right triangle
- Triangle inequality: 3+4 > 5 ✓, 4+5 > 3 ✓, 5+3 > 4 ✓. Valid.
- Perimeter: P = 3 + 4 + 5 = 12, so s = 6.
- Area (Heron): A = √(6 × 3 × 2 × 1) = √36 = 6.
- Angles: cos C = (3² + 4² − 5²) / (2 × 3 × 4) = 0, so C = 90°. A = 36.87°, B = 53.13°.
- Classification: Scalene, right triangle.
Example 2: Equilateral triangle with side 6
- All three sides equal, so equilateral.
- Perimeter: 18, s = 9.
- Area: A = √(9 × 3 × 3 × 3) = √243 = 9√3 ≈ 15.588.
- Angles: all 60°.
- Classification: Equilateral, acute.
Example 3: Isosceles 5-5-6
- Triangle inequality: 5+5 > 6 ✓, etc. Valid.
- Perimeter: 16, s = 8.
- Area: A = √(8 × 3 × 3 × 2) = √144 = 12.
- Angles: the angle opposite the base 6 satisfies cos C = (25 + 25 − 36) / (2 × 5 × 5) = 14/50 = 0.28, so C ≈ 73.74°. The other two are (180 − 73.74)/2 ≈ 53.13°.
- Classification: Isosceles, acute.
Example 4: Obtuse triangle 2-3-4
- Triangle inequality: 2+3 > 4 ✓. Valid.
- Perimeter: 9, s = 4.5.
- Area: A = √(4.5 × 2.5 × 1.5 × 0.5) = √8.4375 ≈ 2.9047.
- Longest side c = 4: a² + b² = 4 + 9 = 13, c² = 16. Since 13 < 16, the triangle is obtuse.
- Classification: Scalene, obtuse.
Example 5: Impossible triangle 1-2-5
- Check the triangle inequality: 1 + 2 = 3, and 3 < 5. Fails.
- No triangle with sides 1, 2, 5 exists.
- Result: Invalid triangle.
Why Heron's formula is useful
In Class 9 and 10 problems, you often know the three sides of a triangle but not its height. Heron's formula lets you find the area without computing a height first. It is exact when the sides are integers and the semi-perimeter times the three differences is a perfect square, and reduces to the familiar ½ × base × height otherwise. It is one of the most elegant results in elementary geometry because it depends only on the three side lengths, symmetric in a, b, c.
Common mistakes to avoid
- Not checking the triangle inequality. Sides 2, 3, 7 will not form a triangle. Always verify a + b > c for the longest side c before computing anything.
- Using Heron's formula for an invalid triangle. If the inequality fails, one of the factors (s − a), (s − b), or (s − c) becomes negative, and the formula gives a meaningless answer or a NaN. Check validity first.
- Forgetting to take the square root. Heron's formula involves √(...), not just the product. Skipping the square root gives the square of the area.
- Mixing up which angle goes with which side. Angle A is opposite side a. The law of cosines formula for A uses sides b and c in the numerator and 2bc in the denominator.
- Assuming every 3-4-5-shaped triple is right. Multiples like 6-8-10 are also right, but 3-4-6 is not — always check the Pythagorean identity a² + b² = c².
- Rounding angles too early. Keep full precision in intermediate steps. Round the final angle values only at the end.
- Using degrees and radians interchangeably. This calculator reports degrees. When using trigonometry functions, remember that JavaScript's math functions work in radians unless you convert.
FAQ
What is the triangle inequality?
The triangle inequality states that the sum of any two sides of a triangle must be greater than the third side. If a + b ≤ c for any ordering of sides a, b, c, then no triangle with those side lengths exists.
What is Heron's formula?
Heron's formula gives the area of a triangle from its three sides: A = √(s(s − a)(s − b)(s − c)), where s is the semi-perimeter, s = (a + b + c) / 2. It works for every triangle, whether acute, right, or obtuse.
How do I find the angles of a triangle given three sides?
Use the law of cosines. For angle A opposite side a: cos A = (b² + c² − a²) / (2bc), so A = arccos((b² + c² − a²) / (2bc)). Repeat for each angle. The three angles should sum to 180°.
How do I classify a triangle by its sides?
Equilateral: all three sides equal. Isosceles: exactly two sides equal. Scalene: no sides equal. This calculator also classifies by angles using the Pythagorean check: if a² + b² = c² it is right; if greater, obtuse; if less, acute (assuming c is the longest side).
Can a triangle have a side of length zero?
No. A triangle must have three positive side lengths. A zero-length side would make the shape degenerate to a line segment.
What is the semi-perimeter?
The semi-perimeter is half the perimeter: s = (a + b + c) / 2. It is used in Heron's formula and appears in many other triangle formulas such as the inradius and circumradius.
Related tools
Related Hira Academy resources
Heron's formula and the triangle inequality are covered in Class 9 mathematics. Revise the theory with our free Class 9 notes and Class 10 notes.