Perimeter Calculator

Choose a shape, enter its sides and get the perimeter and area.

Calculator
Result

What this tool does

The perimeter is the distance around a shape. A rectangle 5 by 3 has a perimeter of 2 × (5 + 3) = 16; a circle of radius 10 has a circumference of 2π × 10 = 62.83; a 3-4-5 triangle has a perimeter of 12 and an area of 6. Choose a shape above and enter its sides.

Adds up the sides (or uses the circle and ellipse formulas) to give the perimeter.

Also reports the area, where the sides determine it.

How to use it

  1. Choose the shape.
  2. Enter the sides, radius or semi-axes it asks for.
  3. Read the perimeter and the area.
  4. Use the same unit throughout.

Why use this calculator

Finds the perimeter (and the area) of a rectangle, square, circle, triangle, trapezoid, regular polygon or ellipse, and refuses impossible shapes such as a triangle whose sides cannot meet. Fencing, framing, edging and trim are all bought by the perimeter, while paint, turf and flooring are bought by the area. Getting both from the same sides avoids two separate calculations.

Why we built it

We built the perimeter calculator for seven shapes with the area alongside, and with a clear message when sides cannot form a triangle. Compare with the area calculator and the circle calculator.

If your task goes further, try the Fence Calculator, the Waist-to-Hip Ratio Calculator and the Triangle Calculator.

Who this tool is for

  • Students learning geometry
  • Homeowners buying fencing or trim
  • Craftspeople working out edging

When to use it

  • Buying fencing, edging or trim.
  • Homework in geometry.
  • Estimating the length of a border.
  • Checking a plot or a room.

How it works

Rectangle: 2(a + b). Square: 4a. Circle: 2πr. Triangle: a + b + c, with area from Heron's formula √(s(s−a)(s−b)(s−c)) where s is half the perimeter. Regular polygon with n sides of length a: n × a, area n a² ÷ (4 tan(π/n)). Ellipse: π[3(a + b) − √((3a + b)(a + 3b))] (Ramanujan's approximation).

Example: a trapezoid with parallel sides 10 and 6 and legs 5 and 5 has a perimeter of 26 and an area of 36.66.

A worked example

These are the values the calculator opens with, so you can see exactly what it does with them. Change any value on the page and the result updates; the figures below come from the same calculation.

Example inputs for the perimeter calculator
InputValue
ShapeRectangle
Side a5
Side b3
Side c4
Side d4
Number of sides6

With those inputs, the calculator returns:

  • Perimeter: 16
  • Area: 15
  • Units: The same unit you entered, and its square for area

What you give it, and what you get back

Input and output of Perimeter Calculator
ItemDetails
ShapeRectangle, square, circle, triangle, trapezoid, regular polygon or ellipse.
SidesThe side lengths, radius or semi-axes, in one unit.
OutputPerimeter (or circumference) and area.

Issues you may run into

Common problems with Perimeter Calculator
What you seeWhy it happensWhat to do
"Those three sides cannot make a triangle"The two shorter sides must add to more than the longest.Check the measurements.
No area shown for a trapezoidThe four sides do not describe a valid trapezoid.Check that a and b are the parallel sides.
Units mixedThe result is in whatever unit you used.Convert all sides to one unit first.

Assumptions and limitations

Frequently asked questions

What is perimeter?

The total distance around the outside of a shape.

How do I find the perimeter of a rectangle?

Add length and width and double it.

What is the circumference of a circle?

2 × π × radius.

How do I find the area of a triangle from its sides?

Use Heron's formula; the calculator does it.

Is the ellipse perimeter exact?

It is an excellent approximation; the exact value needs an infinite series.

Is my information sent anywhere?

No. The calculation runs in your browser and nothing leaves the page.