All tools › Math Calculators › Geometry
Find the distance around 12 shapes, or type a list of side lengths for any polygon.
The distance around 12 kinds of shape
Perimeter is the total length of the outside edge of a flat shape. This perimeter calculator finds it for a square, rectangle, triangle, circle, semicircle, sector, parallelogram, rhombus, trapezoid, regular polygon and ellipse, and for any polygon at all when you type its side lengths as a list.
It is the number you need for fencing, baseboard, edging, trim, ribbon or a running route: anything bought or measured by length that goes around something.
How to use the perimeter calculator
- Choose the Shape. The list says which boxes each shape reads, such as “Rectangle (a = length, b = width)”.
- Enter the sides in a, b, c and d as needed. For round shapes, a is the radius.
- For a regular polygon, also fill in Number of sides. For a sector, enter the Central angle and pick the Angle unit, degrees or radians.
- For an irregular outline, choose “Any polygon” and type every side in Side lengths, separated by commas or spaces. Up to 200 sides are accepted.
Use one unit for every length. The answer comes back in that same unit.
Perimeter formulas
| Shape | Perimeter |
|---|---|
| Square, rhombus | 4 x a |
| Rectangle, parallelogram | 2 x (a + b) |
| Triangle | a + b + c |
| Trapezoid | a + b + c + d |
| Regular polygon | n x a |
| Circle | 2 x pi x r |
| Semicircle | pi x r + 2 x r |
| Sector | 2 x r + r x angle in radians |
A semicircle and a sector include their straight edges, not just the curve. An angle in degrees is turned into radians by multiplying by pi / 180.
An ellipse is different: it has no simple exact perimeter formula. The calculator uses Ramanujan’s first approximation and labels the answer as approximate:
P is about pi x (3 x (a + b) – sqrt((3a + b) x (a + 3b)))
Here a and b are the semi-axes, which are half the long width and half the short width.
Worked example: fencing a five-sided yard
A yard has five straight sides measuring 62, 48.5, 30, 41 and 55.5 feet. Choose “Any polygon” and type 62, 48.5, 30, 41, 55.5 in the list box.
| Result | Value |
|---|---|
| Perimeter | 237 units |
| Number of sides | 5 |
| Shortest and longest side | 30 and 62 |
| Average side length | 47.4 |
| Side of a square with the same perimeter | 59.25 |
The sides were in feet, so the fence line is 237 feet before you subtract gates. The Steps table shows the sum written out: 62 + 48.5 + 30 + 41 + 55.5 = 237.
A second example with a curve: an oval flower bed 10 feet long and 6 feet wide has semi-axes of 5 and 3. Choosing Ellipse with a = 5 and b = 3 gives an approximate perimeter of 25.527 units.
What the extra rows tell you
- Side of a square with the same perimeter is the perimeter divided by 4. It shows what square you could form from the same length of fence or wire.
- Radius of a circle with the same perimeter does the same for a circle.
- Half the perimeter (the semiperimeter) is used in other formulas, such as Heron’s formula for the area of a triangle.
- In terms of pi appears for the circle, the semicircle and a sector entered in degrees. A semicircle of radius 7 shows 7π + 14.
Checks and limits
- Sides must be able to close. In a triangle, or any polygon, the longest side has to be shorter than all the others added together; if it is not, the page tells you.
- For a parallelogram enter the two different side lengths, not the height. For a trapezoid enter all four sides.
- The ellipse result is an estimate. It is very close for ordinary ovals and drifts a little for long, thin ones.
- Only straight sides, circular arcs and ellipses are covered. Freehand curves are not.
- Lengths have no unit label, and results are rounded to 6 significant digits.
Frequently asked questions
What is the difference between perimeter and area?
Perimeter is the length around the edge, measured in plain units such as feet. Area is the surface inside, measured in square units. A fence follows the perimeter; sod covers the area.
Is circumference the same as perimeter?
Yes. Circumference is simply the name used for the perimeter of a circle.
Can two shapes with the same perimeter have different areas?
Yes. A 10 by 10 square and a 15 by 5 rectangle both have a perimeter of 40, but their areas are 100 and 75 square units.
How do I find the perimeter of an L-shaped room?
Measure every wall, including the short inner ones, then choose Any polygon and type all six lengths. The order does not matter for the total.
Related calculators
- Area Calculator – the space inside the same shapes.
- Circumference Calculator – circles in more depth, with wheel revolutions.
- Triangle Calculator – find a missing side before adding them up.
- Square Footage Calculator – floor area for rooms and yards.
