Perimeter calculator — the distance around 11 shapes, with working

Pick a shape, type its sides or radius, and the calculator adds up the distance around it, showing the formula with your own numbers substituted.

Live demo · real result from this tool
Perimeter26 cm

Formula and working

P = 2 × (l + w)P = 2 × (8 + 5) = 26 cm

Processed on your device — nothing is uploaded.

How to use the perimeter calculator

  1. Choose the Shape. The input boxes change to match it.
  2. Type the measurements, for example Length and Width for a rectangle, or Radius and Central angle for a circular sector. Every value must be greater than zero.
  3. Pick the Unit of the lengths (mm, cm, m, km, in, ft, yd, mi, or no unit). It is added to the answer as a label.
  4. Read the Perimeter, then check the Formula and working box, which repeats the formula with your numbers in it.

What it does and when to use it

Perimeter is the length you would walk if you went once around the edge of a flat shape. You need it for fencing a garden, buying skirting board or edging tape, framing a picture, or finding how much trim goes around a round table. The tool covers square, rectangle, triangle, circle, semicircle, ellipse, trapezoid, parallelogram, rhombus, circular sector and regular polygon.

If you need the space inside the shape instead, use the area calculator. For just the curved part of a sector, the arc length calculator gives the arc on its own.

How it works

Each shape uses its standard formula:

  • Square and rhombus: P = 4 × s
  • Rectangle: P = 2 × (l + w); parallelogram: P = 2 × (a + b)
  • Triangle and trapezoid: add all the sides, P = a + b + c (+ d)
  • Circle: C = 2 × π × r; semicircle: P = π × r + 2 × r
  • Circular sector: P = 2 × r + 2π × r × t/360, where t is the angle in degrees
  • Regular polygon: P = n × s
  • Ellipse: there is no simple exact formula, so the tool evaluates the exact elliptic integral with the arithmetic-geometric mean and also shows Ramanujan’s approximation.

For triangles the tool first checks that the sides can actually meet. The angle of a sector cannot be more than 360°, and a polygon needs at least 3 sides.

Worked examples

Fencing a garden, step by step. A rectangular garden is 12 m long and 7.5 m wide.

  1. Write the formula: P = 2 × (l + w).
  2. Add length and width: 12 + 7.5 = 19.5.
  3. Double it, because there are two lengths and two widths: 2 × 19.5 = 39.

The tool shows Perimeter: 39 m, so you need 39 m of fence before allowing for a gate.

A semicircular window. Radius 3 ft gives Perimeter: 15.42477796 ft: about 9.42 ft of curve plus the 6 ft straight base.

A quarter-circle slice. Radius 10 cm with a central angle of 90° gives 35.70796327 cm: two 10 cm straight edges plus a curved edge of about 15.71 cm.

Limits and tips

  • All measurements must use the same unit. The menu does not convert, so a mix of cm and m gives a wrong answer. The length converter helps here.
  • For a trapezoid you must enter both legs; the tool does not work them out from the height. The trapezoid calculator can find the legs of an isosceles trapezoid for you.
  • Results show up to 10 significant figures. Round them to a sensible number of places for real-world jobs.
  • Everything is calculated in your browser.

Frequently asked questions

What is the difference between perimeter and circumference?
They measure the same thing, the length of the boundary. Circumference is the word used for a circle, and the tool finds it with C = 2 × π × r.
Does the semicircle perimeter include the straight edge?
Yes. The tool adds the curved half, π × r, and the diameter, 2 × r. If you only need the curved part, use the circumference of the full circle and halve it.
Why do I get "These sides cannot form a triangle"?
In every triangle the two shorter sides together must be longer than the longest side. Sides 2, 3 and 6 fail because 2 + 3 is not greater than 6, so no such triangle exists.
Can I use a radius in metres and get the answer in feet?
No. The unit menu only labels the result; it does not convert. Convert the measurements first with the length converter, then enter them.
How accurate is the ellipse perimeter?
The main figure uses an exact method (the arithmetic-geometric mean). Ramanujan's approximation is shown beside it for comparison.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close