Geometry

Area & Perimeter Calculator

Calculate the area and perimeter of common 2D shapes — rectangle, square, circle, and triangle.

Formulas used

  • Rectangle — Area = length × width; Perimeter = 2 × (length + width)
  • Square — Area = side²; Perimeter = 4 × side
  • Circle — Area = π × radius²; Circumference = 2 × π × radius
  • Triangle — Area = ½ × base × height; Perimeter = sum of all three sides

Worked example

A circle with radius 7 has an area of π × 7² ≈ 153.94 square units and a circumference of 2 × π × 7 ≈ 43.98 units.

What you type for each shape

  • Rectangle: length and width. Square: one side. Circle: the radius, not the diameter, so halve a diameter first.
  • Triangle: base, height, and the two other sides. Area uses only base and height; the perimeter adds base, side A and side B.
  • Results are shown to two decimals. Every value must be greater than zero, and empty boxes produce a prompt telling you what is missing.
  • A circle's boundary is labelled Circumference, while the other shapes say Perimeter. π is the full-precision value used by JavaScript.

Worked examples

A 12.5 × 8 rectangle has an area of 100.00 and a perimeter of 41.00. A square with side 3.5 gives 12.25 and 14.00.

A triangle with base 6, height 4 and both other sides 5 has an area of ½ × 6 × 4 = 12.00 and a perimeter of 6 + 5 + 5 = 16.00.

Triangle checks and limits

The triangle must be physically possible: each side has to be shorter than the other two added together. A base of 10 with sides of 5 and 5 is rejected, because 5 + 5 is not greater than 10. The check uses the three sides only. The height is not compared with the sides, so inconsistent numbers such as base 6, height 10 and sides 5 and 5 are accepted and give an area of 30.00. Make sure the height really belongs to that base.

There are no unit conversions and no polygons beyond these four shapes. Area comes out in the square of whatever unit you used.

Frequently asked questions

What's the difference between area and perimeter?

Area measures the space enclosed inside a shape (in square units). Perimeter (or circumference for a circle) measures the total length of the shape's boundary (in linear units).

Why does the triangle need both a height and two extra sides?

The height is needed to calculate area (½ × base × height), but the perimeter requires the actual lengths of all three sides, which isn't always derivable from just the base and height alone.

How do I find the area of a circle when I only know the diameter?

Divide the diameter by 2 and type that as the radius. A 14-unit diameter is entered as 7, which gives an area of 153.94.

Can I get a triangle's area from its three sides?

Not with this tool. It needs the base and the perpendicular height for the area, plus the other two sides for the perimeter.

Why was my triangle rejected?

One side is as long as, or longer than, the other two combined. Three such lengths cannot close into a triangle, so the tool stops with an explanation instead of giving a perimeter.

Related calculators