Whether you are fencing a garden, framing a picture, or fitting skirting board, the measurement you need is the perimeter, the distance all the way around a shape. Learning how to calculate perimeter is simple: for most shapes you just add up the lengths of the sides. This guide gives you the perimeter formulas for every common shape in one place, works through examples including the circle, and clears up the frequent confusion between perimeter and area. It also shows how to handle irregular shapes. For the surface inside a shape rather than its edge, our area calculator is the companion tool.
Quick answer: To calculate perimeter, add up the lengths of all the sides of a shape. For a rectangle, use 2 x (length + width); for a square, 4 x side; for a circle, the perimeter (circumference) is 2 x pi x radius. A 6 by 4 rectangle has a perimeter of 20.
What is perimeter?
The perimeter is the total distance around the outside edge of a two-dimensional shape. Because it is a length, it is measured in ordinary units like metres or feet, not square units. If you walked all the way around the boundary of a shape, the distance you covered would be its perimeter.
For any shape with straight sides, the perimeter is simply the sum of all the side lengths.
Perimeter formulas by shape
| Shape | Perimeter formula |
|---|---|
| Square | 4 x side |
| Rectangle | 2 x (length + width) |
| Triangle | side a + side b + side c |
| Circle (circumference) | 2 x pi x radius, or pi x diameter |
| Any polygon | sum of all side lengths |
The circle is the special case: its perimeter is called the circumference, and it uses pi (about 3.14159) rather than a simple sum of sides.
Worked examples
- Rectangle 6 by 4: 2 x (6 + 4) = 2 x 10 = 20.
- Square with 5 sides: 4 x 5 = 20.
- Circle, radius 5: 2 x 3.14159 x 5 = about 31.4.
In plain English: for straight-sided shapes you add the sides, and for a circle you multiply pi by the diameter. Keep every measurement in the same unit and your answer comes out in that unit.
Need the space inside instead?
Perimeter measures the edge; area measures the surface inside. Our area calculator handles area, and our guide on how to calculate area covers the formulas.
Irregular shapes
For an irregular shape with straight sides, there is no shortcut formula: you simply measure every side and add them all up. As long as you account for each edge once, the total is the perimeter.
For shapes with curved edges, break the outline into straight sections and curved sections, calculate each, and add them. A shape with a semicircular end, for instance, is the straight sides plus half a circle’s circumference.
Perimeter vs area
These two are easy to confuse but measure different things. Perimeter is the distance around the edge, in ordinary units, and you use it for fencing, borders, or trim. Area is the surface inside the shape, in square units, and you use it for flooring, paint, or turf. If you are buying something that goes around the boundary, you need perimeter; if it covers the inside, you need area.
Frequently asked questions
How do I calculate perimeter?
Add up the lengths of all the sides of the shape. For a rectangle, use 2 times the sum of the length and width; for a square, 4 times the side; for a triangle, add the three sides. For a circle, the perimeter is the circumference, 2 times pi times the radius. A 6 by 4 rectangle has a perimeter of 20.
What is the formula for the perimeter of a rectangle?
The perimeter of a rectangle is 2 times the sum of its length and width, written as 2 x (length + width). For a rectangle 6 units long and 4 wide, that is 2 times (6 plus 4), which is 2 times 10, equalling 20. You can also add all four sides: 6 plus 4 plus 6 plus 4.
How do I find the perimeter of a circle?
The perimeter of a circle is called its circumference. Multiply 2 by pi (about 3.14159) by the radius, or multiply pi by the diameter, since the diameter is twice the radius. For a circle with a radius of 5, the circumference is 2 times 3.14159 times 5, which is about 31.4.
What is the difference between perimeter and area?
Perimeter is the distance around the edge of a shape, measured in ordinary units, while area is the surface inside it, measured in square units. Use perimeter for things that go around the boundary, like fencing or a border, and area for things that cover the inside, like flooring or paint. They answer different questions.
How do I calculate the perimeter of an irregular shape?
Measure the length of every side and add them all together; there is no single formula. Make sure you count each edge exactly once. If the shape has curved sections, calculate those separately, for example using part of a circle’s circumference, and add them to the straight-side total for the full perimeter.
The bottom line
To calculate perimeter, add up all the sides: use 2 x (length + width) for a rectangle, 4 x side for a square, and 2 x pi x radius for a circle’s circumference. A 6 by 4 rectangle has a perimeter of 20. Keep perimeter (the edge, in ordinary units) separate from area (the surface, in square units). For the space inside a shape, use our area calculator.
Further reading
For authoritative background on this topic, see Perimeter on Wikipedia.
Note. This article is for general educational purposes.
Last reviewed: July 2026