Lelifi·tools

Heron's Formula Calculator

Heron's formula finds a triangle's area from its three sides. Area = sqrt(s(s-a)(s-b)(s-c)), where s = (a+b+c)/2. A 3-4-5 triangle has s = 6, so the area is sqrt(6 x 3 x 2 x 1) = 6. Sides that fail the triangle inequality have no real area.

Show the math
Reference triangles

All calculations run in your browser, and nothing you type is uploaded or stored.

Enter three side lengths to get the area by Heron's formula, with the semiperimeter, triangle inequality check, inradius, circumradius and all three angles shown.

By the Lelifi editors ·

Key takeaways

A 3-4-5 triangle, with the semiperimeter and the four factors markedr = 1b = 4a = 3c = 5s = (3 + 4 + 5) / 2 = 6s - a = 3s - b = 2s - c = 16 x 3 x 2 x 1 = 36Area = 6The incircle touches all three sides at a distance of 1 from each, which is area / s.
A 3-4-5 right triangle with its incircle, beside the semiperimeter working that gives an area of 6.
Area of five triangles from their sides aloneSidessArearRShape3, 4, 56612.5right5, 5, 57.510.82531.44342.8868equilateral6, 7, 810.520.33321.93654.1310scalene2, 3, 342.82840.70711.5910isosceles4, 4, 677.93731.13393.0238isoscelesr is the inradius (area / s) and R is the circumradius (abc / 4A).The circumradius grows fastest for the longest, thinnest shapes.
Table of five triangles with their semiperimeter, area, inradius and circumradius computed from the sides.
On this page
  1. Heron's formula in two steps
  2. Why the formula works
  3. The triangle inequality check
  4. Inradius, circumradius and angles from the same three sides
  5. Worked examples with the arithmetic shown
  6. Mistakes that give the wrong area
  7. Units, precision and where the answer lands
  8. Checking the result without a second formula

Heron's formula in two steps

Heron's formula turns three side lengths into an area without needing a height or an angle. The semiperimeter comes first, then the square root of a product of four terms:

s = (a + b + c) / 2
Area = the square root of s x (s - a) x (s - b) x (s - c)

The semiperimeter is half the perimeter, which is why the letter s is used. Every bracket subtracts one side from that half sum, and if one side is longer than the other two together, one bracket turns negative and the square root has no real answer. The formula is reporting a triangle that cannot exist, and the calculator above says so instead of printing a number.

A 3-4-5 triangle shows the whole method. The semiperimeter is (3 + 4 + 5) / 2 = 6, the four factors are 6, 3, 2 and 1, and their product is 6 x 3 x 2 x 1 = 36. The square root of 36 is 6, so the area is 6 square units, which matches the base times height answer of 4 x 3 / 2 = 6.

Why the formula works

The result is attributed to Heron of Alexandria, who recorded it in the Metrica around 60 AD, though the idea is older and Archimedes is credited with an earlier route to the same quantity. The proof that matters for daily use is short: drop a height onto the longest side, write the two right triangles that appear, and eliminate the height with the Pythagorean theorem. The algebra collapses to the four-factor product above.

Two familiar formulas fall out of it as special cases. For a right triangle with legs a and b, the product reduces until the area is a x b / 2. For an equilateral triangle with side a, the brackets all equal a/2 and the whole expression becomes the square root of 3 divided by 4, times a squared, which is the standard equilateral area formula.

Because no angle appears anywhere, the formula is useful exactly where angles are hard to measure: a plot of land with three straight fences, a triangular gable, a bracket cut to fit a corner. Measuring three sides with a tape is easier than sighting an angle with a protractor, and the area follows from the tape alone.

The price is numerical. For a triangle that is nearly flat, one bracket is close to zero and the square root amplifies any rounding in the sides, so a base and a height measured directly gives a steadier answer. For ordinary triangles the difference is far below the precision of a tape measure.

The triangle inequality check

Three lengths make a triangle only when each pair adds up to more than the third side. Written out, all three of these must hold: a + b is greater than c, a + c is greater than b, and b + c is greater than a. The calculator checks all three before it computes anything.

SidesShortest two, summedLongest sideVerdict
3, 4, 575Valid, area 6
5, 5, 5105Valid, equilateral
4, 4, 686Valid, isosceles
2, 3, 656Impossible, 5 is short of 6
1, 2, 333Degenerate, area 0
6, 7, 151315Impossible, 13 is short of 15

The 1-2-3 case is the boundary. The two short sides just reach the long one, so all three points sit on a straight line, the semiperimeter equals the longest side, one bracket is zero, and the area is zero. Anything that fails the test by a wider margin produces a negative bracket and no real area at all.

This check also catches typos. A plot recorded as 12, 15 and 30 metres is not a triangle, and the failure is more useful than an error message about square roots, because it points at the measurement rather than the arithmetic.

Inradius, circumradius and angles from the same three sides

The area is the gateway to the rest of the triangle. Three more quantities need nothing beyond the three sides.

Inradius: the circle that touches all three sides from inside has radius r = area / s. For 3-4-5 that is 6 / 6 = 1, and for 5-5-5 it is 10.8253 / 7.5 = 1.4434.

Circumradius: the circle through all three corners has radius R = a x b x c / (4 x area). For 3-4-5 that is 3 x 4 x 5 / (4 x 6) = 2.5, and the diameter of 5 matches the hypotenuse, as it must for a right triangle.

Angles: the law of cosines gives each one from the sides. Angle A is the inverse cosine of (b squared + c squared - a squared) / (2 x b x c), and the other two follow by rotating the letters. The three angles always add to 180 degrees, which is a free check on the arithmetic.

Sides a, b, cSemiperimeter sAreaInradius rCircumradius R
3, 4, 56612.5
5, 5, 57.510.82531.44342.8868
6, 7, 810.520.33321.93654.1310
2, 3, 342.82840.70711.5910
4, 4, 677.93731.13393.0238

The inradius and the area move together, since r is just the area divided by the semiperimeter. The circumradius is the one that jumps around: a long thin triangle pushes it far outside the shape, while an equilateral triangle keeps it close in, at twice the inradius.

Worked examples with the arithmetic shown

Three complete runs through the formula, at three different shapes.

A right triangle, sides 3, 4 and 5. The semiperimeter is (3 + 4 + 5) / 2 = 6. The brackets are 3, 2 and 1, and 6 x 3 x 2 x 1 = 36. The square root of 36 is 6, and the base times height route gives 4 x 3 / 2 = 6 as well.

An equilateral triangle, sides 5, 5 and 5. The semiperimeter is 15 / 2 = 7.5. Each bracket is 2.5, and 7.5 x 2.5 x 2.5 x 2.5 = 117.1875. The square root is 10.8253, close to the 10.8253 that the equilateral shortcut of 0.433 x 25 produces.

An isosceles triangle, sides 4, 4 and 6. The semiperimeter is 14 / 2 = 7, the brackets are 3, 3 and 1, and 7 x 3 x 3 x 1 = 63. The square root is 7.9373. Cutting the triangle down the middle gives two right triangles with legs 3 and the square root of 7, and 6 x 2.6458 / 2 lands on the same figure.

A scalene triangle, sides 6, 7 and 8. The semiperimeter is 21 / 2 = 10.5, the brackets are 4.5, 3.5 and 2.5, and the product is 413.4375. The square root is 20.3332. This shape has no symmetry to exploit, which is where the formula earns its keep.

Mistakes that give the wrong area

Five errors show up again and again in homework and in field notes.

There is a sixth trap that is not an error but a limitation. For a triangle with sides 1, 1 and 1.9999, one bracket is 0.00005 and the square root is sensitive to the last digit of the input. Measuring the base and the height is the better plan for shapes that flat, and the formula is the better plan for everything else.

Units, precision and where the answer lands

The area comes out in square units of whatever the sides were measured in. Sides in metres give square metres, sides in feet give square feet, and sides in centimetres give square centimetres. NIST SP 811 keeps the square metre as the SI unit of area, and every other area unit is a fixed multiple of it.

If the sides are inThe area is inTo convert the area
metressquare metresmultiply by 10.7639 for square feet
centimetressquare centimetresdivide by 10,000 for square metres
feetsquare feetdivide by 9 for square yards
yardssquare yardsdivide by 4,840 for acres
inchessquare inchesdivide by 144 for square feet

One acre is 4,046.8564224 square metres, so a triangular plot measured in metres can be reported in acres by dividing the square metre result by that number. A 30 by 40 by 50 metre triangle has an area of 600 square metres, which is 0.1483 acre, a small building lot.

Precision follows the tape, not the calculator. A side measured to the nearest centimetre supports an area to about three significant figures, and printing eight decimals suggests a survey that did not happen. Round the answer to the precision of the sides, and keep the extra digits only while the arithmetic is still running.

For scale, a 3-4-5 triangle of metres is 6 square metres, about the footprint of a small shed. The same numbers in feet give 6 square feet, a tiles-and-cutting-board size. The formula is unit-blind, so the label on the answer is entirely up to the input.

Checking the result without a second formula

A few quick tests catch most wrong answers before they leave the page.

The unit square is the last check. Take sides of 1, 1 and the square root of 2, which is a right isosceles triangle, and the formula returns 0.5, exactly half of the 1 by 1 square it sits in. MathWorld's entry on Heron's formula lists that case alongside the general proof for anyone who wants the algebra in full.

Frequently asked questions

What is Heron's formula?

Area equals the square root of s x (s - a) x (s - b) x (s - c), where s is the semiperimeter (a + b + c) / 2. It needs only the three side lengths.

What is the semiperimeter?

Half of the perimeter: s = (a + b + c) / 2. For sides 3, 4 and 5 the perimeter is 12 and s is 6.

What is the area of a 3-4-5 triangle?

6 square units. The semiperimeter is 6, the four factors are 6, 3, 2 and 1, and the square root of 36 is 6.

How do I know if three sides make a triangle?

Each pair must add up to more than the third side. Sides 2, 3 and 6 fail, because 2 + 3 = 5 is less than 6.

What happens if the sides fail the triangle inequality?

One bracket goes negative and the square root has no real value. The calculator reports that the sides do not form a triangle instead of returning a figure.

How do I find the area of an equilateral triangle with side 5?

The semiperimeter is 7.5, each bracket is 2.5, and the square root of 117.1875 is 10.8253 square units.

Can I use Heron's formula for a right triangle?

Yes. For legs a and b the brackets collapse and the answer equals a x b / 2, so 3-4-5 gives 6 either way.

How do I find the inradius from the sides?

Divide the area by the semiperimeter: r = area / s. The 3-4-5 triangle gives 6 / 6 = 1, and the 5-5-5 triangle gives 1.4434.

How do I find the circumradius from the sides?

R = a x b x c / (4 x area). For 3-4-5 that is 60 / 24 = 2.5, which is half the hypotenuse, as every right triangle requires.

Why is my area different when I round the sides?

A nearly flat triangle has one bracket close to zero, so small rounding errors grow in the square root. Keep two extra decimals in the semiperimeter and round only at the end.

Does the order of the sides change the answer?

No. The formula is symmetric in a, b and c, so 4-5-6 and 6-5-4 give the same area. If the order changes the result, a bracket was paired with the wrong side.

Can Heron's formula be used for a four-sided plot?

Not directly. A quadrilateral needs Brahmagupta's formula with four brackets, and that version only gives the exact area when the four corners lie on a circle.

What units does the area come out in?

Square units of the input. Sides in metres give square metres, sides in feet give square feet, and 600 square metres is 0.1483 acre.

How accurate is the result?

As accurate as the side measurements. Sides measured to the nearest centimetre support about three significant figures, and extra decimals do not add real precision.

Is there a version that uses an angle instead?

Yes. Area = 0.5 x a x b x sin C uses two sides and the included angle, and it is steadier than Heron's formula for triangles that are almost flat.

Spotted a wrong number or a broken result?

More Everyday tools

See all Everyday tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.