Triangles

Heron's Formula for Triangle Area, With a Proof You Can Follow

Get the area of a triangle from its three side lengths alone, with a step-by-step proof and checked examples.

Key takeaways

  • The area is √(s(s − a)(s − b)(s − c)), where s is half the perimeter.
  • The proof finds the unknown height with the Pythagorean theorem and then factors a difference of squares twice.
  • The three lengths must satisfy the triangle inequality, or the quantity under the root is zero or negative.
  • For very thin triangles, calculators lose accuracy in the standard form, and a reordered version works better.

Heron's formula gives the area of a triangle from its three side lengths, with no height and no angle. If the sides are a, b and c, first find s = (a + b + c)/2, called the semiperimeter. The area is then √(s(s − a)(s − b)(s − c)).

That makes it the natural tool when you can measure sides but not heights, as with a triangular garden bed or a plot paced out with a tape. Below are worked examples, a proof that uses only the Pythagorean theorem and factoring, and the places where people slip.

How to use it in four steps

  1. Write down the three side lengths in the same unit.
  2. Add them and halve the total to get s.
  3. Subtract each side from s. All three results should be positive.
  4. Multiply s by the three differences and take the square root.

The answer comes out in square units. If the sides are in meters, the area is in square meters.

A built-in check helps: the three differences s − a, s − b and s − c always add up to s. If yours do not, there is an arithmetic slip before you ever reach the square root.

Worked examples

Sides s s − a, s − b, s − c Product Area
3, 4, 5 6 3, 2, 1 36 6
13, 14, 15 21 8, 7, 6 7056 84
7, 8, 9 12 5, 4, 3 720 about 26.83
10, 10, 12 16 6, 6, 4 2304 48

The first row is a right triangle, so you can check it directly: half of 3 × 4 is 6. The last row is isosceles. Its height to the side of length 12 is √(10² − 6²) = 8, and half of 12 × 8 is 48.

The 7-8-9 row shows that whole number sides do not guarantee a whole number area. Here the exact value is √720 = 12√5.

Heron's formula, step by step, for sides 13, 14, 15
1 Semiperimeter s = (13 + 14 + 15) / 2 = 21 2 Differences 21 − 13 = 8, 21 − 14 = 7, 21 − 15 = 6 3 Product 21 × 8 × 7 × 6 = 7056 4 Square root √7056 = 84 square units Semiperimeter s = (13 + 14 + 15) / 2 = 21 1 Differences 21 − 13 = 8, 21 − 14 = 7, 21 − 15 = 6 2 Product 21 × 8 × 7 × 6 = 7056 3 Square root √7056 = 84 square units 4

When Heron is the right choice

Several formulas give a triangle's area, and the best one depends on what you know.

What you know Quickest route
A base and its height Half of base × height
Three side lengths Heron's formula
Corner coordinates Shoelace formula
Perimeter and incircle radius Radius × half the perimeter

Heron's formula is the one to reach for when measuring a height would mean constructing a right angle you cannot easily make. Outdoors, three tape measurements between three stakes are far more reliable than a perpendicular judged by eye.

It also handles a polygon plot: split it along diagonals, measure every segment, apply the formula to each triangle and add the results. Before trusting the total, check that each triple of lengths satisfies the triangle inequality, since a mistyped value often shows up that way.

If a height is what you actually want, run the process backward. For the 13-14-15 triangle the area is 84, so the height to the side of length 14 is 2 × 84 / 14 = 12.

The proof: find the height

Put side c along the bottom, running from A to B. Drop a perpendicular from C to the line AB and call its length h. Let x be the distance from A to the foot of that perpendicular, measured positive toward B.

The two right triangles that appear give two equations by the Pythagorean theorem:

b² = x² + h²
a² = (c − x)² + h²

Subtract the first from the second. The h² terms cancel, and so does x²:

a² − b² = c² − 2cx
x = (b² + c² − a²) / (2c)

If the foot falls outside segment AB, then x is negative or larger than c. Both equations still hold, because they involve only squares of x and c − x. The proof therefore covers obtuse triangles with no extra work.

The proof: factor twice

Call the area K. Since K = ch/2, you have 16K² = 4c²h². Replace h² with b² − x², then substitute for x:

16K² = 4c²b² − 4c²x²
     = (2bc)² − (b² + c² − a²)²

This is a difference of two squares, so it factors:

16K² = [2bc − (b² + c² − a²)] × [2bc + (b² + c² − a²)]
     = [a² − (b − c)²] × [(b + c)² − a²]

Each bracket is again a difference of squares:

16K² = (a − b + c)(a + b − c)(b + c − a)(b + c + a)

Now translate into s. The last factor is 2s. The factor b + c − a equals 2s − 2a, which is 2(s − a). In the same way a − b + c = 2(s − b) and a + b − c = 2(s − c). The right side becomes 16 s(s − a)(s − b)(s − c). Cancel the 16 and take the positive square root to finish.

Why the answer behaves sensibly

A good formula should survive a few tests. Swapping any two sides leaves it unchanged, as an area must be, since naming is arbitrary. Doubling every side doubles s and each difference, so the product grows by a factor of 16 and the area by 4. That matches how area scales with length.

If one side equals the sum of the other two, say c = a + b, then s = c and s − c = 0. The area is zero, which is right for a triangle squashed flat. If one side is longer than the sum, s − c is negative while the other factors are positive, and no real square root exists. This is the algebra rediscovering which three lengths can form a triangle.

The proof traced with numbers

Follow the algebra with a = 15, b = 13 and c = 14, which makes the abstract steps concrete.

x = (13² + 14² − 15²) / (2 × 14) = 140 / 28 = 5
h² = 13² − 5² = 144, so h = 12
16K² = (2 × 13 × 14)² − (13² + 14² − 15²)²
     = 364² − 140²
     = (364 − 140)(364 + 140)
     = 224 × 504 = 112896
K² = 7056, so K = 84

The same 112896 equals the product 16 × 21 × 6 × 8 × 7, one factor for the 16 and four for s and its differences. Seeing the two routes meet is a good way to check that you have not swapped a sign in the factoring.

Notice which step does the real work. The height is hard to see from the side lengths, but its square is easy. Because the formula needs only h², no square root appears until the very end.

The semiperimeter also appears in the incircle. If r is the radius of the largest circle inside the triangle, then K = rs. Combined with Heron, this gives r² = (s − a)(s − b)(s − c)/s. For 13, 14, 15 that is 336/21 = 16, so r = 4. The three differences have their own meaning as the tangent lengths from the corners.

For four-sided figures whose corners lie on a circle, Brahmagupta's formula has the same shape with four factors. Let one side shrink to zero and Heron's formula drops out.

If you know corner coordinates instead of lengths, the shoelace formula is usually quicker and avoids square roots altogether.

Precision and measurement

Consider a needle-shaped triangle, where one side is nearly the sum of the others. Computing s − a then subtracts two nearly equal numbers, and rounding error can swamp the result. Software often uses a rearrangement associated with William Kahan. Sort the sides so that a ≥ b ≥ c, keep the parentheses exactly, and compute:

K = ¼ √[(a + (b + c)) (c − (a − b)) (c + (a − b)) (a + (b − c))]

Field measurements raise a related issue. In a thin triangle, a small error in one length changes the area by a large fraction. When you can choose, divide a plot into triangles that are reasonably plump.

This is general information about calculation. A legal boundary or a recorded land area needs a licensed surveyor.

A little history

The formula is named for Heron of Alexandria, who gave a proof in his work called Metrica, usually dated to the first century CE. Some later Arabic writers credit the result to Archimedes. In China, Qin Jiushao stated an equivalent rule in the thirteenth century.

Heron's own argument was geometric and used the incircle and similar triangles, quite unlike the algebra above. A product of four lengths had no direct meaning in classical Greek geometry, which handled lengths, areas and volumes, so taking the square root of such a product was a bold step.

Common mistakes

  • Using the full perimeter in place of s. For 3, 4, 5 this gives a wildly large number.
  • Forgetting the square root at the end.
  • Rounding s or the differences too early. Keep exact values until the last step.
  • Mixing units, such as two sides in meters and one in centimeters.
  • Applying the formula on a curved surface. It is a theorem of the flat plane, and large triangles on a globe need spherical methods.

Questions people ask

Does it matter which side I call a?

No. The product s(s − a)(s − b)(s − c) contains one factor for each side, and reordering the factors changes nothing.

Can the area be irrational when all sides are whole numbers?

Yes, and it usually is. The triangle with sides 2, 3 and 4 has s = 9/2 and area √135 / 4, about 2.9. Leave the root in place when an exact answer is wanted, and round only at the end.

Practice

Find the area of the triangle with sides 5, 5 and 6. You should get s = 8, a product of 8 × 3 × 3 × 2 = 144 and an area of 12. Then confirm it with the height, which is 4. For a harder one, try 9, 10 and 17, where s = 18 and the area comes to 36.

Written for 4Geometry with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 57 articles in Triangles →

Latest news on this topic