Find the perimeter of any common shape — square, rectangle, triangle, circle, ellipse, trapezoid, parallelogram, rhombus, kite, annulus, circle sector, or regular polygon. Pick the shape, enter its dimensions, and the calculator returns the perimeter (the distance around the shape).
The perimeter calculator finds the perimeter — the total distance around the outside — of thirteen common shapes. Whether you need the perimeter of a square, rectangle, triangle, circle, ellipse, trapezoid, parallelogram, rhombus, kite, annulus, circle sector, or regular polygon, just choose the shape, type in its dimensions, and read off the answer. It handles the special cases too, like the curved boundary of a circle (its circumference) and the arc-plus-radii boundary of a pie-slice sector. For fencing a yard, framing a picture, trimming a garden bed, or finishing a geometry problem, this tool gives you a fast, accurate result in any unit.
This page explains what perimeter is, gives the exact formula for every shape the calculator supports, walks through worked examples, and answers the questions people ask most. By the end you will be able to find the perimeter of any shape by hand or with the calculator.
The perimeter of a two-dimensional shape is the total length of its boundary — the distance you would travel if you walked all the way around its edge and back to where you started. For shapes made of straight sides, such as squares, triangles, and polygons, the perimeter is simply the sum of the side lengths. For curved shapes, such as circles and ellipses, the boundary is a curve, and the "perimeter" is more often called the circumference. Perimeter is always a one-dimensional measurement expressed in units of length — meters, feet, inches, and so on — which distinguishes it from area, measured in square units. Knowing a shape's perimeter is essential whenever you need to measure or buy something that goes around an edge, like fencing, trim, ribbon, or framing.
Here are the exact formulas the calculator uses for each of its thirteen shapes:
| Shape | Perimeter formula |
|---|---|
| Square | P = 4a |
| Rectangle | P = 2(a + b) |
| Triangle | P = a + b + c |
| Circle | P = 2πr |
| Semicircle | P = πr + 2r = r(π + 2) |
| Circle sector | P = r(α + 2), α in radians |
| Ellipse | P ≈ π[3(a+b) − √((3a+b)(a+3b))] |
| Quadrilateral / trapezoid | P = a + b + c + d |
| Parallelogram | P = 2(a + b) |
| Rhombus | P = 4a |
| Kite | P = 2(a + b) |
| Annulus (ring) | P = 2π(R + r) |
| Regular polygon | P = n × a |
Suppose you want to fence a rectangular building plot that measures 20 m by 15 m. Using the rectangle formula:
P = 2 × (20 + 15) = 2 × 35 = 70 m
So you would need 70 meters of fencing to enclose the plot. These are the calculator's default values, so you can press Calculate to confirm the 70 m result and then switch shapes or dimensions for your own problem. Notice how the perimeter adds the two lengths and the two widths — 40 m for the long sides plus 30 m for the short sides.
For any shape bounded by straight lines, the perimeter is just the sum of the side lengths, but the formulas above give convenient shortcuts when sides repeat. A square and a rhombus both have four equal sides, so their perimeter is 4a. A rectangle, parallelogram, and kite each have two pairs of equal sides, giving 2(a + b). A general triangle or quadrilateral/trapezoid has no repeated sides, so you simply add all of them. A regular polygon has n equal sides, so its perimeter is n times the side length — a pentagon with 5-cm sides has a perimeter of 25 cm, and a hexagon with 5-cm sides has 30 cm. Recognizing which sides are equal turns a long addition into a quick multiplication.
Curved shapes need a little more care because their boundary includes an arc. A full circle has a circumference of 2πr, where r is the radius; this is the distance around the circle. A semicircle is a half circle, so its perimeter is half the circumference (πr) plus the straight diameter across the flat side (2r), giving r(π + 2) — a common mistake is to forget the diameter and use only πr. A circle sector (a pie slice) has a curved arc of length rα (with the angle α in radians) plus the two straight radii, giving r(α + 2). An annulus, or ring, has two circular boundaries — an outer circle and an inner hole — so its total perimeter is the sum of both circumferences, 2π(R + r).
The ellipse is the trickiest shape, because there is no simple exact formula for its perimeter using ordinary functions. Instead, the calculator uses a highly accurate approximation devised by the mathematician Srinivasa Ramanujan: P ≈ π[3(a + b) − √((3a + b)(a + 3b))], where a and b are the two semi-axes (half the width and half the height). This approximation is astonishingly precise for most ellipses, with an error that is negligible unless the ellipse is extremely elongated. When a equals b, the ellipse becomes a circle and the formula correctly reduces to 2πr. For everyday purposes — an elliptical table, track, or garden bed — Ramanujan's formula gives a perimeter you can rely on.
It is easy to mix up these related ideas. Perimeter is the distance around the edge of a shape, measured in units of length. Area is the amount of surface a shape covers, measured in square units — a completely different quantity that answers "how much space is inside?" rather than "how far around?" Circumference is simply the specific name for the perimeter of a circle (and sometimes an ellipse). A classic source of confusion is that two shapes can have the same perimeter but very different areas, or the same area but different perimeters — a long, thin rectangle and a square can enclose the same area with wildly different amounts of fencing. Keeping the distinction clear ensures you measure and buy the right thing: perimeter for edging and fencing, area for surfacing and covering.
Perimeter comes up constantly in daily life and work. Homeowners calculate it to buy fencing for a yard, baseboards or crown moulding for a room, or edging for a flower bed or patio. Builders and landscapers use it to estimate materials that run along boundaries. Sewers and crafters measure perimeters for hems, trim, and borders. Sports fields and running tracks are designed around their perimeter, and athletes count laps by it. Framers cut moulding to a picture's perimeter, and packagers size labels and wrapping to fit around objects. In geometry class, perimeter is one of the first measurements students learn, and it stays useful for a lifetime. Whatever the setting, being able to find the perimeter quickly saves time, money, and material.
Finding a perimeter by hand is straightforward once you identify the shape. First, decide what shape you are dealing with and gather its dimensions in a single consistent unit. Second, choose the matching formula — or, for any straight-sided shape, simply list every side. Third, substitute your numbers and do the arithmetic: for shapes with repeated sides, use the shortcut formulas (4a for a square, 2(a+b) for a rectangle) rather than adding each side separately, which saves time and reduces mistakes. Fourth, keep the unit with your answer, because a perimeter is a length. For a triangle with sides 3, 4, and 5 meters, you would add 3 + 4 + 5 to get 12 meters; for a regular octagon with 5-cm sides, you would multiply 8 by 5 to get 40 cm. The calculator automates every one of these steps, but understanding the process helps you check the result and handle unusual shapes that combine several basic ones.
Many real-world outlines are not single textbook shapes but combinations of them — an L-shaped room, a garden with a curved end, or a house footprint with bays and insets. For a compound shape made of straight edges, the perimeter is still just the total length of the outer boundary: measure and add every edge that lies on the outside, ignoring any internal division lines. For a shape that combines straight and curved parts, such as a rectangle with a semicircular end (a stadium or "discorectangle"), find the length of each part separately — the straight sides plus the curved arc — and add them. A common trick for irregular but rectilinear shapes is that the total horizontal edges add up to the width of the bounding box times two, and likewise for vertical edges, as long as there are no notches. When a shape truly cannot be broken into standard pieces, the only option is to measure the boundary directly. This calculator covers the standard building blocks you will need to assemble most compound outlines.
A few errors come up again and again. The most frequent is confusing perimeter with area — remember that perimeter is a distance around the edge (in plain units) while area is the space inside (in square units). Another is forgetting the straight edges on curved shapes: a semicircle's perimeter includes its diameter, and a sector's includes its two radii, not just the arc. Mixing units is a classic trap; always convert everything to the same unit before adding. With circles it is easy to use the diameter where the formula wants the radius, doubling your answer — the circle, semicircle, sector, and annulus formulas here all take the radius. Finally, for a sector, the arc-length part of the formula needs the angle in radians, so entering degrees without switching the unit will give a wrong result. Being aware of these pitfalls, and letting the calculator handle the conversions, keeps your perimeters accurate.
For straight-sided shapes, add up all the side lengths. For a rectangle, use P = 2(length + width); for a circle, use the circumference 2πr. This calculator applies the correct formula for each shape automatically.
It is twice the sum of the length and width: P = 2(a + b). A 20 m by 15 m rectangle has a perimeter of 2 × 35 = 70 m.
Circumference is the name for the perimeter of a circle (and sometimes an ellipse). For a circle it equals 2πr. For straight-sided shapes we use the word "perimeter."
Add half the circle's circumference (πr) to the straight diameter (2r), giving P = r(π + 2). Do not forget the diameter along the flat side.
Multiply the number of sides by the length of one side: P = n × a. A regular hexagon with 5-unit sides has a perimeter of 30 units.
Perimeter is a length, so it is measured in units of length such as millimeters, centimeters, meters, kilometers, inches, feet, yards, or miles — never in square units.
This Perimeter Calculator is provided for general educational purposes. It applies standard perimeter formulas to the dimensions you enter; the ellipse result uses Ramanujan's approximation, which is extremely accurate but not exact. Always double-check measurements before purchasing materials.