CalcPro

Triangle Calculator

Area, perimeter and angles of a triangle from its three sides.

Understanding the calculation

This calculator takes three side lengths and derives everything else about the triangle: its area, perimeter, and all three interior angles. It's useful whenever you know the side lengths but need the other measurements—common in surveying, construction, and geometry problems.

The formula

Area = √[s(s−a)(s−b)(s−c)] where s = (a+b+c)/2 (Heron's formula); Perimeter = a+b+c; cos(A) = (b²+c²−a²)/(2bc) (law of cosines)

Worked example

Suppose you have a triangle with sides a = 5 cm, b = 6 cm, and c = 7 cm.

Step 1: Check validity

  • Is 5 + 6 > 7? Yes (11 > 7) ✓
  • Is 5 + 7 > 6? Yes (12 > 6) ✓
  • Is 6 + 7 > 5? Yes (13 > 5) ✓

The sides form a valid triangle.

Step 2: Calculate perimeter

  • Perimeter = 5 + 6 + 7 = 18 cm

Step 3: Calculate area using Heron's formula

  • Semi-perimeter: s = (5 + 6 + 7) / 2 = 9
  • Area = √[9 × (9−5) × (9−6) × (9−7)]
  • Area = √[9 × 4 × 3 × 2]
  • Area = √216 ≈ 14.7 cm²

Step 4: Calculate angles using the law of cosines

For angle A (opposite side a = 5):

  • cos(A) = (6² + 7² − 5²) / (2 × 6 × 7)
  • cos(A) = (36 + 49 − 25) / 84 = 60 / 84 ≈ 0.714
  • A = arccos(0.714) ≈ 44.4°

For angle B (opposite side b = 6):

  • cos(B) = (5² + 7² − 6²) / (2 × 5 × 7)
  • cos(B) = (25 + 49 − 36) / 70 = 38 / 70 ≈ 0.543
  • B = arccos(0.543) ≈ 57.1°

For angle C (opposite side c = 7):

  • C = 180° − 44.4° − 57.1° = 78.5°

Verification: 44.4° + 57.1° + 78.5° = 180° ✓

Common mistakes

Forgetting to check the triangle inequality. Before calculating, always verify that the sum of any two sides exceeds the third. Sides like 1, 2, and 5 will fail because 1 + 2 = 3, which is less than 5—no triangle exists.

Mixing up units. If your sides are in centimetres, the perimeter is in centimetres but the area is in square centimetres. Always label your answer with the correct unit.

Rounding too early. In Heron's formula and the law of cosines, keep extra decimal places during intermediate steps. Rounding the semi-perimeter or the cosine value prematurely can skew your final answer. Round only the final result.

Assuming you can use this for quadrilaterals or other shapes. This calculator is built specifically for triangles. Four-sided or irregular polygons need different formulas.

Frequently asked questions

What is Heron's formula?

Heron's formula calculates a triangle's area from its three side lengths alone, without needing the height. It uses the semi-perimeter (half the perimeter) as a stepping stone: Area = √[s(s−a)(s−b)(s−c)], where s = (a+b+c)/2. This is especially useful when you don't know or can't easily measure the height.

Can I use this calculator for any triangle?

Yes, as long as the three sides form a valid triangle. The sides must satisfy the triangle inequality: the sum of any two sides must be greater than the third side. If they don't, no triangle can exist.

How are the angles calculated?

The calculator uses the law of cosines to find each angle. For angle A (opposite side a): cos(A) = (b² + c² − a²) / (2bc). Once you have the cosine, you take the inverse cosine (arccos) to get the angle in degrees.

What's the difference between perimeter and area?

Perimeter is the total distance around the triangle (a + b + c), measured in linear units like cm or m. Area is the space inside the triangle, measured in square units like cm² or m².

Why do my three angles add up to 180°?

This is a fundamental property of all triangles: the sum of interior angles always equals exactly 180°. It's a useful check—if your three angles don't sum to 180°, something went wrong.

What if my sides don't form a valid triangle?

The calculator will alert you. For a valid triangle, the sum of any two sides must be strictly greater than the third. For example, sides 1, 2, and 3 cannot form a triangle because 1 + 2 = 3 (not greater than 3).