Heron's formula (also known as Hero's formula) is a mathematical equation discovered by Hero of Alexandria around 60 AD. It provides an elegant way to calculate the area of a triangle when you know the lengths of all three sides, without needing to know any angles or heights.
where s is the semiperimeter: s = (a + b + c) / 2
Problem: Find the area of a triangle with sides a = 5, b = 6, c = 7
Step 1: Calculate the semiperimeter
s = (a + b + c) / 2 = (5 + 6 + 7) / 2 = 18 / 2 = 9
Step 2: Apply Heron's formula
Area = √[s(s-a)(s-b)(s-c)]
Area = √[9(9-5)(9-6)(9-7)]
Area = √[9 × 4 × 3 × 2]
Area = √[216]
Area = 14.696 square units
s = (3+4+5)/2 = 6
Area = √[6×3×2×1] = √36 = 6
Verification: (1/2)×base×height = (1/2)×3×4 = 6 ✓
s = (6+6+6)/2 = 9
Area = √[9×3×3×3] = √243 = 15.588
Formula: (√3/4)×a² = 15.588 ✓
s = (5+5+6)/2 = 8
Area = √[8×3×3×2] = √144 = 12
Perfect square result!
Triangle Inequality Theorem: For three sides to form a valid triangle, the sum of any two sides must be greater than the third side. Otherwise, the sides cannot connect to form a closed shape.
• a + b > c
• a + c > b
• b + c > a
Example of invalid triangle: Sides 2, 3, 10 cannot form a triangle because 2 + 3 = 5, which is not greater than 10.
Hero of Alexandria (c. 10–70 AD) was a Greek mathematician and engineer who made significant contributions to geometry, mechanics, and pneumatics. While the formula bears his name, some historians believe it may have been known earlier. Hero's work "Metrica" documented this formula along with methods for calculating areas and volumes of various geometric shapes.
Once you have the triangle's area from Heron's formula, you can calculate many other properties:
Try it yourself: Use the calculator above to experiment with different triangle side lengths. Try the preset buttons for common triangles, or enter your own values to see all the calculated properties including area, angles, heights, and classification!
Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.