🧮
🧮 Math & statistics

Perimeter Calculator (triangle, rectangle, trapezoid, circle, sector & more)

Results update as you type.

Your numbers

Understanding the perimeter calculator — concept and principle

This calculator finds the perimeter, the total distance around a flat shape, for triangles, rectangles, squares, parallelograms, trapezoids, kites, regular polygons, circles, semicircles, sectors and ellipses. Use it for fencing, edging, trim, skirting boards, frames and geometry homework.

Perimeter of an 8 by 5 rectangleWalk all the way arounda = 885b = 5P = 2(8 + 5) = 26
Going around the rectangle covers 8 + 5 + 8 + 5 = 26 units.

How it is calculated

The result is in the same unit as the lengths you enter. "Missing side or arc" shows any length the formula worked out for you.

The principle

For a polygon the perimeter is simply the sum of the side lengths. Shapes with equal sides let you multiply instead of add. When a side is not given directly, the Pythagorean theorem finds it, as with a right triangle's hypotenuse or the slanted side of an isosceles trapezoid. For curves, the circumference of a circle is π times its diameter by definition of π, and a sector's arc is the fraction θ/360 of that circumference. An ellipse has no simple exact formula, so Ramanujan's approximation is used; it is extremely accurate for everyday shapes.

Worked example

Default inputs: rectangle, length a = 8, width b = 5.

  1. Formula: P = 2(a + b).
  2. a + b = 8 + 5 = 13.
  3. P = 2 × 13 = 26.
  4. The semi-perimeter is 26 ÷ 2 = 13. No missing side is needed for a rectangle.
How Perimeter changes with aHow Perimeter changes with a10203040502468101216Example: 26a
Each point is the calculator re-run with only “a” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
aPerimeter
214
418
622
826
1030
1234
1642

How to read the result

The perimeter is a length, so it has the same unit as the sides: metres in, metres out. For fencing or trim, add a margin for waste, overlaps and gates. Perimeter and area measure different things: two rectangles with the same perimeter can have very different areas, and a square has the largest area of all rectangles with a given perimeter.

Common mistakes

Keep in mind: For building and landscaping, measure on site and add allowances for cuts and joins. Real walls and plots are rarely perfect geometric shapes.

Frequently asked questions

What is the difference between perimeter and circumference?

Circumference is the perimeter of a circle; perimeter is the general term for any shape.

How do I find the perimeter of an L-shaped room?

Add the lengths of all outer walls, or split it into rectangles and remove the shared edges.

Is the ellipse perimeter exact?

It uses Ramanujan's second approximation, which is accurate enough for practical work.

Sources: OpenStax, Prealgebra 2e, §9.3–9.5 · S. Ramanujan, "Modular equations and approximations to π" (1914)

Checked 9 Nov 2026. OpenStax, Prealgebra 2e, §9.4 Use Properties of Rectangles, Triangles, and Trapezoids (P = 2L + 2W; triangle P = a + b + c) and §9.5 Solve Geometry Applications: Circles and Irregular Figures (C = 2πr); §9.3 for the Pythagorean theorem; Ramanujan’s second approximation for the ellipse perimeter (1914).

🧮 All math & statistics tools →🌍 Calculators by country →