The Perimeter Formula, Explained with Examples
By Shihab Mia June 20, 2026 7 min read
Perimeter is the total distance around the outside of a two-dimensional shape. If you walked along every edge of a shape and back to where you started, the length you covered is the perimeter. Because it is a length, perimeter is always measured in single units such as centimetres, metres, inches or feet, never square units.
Quick answer
Perimeter is the total distance around a shape. For a rectangle, perimeter = 2 x (length + width). For a square, perimeter = 4 x side. For any other polygon, just add the lengths of all the sides.
What perimeter actually measures
The word perimeter comes from the Greek for "measure around". For any polygon, the rule never changes: add up the lengths of all the sides. The named formulas below are just shortcuts that take advantage of sides that are equal, so you do less adding. Perimeter answers questions like how much fencing a yard needs, how much trim borders a picture frame, or how long the edge of a running track is.
This is different from area, which measures the space inside a shape and is given in square units. A garden can have a small area but a long perimeter, or a large area with a short perimeter, so the two are not interchangeable. If you need the space inside instead, see the area of a circle guide.
Perimeter formulas for common shapes
Here are the formulas you will use most often. In every case the result is a single length, so keep your units consistent before you add anything.
Perimeter formulas by shape
| Shape | Formula | What the letters mean |
|---|---|---|
| Rectangle | 2 x (length + width) | length and width are the two side lengths |
| Square | 4 x side | side is the length of one edge |
| Triangle | a + b + c | a, b and c are the three side lengths |
| Regular polygon | number of sides x side length | all sides are equal |
| Circle | 2 x pi x radius | this is called the circumference |
A circle has no straight sides, so its "perimeter" gets a special name: the circumference. The idea is identical, the distance all the way around, but the formula uses pi (about 3.14159). For more on that case, read the circumference formula guide.
How to find the perimeter of a rectangle
A rectangle has two pairs of equal sides: two lengths and two widths. You could add length + width + length + width, but it is faster to add one length and one width and then double the result. That is exactly what the formula 2 x (length + width) does.
Example: a rectangle is 8 metres long and 5 metres wide.
- Add one length and one width: 8 + 5 = 13.
- Multiply by 2: 2 x 13 = 26.
- The perimeter is 26 metres.
A quick check: adding all four sides directly gives 8 + 5 + 8 + 5 = 26, which matches. Both methods always agree, so use whichever you find easier.
Perimeter is what you actually buy when a job follows the boundary of a shape. Say you are fencing that same 8 m by 5 m yard and fencing panels cost 12 per metre. The perimeter is 26 m, so the material cost is 26 x 12 = 312, before gates or posts. Notice you multiply by the perimeter, not the area, because the fence runs along the edge. This is the single most common real-world reason people look up the perimeter formula: fencing, skirting boards, picture-frame trim, garden edging and seam tape all price by the length of the boundary.
How to find the perimeter of a square
A square is the simplest case because all four sides are the same length. Instead of adding the same number four times, just multiply that side length by 4.
Example: a square tile has sides of 6 inches.
- Take the side length: 6 inches.
- Multiply by 4: 4 x 6 = 24.
- The perimeter is 24 inches.
Because a square is a rectangle with equal sides, the rectangle formula gives the same answer: 2 x (6 + 6) = 2 x 12 = 24. The 4 x side shortcut is simply the faster route.
Triangles and other polygons
For a triangle there is no shortcut to memorise, you just add the three sides: a + b + c. A triangle with sides 3, 4 and 5 has a perimeter of 3 + 4 + 5 = 12 units. The same logic covers any irregular shape: measure every side and add them.
For a regular polygon, where every side is equal, multiply the side length by the number of sides. A regular hexagon (6 sides) with 10 cm sides has a perimeter of 6 x 10 = 60 cm. A regular pentagon (5 sides) of 7 cm has a perimeter of 5 x 7 = 35 cm. If the sides are not all equal, treat it as an irregular polygon and add each side one by one, which is exactly what the next section covers.
How do you find the perimeter of an irregular or L-shaped room?
Real rooms and plots of land rarely form a neat rectangle. The rule is still the same: walk the whole boundary and add every straight edge. The only trick with an L-shaped room is that some side lengths are not labelled, so you work them out from the sides that are.
Example: an L-shaped room where the outer walls are 6 m and 4 m, and the notch cut out of the corner is 2 m by 2 m. The six walls, going around, are 6, 4, 4, 2, 2 and 2 metres.
- List every straight edge as you travel around the outline once, without skipping the short walls of the notch.
- Fill in any missing length using the opposite walls: a side facing a 6 m wall must add up to 6 m across the gap.
- Add them all: 6 + 4 + 4 + 2 + 2 + 2 = 20 metres.
The perimeter is 20 m. For a curved boundary, break it into straight segments and any circular arcs, then add the arc lengths separately. The arc length formula guide shows how to measure the curved part.
Common mistakes to avoid
- Mixing up perimeter and area. Perimeter is a length in single units; area is space in square units. Doubling every side doubles the perimeter but quadruples the area.
- Using mismatched units. Convert everything to the same unit before adding. You cannot add metres to centimetres directly.
- Forgetting a side. With irregular shapes it is easy to skip an edge, so count your sides against the figure.
- Counting only two sides of a rectangle. Remember there are two lengths and two widths, which is why the formula doubles the sum.
If your measurements come from a floor plan or a plot of land, you may also want the area for flooring or turf. The square footage guide walks through that calculation.
Good to know: perimeter, area and shape
A useful fact that trips people up: two shapes can share the same perimeter yet enclose very different areas. A 1 by 6 rectangle and a 3 by 4 rectangle both have a perimeter of 14 units, but their areas are 6 and 12 square units. For a fixed perimeter, the shape that packs in the most area is the one that gets closest to a circle, which is why soap bubbles and many pipes are round. This is the plain-language idea behind the isoperimetric inequality studied in geometry.
- Perimeter scales in step with size: double every side and the perimeter doubles, but the area multiplies by four.
- Perimeter is always a positive length, so a valid answer is never zero or negative.
- When a shape has a hole cut through it, like a window frame, the full perimeter includes both the outer edge and the inner edge.
- Rounding matters for circles: use pi to at least 3.14159, since rounding pi to 3.14 can shift a large circumference by several units.
Calculate area and perimeter instantly
Enter the side lengths below and the calculator returns the perimeter and area together, with the steps shown.
๐ Try the free tool Area Calculator Free area calculator for rectangles, squares, triangles, circles, trapezoids and parallelograms. Enter dimensions for instant area, the formula used, and full working.It handles rectangles, squares, triangles and circles, so you do not have to remember which formula to use.
Frequently asked questions
What is the perimeter formula?
Perimeter is the total distance around a shape, found by adding the lengths of all its sides. For a rectangle it is 2 x (length + width); for a square it is 4 x side; for a triangle it is a + b + c.
How do you find the perimeter of a rectangle?
Add one length and one width, then multiply by 2. For a rectangle 8 m by 5 m: 8 + 5 = 13, and 2 x 13 = 26 metres. This works because a rectangle has two equal lengths and two equal widths.
What is the perimeter of a square?
Multiply the side length by 4, because all four sides are equal. A square with 6 inch sides has a perimeter of 4 x 6 = 24 inches.
Is perimeter the same as area?
No. Perimeter is the distance around a shape, measured in single units like metres. Area is the space inside the shape, measured in square units like square metres. They answer different questions.
What units is perimeter measured in?
Perimeter is a length, so it uses single units such as centimetres, metres, inches or feet. It is never given in square units, which are reserved for area.
How do you find the perimeter of a circle?
A circle has no sides, so its perimeter is called the circumference. It equals 2 x pi x radius, where pi is about 3.14159. A circle with a radius of 5 cm has a circumference of about 31.4 cm.