Heron's Formula Calculator
Results
Formulas Used in Heron's Formula Calculator
Full formula reference: Heron's Formula
In-Depth Tutorial: Heron's Formula Calculator
Heron's formula (named after Heron of Alexandria, ~10-70 AD) computes the area of any triangle from JUST its three side lengths — no height, no angles needed. This is one of the most elegantly useful formulas in geometry: given a, b, c, the area is
Area = √(s(s − a)(s − b)(s − c))
where s = (a + b + c) / 2 is the semi-perimeter (half the perimeter). This tutorial walks through how to apply the formula, two equivalent forms, the famous proof, and when Heron's formula is preferable to the ½×base×height approach.
Why Heron's formula is useful
The standard triangle area formula is A = ½ × base × height. This requires knowing a base AND the perpendicular height to that base. In many problems you have the three side lengths but not the height — and computing the height first requires extra steps (often the Pythagorean theorem on a constructed perpendicular).
Heron's formula skips the height entirely. Three sides in, area out. One step.
The two equivalent forms
Form 1 (semi-perimeter): Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2.
Form 2 (no semi-perimeter): Area = (1/4)√(4a²b² − (a² + b² − c²)²).
Form 2 avoids computing s separately but introduces a more complex expression under the square root. Form 1 is more common in textbooks and easier to write by hand. Both produce the same answer.
Worked example 1 — the 3-4-5 right triangle
Sides: a = 3, b = 4, c = 5 (the famous Pythagorean triple).
Step 1: s = (3 + 4 + 5) / 2 = 6.
Step 2: Area = √(6 × (6−3) × (6−4) × (6−5)) = √(6 × 3 × 2 × 1) = √36 = 6.
Verification: since 3-4-5 is right-angled with legs 3 and 4, area = ½ × 3 × 4 = 6. ✓ Heron agrees.
Worked example 2 — scalene triangle
Sides: a = 7, b = 8, c = 9.
s = (7 + 8 + 9) / 2 = 12.
Area = √(12 × 5 × 4 × 3) = √720 ≈ 26.833.
No "nice" height is needed — and computing the height by hand would require either Pythagorean theorem applied to a constructed perpendicular, or trigonometry. Heron skips all that.
Worked example 3 — equilateral triangle
For an equilateral triangle with side s: a = b = c = s. Then semi-perimeter = 3s/2.
Area = √((3s/2)(3s/2 − s)(3s/2 − s)(3s/2 − s)) = √((3s/2)(s/2)³) = √(3s⁴/16) = (s²√3)/4.
This matches the classic equilateral area formula A = (√3 / 4) s² — confirming Heron's formula reduces to the standard formula in this special case.
The proof — outline
Heron's formula can be proven several ways. The most accessible:
- Drop an altitude from one vertex (say C) to the opposite side (c). This creates two right triangles inside the original.
- Let the altitude have length h, and let the altitude land on side c at distance x from one endpoint.
- By Pythagorean theorem: in one sub-triangle, x² + h² = b². In the other, (c − x)² + h² = a².
- Subtract: (c − x)² − x² = a² − b², giving x = (b² + c² − a²) / (2c).
- Substitute back to find h² in terms of a, b, c.
- Area = ½ × c × h. Expanding and simplifying gives Heron's formula.
The algebra is messy but every step is elementary. Try it as an exercise — it is one of the most satisfying derivations in plane geometry.
Numerical stability concern
The straight Heron formula has a numerical pitfall for "needle" triangles (very long and thin, where one side is nearly as long as the sum of the other two). In that case, (s − longest) becomes very small, and the multiplication s(s−a)(s−b)(s−c) suffers catastrophic cancellation in floating-point arithmetic.
The fix is Kahan's stable Heron formula:
Sort sides so a ≥ b ≥ c. Then:
Area = (1/4)√((a + (b + c))(c − (a − b))(c + (a − b))(a + (b − c)))
This rearrangement avoids the cancellation issue. Our calculator uses the Kahan-stable form for production accuracy (see calculator-engine.js, v1.20.62-68 fixes).
Real-world applications
- Surveying. Surveyors often measure three side lengths but not interior heights. Heron's gives them area directly.
- Construction. Computing material needs for a triangular roof or land plot from boundary measurements.
- Computer graphics. Triangle area is used in collision detection, lighting calculations (barycentric coordinates), and mesh quality metrics.
- Map / GIS. Computing the area of a triangular GPS-defined region from its three corner coordinates (which give you three side lengths via distance formula).
When NOT to use Heron's formula
- When you know base and height already. Just use A = ½ × base × height — fewer operations, more numerically stable.
- When you have two sides and an included angle (SAS). Use A = ½ × a × b × sin(C) — direct trigonometry.
- For right triangles where you can identify the legs. Use A = ½ × leg1 × leg2.
Heron is the "no special info" fallback — when none of these shortcuts apply.
Common mistakes
- Forgetting the semi-perimeter is HALF the perimeter. s = (a + b + c) / 2. Some students use s = a + b + c (full perimeter) and get the wrong answer.
- Sign errors inside the square root. If (s − a), (s − b), or (s − c) comes out negative, your three sides don't form a valid triangle (violates the triangle inequality). Check inputs.
- Computing s(s−a)(s−b)(s−c) and forgetting to take the square root. The formula gives Area² inside the square root. Take √ at the end.
- Mixing units. All three sides must be in the same unit. Area comes out in squared units of that same unit.
Frequently Asked Questions – Heron's Formula Calculator
It calculates the area of a triangle from three side lengths alone: Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2 is the semi-perimeter.
When you know all three sides but not the height — common in SSS problems. It avoids needing to find a perpendicular height first.
s = (a + b + c) / 2 — simply half the perimeter. It is an intermediate step used inside the formula.
Yes — free and unlimited.
The formula's name is at least partly misattributed
The formula carries Heron of Alexandria's name because Heron's first-century-CE book Metrica contains the oldest surviving proof. But evidence collected by historians of mathematics points elsewhere for the original discovery. Multiple references in commentaries on Archimedes attribute knowledge of the result to Archimedes himself (~250 BCE), roughly three centuries before Heron lived. The Archimedean version, if it existed, has been lost.
The same formula was independently rediscovered in the East. The Song-dynasty Chinese mathematician Qin Jiushao (秦九韶) wrote down an equivalent expression in his 1247 Shushu Jiuzhang (《數書九章》). His version doesn't use a semi-perimeter; it computes the area from the squares of the three sides directly:
16 · Area² = (a² + b² + c²)² − 2(a⁴ + b⁴ + c⁴)
Algebraically identical to Heron's expression, but written in a form better suited to the counting-board arithmetic of 13th-century China. Two civilizations, three different presentations, all the same theorem — which is part of what makes the result so foundational.
The same idea generalizes to four sides and to three dimensions
Heron's formula computes area from three side lengths. Two famous generalizations extend the same approach to more complicated figures.
Brahmagupta's formula (628 CE) handles cyclic quadrilaterals — four-sided figures whose vertices all lie on a circle. For sides a, b, c, d and semiperimeter s = (a+b+c+d)/2:
Area = √((s−a)(s−b)(s−c)(s−d))
Set d = 0 and the formula collapses to Heron's exactly — a quadrilateral with one zero-length side is just a triangle. So Heron's formula is the degenerate case of Brahmagupta's. For general (non-cyclic) quadrilaterals, Bretschneider's formula adds a correction term involving the sum of opposite angles, and both formulas reduce to Brahmagupta's when the angle sum is 180° (the cyclic condition).
The Cayley–Menger determinant generalizes Heron's formula to higher dimensions. For a tetrahedron with six edge lengths, a 5×5 determinant computes its volume directly — no need to find heights, faces, or vertex coordinates first. The pattern continues: an n-dimensional simplex's volume is computable from its n(n+1)/2 edge lengths via an (n+2)×(n+2) determinant. Each is a direct ancestor of Heron's planar formula.
Edge cases and quirks the basic FAQ doesn't cover
What are Heronian triangles, and why do they matter?
A Heronian triangle is one whose three side lengths and area are all rational numbers. The 3-4-5 right triangle is the simplest example — sides 3, 4, 5 (integers); area 6 (integer). Less obvious examples: 5-5-6 with area 12; 13-14-15 with area 84. These are useful for textbook problems because the answer comes out clean rather than as an irrational square root. They're also a small piece of number theory in disguise: a triangle is Heronian if and only if it can be split by an altitude into two right triangles with rational sides. Lists of Heronian triangles are commonly used to generate plausible-looking practice problems where Heron's formula returns a recognizable integer rather than something like 19.7989 — making it easier for students to check their arithmetic.
Why does Heron's formula suffer floating-point issues that the basic (1/2)·base·height formula doesn't?
Both produce the same area exactly when computed with infinite precision. The difference is how rounding errors compound. The base-height formula does one multiplication and one halving — two operations, each adding negligible error. Heron's formula multiplies four numbers under a square root, and when one of those numbers (typically s − c for the longest side c) is very small relative to the others, the product underflows and the small-number error dominates. For everyday triangles with no extreme aspect ratios, both formulas give answers correct to all displayed digits. For "needle" triangles (long, thin) the rearranged Kahan-stable form is needed — which the calculator uses automatically.
What's the tradeoff between Heron's formula and the trigonometric area formula (1/2)·a·b·sin(C)?
Information requirements vs. operation count. (1/2)·a·b·sin(C) needs two sides and the included angle (three inputs); Heron's needs all three sides (three inputs). Equivalent count, different mix. If you measured a triangle with a tape measure you'd more easily have all three sides. If you measured it with a protractor and a tape measure, you'd more easily have one angle and two sides. Both formulas are exact and both are about the same numerical complexity. The trigonometric form is slightly more stable for very thin triangles (no cancellation issues), but only barely.
If I have GPS coordinates of three points, should I use Heron's formula?
Convert the three coordinates to three side lengths with the distance formula first, then apply Heron's. This is exactly how mapping software calculates the area of triangular survey plots — and it's why Heron's formula is built into many GIS libraries despite the existence of the more direct "shoelace formula" that operates on coordinates without the side-length intermediate step. For three points specifically, both approaches give the same answer in similar amounts of arithmetic. For more than three points (general polygons), the shoelace formula is faster because Heron would require triangulating the polygon first.