Skip to content
Math & Statisticsgeometry

Area Calculator

Area and perimeter for the common plane figures. A triangle given three sides is checked against the triangle inequality first, because three lengths that cannot close have no area.

Also called: area of a shape, surface area 2d.

Area
20

The area is 20 square units, and the perimeter is 18. Exact for the dimensions given.

Perimeter
18
If the units were metres, in square feet
215.28
Worth knowing
Exact for the dimensions given.
Method and background

How this is calculated

Each shape has its own formula. The one that needs care is a triangle from three side lengths: Heron's formula takes the square root of a product that goes negative when the sides cannot form a triangle, which is what the validity check catches. An ellipse has no closed-form perimeter at all, so the figure shown uses Ramanujan's approximation, accurate to a few parts per million.

each shape has its own area formula; a triangle from three sides uses Heron
a, b, c
The dimensions of the shape
s
Half the perimeter, for Heron

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

a five by four rectangle

Shape
Rectangle
First dimension
5
Second dimension
4
Third dimension or height
0

Area20

arithmetic identity

Open this example

a 3-4-5 triangle

Shape
Triangle
First dimension
3
Second dimension
4
Third dimension or height
5

Area6

The classic right triangle: half of 3 times 4

Open this example

Method and limits

What it assumes

  • Consistent units across every dimension.

What it deliberately does not model

  • The ellipse perimeter is an approximation, since the exact value is an elliptic integral.
  • A trapezoid perimeter needs the slant sides, which are not asked for.

Formula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator

Frequently asked questions

Why does my triangle have no area?
Because the longest side is at least as long as the other two combined, so the sides cannot close into a triangle. That is the triangle inequality, and it is checked before any arithmetic.