Tools · Math & Statistics

Area Calculator

Area and perimeter for ten shapes, from the dimensions you can put a tape measure on. Every answer comes with the formula it used and your own numbers substituted into it, so you can check the working rather than trust the box.

Ten shapes, including Heron’s formulaHow it worksInputs stay on this device
Your inputs

Circle

A triangle appears twice because there are two ways to measure one: a base with a height, or the three sides on their own.

Centre to edge — half the distance across. If you measured all the way across, halve it first.

Your inputs are calculated locally and are not stored.
Area78.53981634

In square units of whatever you measured in — square inches if you typed inches, square metres if you typed metres.

Area
78.53981634
Circumference
31.41592654
Area formula, with your numbers
A = πr² = π × 5² = 78.53981634
Circumference formula, with your numbers
C = 2πr = 2 × π × 5 = 31.41592654
  • Every length here is a plain number with no unit attached. The area comes back in the square of whatever you measured in, so the geometry is the same whether you work in millimetres or miles.
Formula & methodology

Ten shapes, ten formulas, no units

Each shape has its own closed-form area, and all of them are exact. The lengths you type carry no unit, so the answer comes back in the square of whatever you measured in — square centimetres if you worked in centimetres, square feet if you worked in feet. The one rule is that every length in a single calculation has to be in the same unit.

Arect = lw  •  Acircle= πr²  •  Atri= ½bh  •  Atrap = ½(a + b)h  •  Aellipse= πab  •  Asector= (θ ÷ 360)πr²  •  An-gon = ns² ÷ (4 tan(π ÷ n))
l, w
The two sides of a rectangle
r
Radius — centre to edge, which is half the distance all the way across
b, h
A base and the perpendicular height standing on it, not the length of a slanted side
a, b (trapezoid)
The two parallel sides, with h the gap between them
a, b (ellipse)
Semi-major and semi-minor axes — half the long way across and half the short way
θ
The angle a sector sweeps, in degrees out of 360
n, s
Sides and side length of a regular polygon — all sides equal and all angles equal

Perimeters follow the same pattern with two honest exceptions. Three of these shapes — the base-and-height triangle, the parallelogram, and the trapezoid — have an area that their inputs pin down exactly and an outline those inputs leave completely free, so no perimeter is reported for them. The ellipse has a perimeter that exists but has no elementary formula, so what is shown is Ramanujan’s approximation, marked as such.

Heron’s formula

Three lengths, no angle, and an exact answer

Take a triangle with sides 13, 14 and 15. Add them and halve the total: the semi-perimeter s is 21. Then subtract each side from it — 21 − 13 = 8, 21 − 14 = 7, 21 − 15 = 6 — multiply all four numbers together, and take the square root:

A = √(21 × 8 × 7 × 6) = √7056 = 84, exactly.

It is worth sitting with how strange that is. Nothing was measured at an angle. No perpendicular was dropped. No sine, no cosine, no coordinate system. Three lengths went in and a whole number came out, and the same procedure works for every triangle that exists.

The reason it can work at all is that a triangle is rigid. Give someone three rods and there is exactly one triangle they can build from them, up to flipping and turning it. That is the SSS congruence theorem, and it is why three lengths are enough to determine everything else — the angles, the heights, the area. It is also why bracing a square frame with a diagonal stops it collapsing into a rhombus: you have replaced a shape that flexes with two that cannot.

Now try the same thing with four sides. Four rods hinged at the corners make a linkage, not a shape — push it and it folds flat, area going smoothly from some maximum down to nothing while every side length stays exactly the same. So there is no Heron’s formula for a general quadrilateral, and there cannot be. The nearest thing, Brahmagupta’s formula, works only when the four corners happen to lie on a circle, which is precisely the extra condition that stops the linkage flexing.

The contrast with the ordinary ½bh is the point. Take the same 13-14-15 triangle and use 14 as the base: ½ × 14 × h = 84 gives a height of exactly 12. But nothing in the three side lengths announced that 12 — you would have had to construct the perpendicular and measure it. Choose the side of length 15 as the base instead and the height becomes 11.2; choose 13 and it becomes 12.923. Three different heights, three different bases, one area. Heron’s formula skips the construction entirely.

There is one more thing the formula does quietly. Feed it three lengths that cannot close — 1, 2 and 10, say — and the product under the square root goes negative. The formula does not return a wrong answer; it returns no real answer at all, because there is no such triangle. This calculator turns that into a refusal with a plain explanation rather than letting a NaN through.

The formula is named for Heron of Alexandria, who gave a proof in his Metrica around 60 AD. Arab commentators credited it to Archimedes some three centuries earlier, which is plausible and unprovable. Either way it is roughly two thousand years old, and the fastest way to get the area of an awkward plot of land is still to break it into triangles and measure their sides.

Worked example

A circle of radius 5, checked by hand

The default here is a circle with a radius of 5. The area is π times the radius squared: π × 25 = 78.53981634. The circumference is 2πr = 2 × π × 5 = 31.41592654. Note that the radius is half the way across, not all the way — measuring a 10-unit circle and typing 10 is the single most common mistake on this page, and it quadruples the answer.

A quarter of that circle — a sector sweeping 90° — has an area of (90 ÷ 360) × 78.53981634 = 19.63495408. Its outline is not a quarter of the circumference, though. It is the arc, 31.41592654 ÷ 4 = 7.853981634, plus the two straight cuts of length 5 each, giving 17.85398163. Cutting a shape out adds edges that were not there before, which is the same reason you cannot add up the perimeters of rooms to get the perimeter of a house.

An ellipse with semi-axes 5 and 3 encloses π × 5 × 3 = 47.1238898— the same formula as the circle, with the two half-widths in place of r used twice. Its perimeter comes back as 25.52699886 and is marked approximate, because that number is Ramanujan’s series rather than a closed form. A circle enclosing the same area would need a radius of 3.873 and would have a perimeter of 24.33: the ellipse is longer round the edge for the same area inside, which is the general rule that the circle is the most economical outline there is.

Related but different

Which area tool you actually want

If you have the dimensions of a shape and want the area it encloses, you are on the right page; if you are measuring rooms to price a job, you want square footage; and if you already have an area and need it in different units, you want the converter.

  • Square footage calculator — for a project rather than a shape. It adds several rooms together, keeps them as a list you can edit, and multiplies the total by a price per square foot. Use it for flooring, paint, turf, or tile.
  • Area converter — for units rather than geometry. Square metres to square feet, acres to hectares, square miles to square kilometres. Use it once you have an area and need it expressed differently.

The three overlap in a search box and nowhere else. Keeping them apart is what lets this page carry ten shapes and Heron’s formula instead of a room list and a units table crammed in beside them.

Assumptions

What this calculator assumes

  • Every length is a plain number with no unit, and all the lengths in one calculation are in the same unit. The area comes back in that unit squared. Nothing here converts between units.
  • Heights are perpendicular. The height of a triangle, parallelogram, or trapezoid is measured at a right angle to the base, not along a slanted side. Using the slant instead overstates every one of those areas.
  • Radii are half-widths. Circles, sectors and ellipses are described by the distance from the centre to the edge, not the distance all the way across.
  • A polygon is regular — all sides equal, all angles equal. An irregular polygon is not the same problem and is not handled here; split it into triangles and add.
  • Where a base and a height do not determine an outline, no perimeter is reported. That is a statement about the mathematics, not a gap in the tool.
  • The ellipse perimeter is Ramanujan’s 1914 approximation and is labelled approximate. Everything else on this page, including the ellipse’s area, is exact to ten significant figures.
  • Results are rounded to ten significant figures rather than to a fixed number of decimal places, because the shapes here span from thousandths to millions and no single decimal place suits both ends.
Common questions

Area calculator FAQ

How do I find the area of a triangle when I only know the three sides?

Heron's formula. Add the three sides and halve the total to get the semi-perimeter s, then the area is the square root of s(s − a)(s − b)(s − c). For a triangle with sides 13, 14 and 15: s = 21, and the area is √(21 × 8 × 7 × 6) = √7056 = 84 exactly. No angle is measured, no perpendicular is constructed, and no trigonometry appears anywhere. Choose "Triangle — three sides" in the shape list above and the calculator shows that substitution back to you.

Why does the calculator say my triangle has no perimeter?

Because a base and a height do not determine one. Picture the base fixed on a table and the opposite corner sliding along a line parallel to it: the height never changes, so the area never changes, and yet the two other sides stretch as far as you care to slide it. The same is true of a parallelogram and a trapezoid given by their parallel sides and the gap between them. Rather than quietly assume the figure is isosceles and print a number that is probably wrong, the tool reports that the perimeter is not fixed by what you entered. If you have the actual side lengths, use the three-sides triangle instead — that one determines everything.

Which area tool do I actually want?

If you have the dimensions of one shape and want the area it encloses, this one. If you are measuring rooms to price flooring, paint, or turf and need to add several rectangles together and multiply by a rate, use the square footage calculator. If you already have an area and need it in different units — square metres to square feet, acres to hectares — use the area converter. The three are kept apart deliberately: each is a genuinely different question, and one page trying to answer all three answers none of them well.

What units does this use?

Whatever you used. Every length here is a plain number with no unit attached, and the area comes back in the square of the unit you measured in: enter inches and the answer is square inches, enter metres and it is square metres. That is not a limitation, it is the geometry — a rectangle 12 by 8 encloses 96 in any consistent unit. The only rule is that all the lengths in one calculation must be in the same unit. Convert first if they are not.

Is there an exact formula for the perimeter of an ellipse?

Not in elementary functions, no. The exact value is a complete elliptic integral of the second kind, which is why the ellipse is the one shape here flagged as approximate. What the calculator returns is Ramanujan's second approximation, published in 1914: π(a + b)[1 + 3h ÷ (10 + √(4 − 3h))], where h = ((a − b) ÷ (a + b))². For ordinary shapes it is accurate to a few parts per billion — far beyond anything you could measure. The area of an ellipse, πab, is exact and always has been.

How do I calculate the area of an L-shape or an irregular room?

Split it into rectangles, run each one through, and add the areas. Do not add perimeters that way — the internal edges you cut along are not part of the outline. For a shape with a curved or genuinely irregular edge, the practical method is to overlay a grid, count the whole squares, and count the part-squares as halves; for a plot of land, the surveyor's method is to break the outline into triangles and use Heron's formula on each, which needs only a tape measure and no protractor at all.

How many sides does a regular polygon need before it is basically a circle?

Fewer than most people guess. A regular polygon with 100 sides of length 1 encloses 795.51; a circle with the same 100-unit perimeter encloses 795.77 — the polygon is 0.033% short. At 12 sides the gap is already down to 2.3%. This is exactly how Archimedes bounded π in the third century BC, squeezing the circle between inscribed and circumscribed 96-sided polygons to get 3 + 10/71 < π < 3 + 1/7.

Primary sources

Sources and review notes

  1. MacTutor History of Mathematics Archive, University of St Andrews — Heron of Alexandria, whose Metrica carries the earliest surviving proof of the three-sides area formula
  2. NIST Digital Library of Mathematical Functions, Chapter 19 — Elliptic Integrals, the reason an ellipse’s perimeter has no elementary closed form and has to be approximated
  3. NIST Special Publication 811, Guide for the Use of the International System of Units — the conventions behind treating an area as a length squared

The geometry on this page is exact and has no data behind it to go stale — a circle’s area has been πr² for a very long time and will stay that way. The single figure that is an approximation rather than an identity is the ellipse perimeter, and it is labelled as one everywhere it appears.