The perimeter is the total distance around a two-dimensional shape. Understanding perimeter formulas is essential for many real-world tasks, from fencing a yard to framing a picture. This guide explains the formulas for all common shapes, shows step-by-step examples, and discusses practical applications. For a complete definition, see What Is Perimeter? Definition, Examples & Formulas (2026).
Basic Perimeter Formulas
Each shape has its own formula based on its side lengths or special measurements. The formulas below use standard variable names. Always ensure all dimensions are in the same unit before calculating.
Rectangle
P = 2(l + w)
- P = perimeter
- l = length
- w = width
Why it works: A rectangle has two equal lengths and two equal widths. Adding the length and width gives half the perimeter; multiplying by 2 gives the full distance. Example: a rectangle with length 10 m and width 4 m has perimeter 2(10 + 4) = 28 m.
Square
P = 4s
- P = perimeter
- s = side length
Why it works: All four sides are equal. Multiply one side by 4. Example: a square of side 6 cm has perimeter 24 cm.
Triangle
P = a + b + c
- a, b, c = lengths of three sides
Why it works: Simply add the three side lengths. Example: a triangle with sides 3 m, 4 m, 5 m has perimeter 12 m.
Circle (Circumference)
C = 2πr or C = πd
- C = circumference (perimeter of a circle)
- r = radius
- d = diameter (d = 2r)
- π ≈ 3.14159
Why it works: The number π is the ratio of circumference to diameter. So circumference equals π times diameter. Example: a circle with radius 7 cm has circumference 2 × 3.14 × 7 ≈ 43.96 cm.
Parallelogram
P = 2(b + s)
- P = perimeter
- b = base length
- s = side length (the other pair of sides)
Why it works: Like a rectangle, opposite sides are equal. Multiply the sum of base and side by 2. Example: base = 8 m, side = 5 m, perimeter = 2(8 + 5) = 26 m.
Trapezoid
P = a + b + c + d
- a, b = lengths of the two parallel bases
- c, d = lengths of the legs (non-parallel sides)
Why it works: Add all four sides. No special shortcut unless it's an isosceles trapezoid. Example: bases 10 cm and 6 cm, legs 5 cm each, perimeter = 10 + 6 + 5 + 5 = 26 cm.
Regular Polygon
P = n × s
- P = perimeter
- n = number of sides
- s = side length
Why it works: All sides are equal. Multiply side length by number of sides. Example: a regular hexagon (n=6) with side 4 m has perimeter 24 m.
Ellipse
The ellipse does not have a simple formula. The most common approximation is Ramanujan's first approximation:
P ≈ π [ 3(a + b) - √((3a + b)(a + 3b)) ]
- a = semi-major axis (half the longest diameter)
- b = semi-minor axis (half the shortest diameter)
Why it works: The ellipse perimeter cannot be expressed in elementary functions. Ramanujan's formula is accurate to within 0.04% for most shapes. Example: ellipse with a=5 m, b=3 m gives P ≈ 25.53 m.
Why Perimeter Formulas Work: Intuition and Units
Perimeter is a linear measure—the sum of distances along the boundary. For straight-sided shapes, adding side lengths is natural. For circles, the constant π links diameter to circumference. Always check units: if sides are in meters, perimeter is in meters. The How to Calculate Perimeter Step-by-Step Guide (2026) walks through manual calculation examples with unit conversions.
Historical Origin
Ancient civilizations knew geometry. The formula for circumference was understood by the Babylonians and Greeks. Archimedes first approximated π rigorously. The perimeter of polygons has been used since antiquity for land measurement.
Practical Implications
Knowing perimeter helps in many fields:
- Construction: Estimating materials for fencing, borders, or molding.
- Design: Planning garden beds, picture frames, or table tops.
- Sports: Determining track length or field boundaries.
- Education: Building a foundation for area and volume.
For more real-world examples, see Perimeter in Real Life: Applications & Examples (2026).
Edge Cases
- Circle vs. Ellipse: A circle is a special ellipse where a=b, and the ellipse formula reduces to 2πr. The Ramanujan formula works for all ellipses but is approximate.
- Concave shapes: For concave polygons, the formula remains the sum of all side lengths; the shape's concavity does not change the perimeter.
- Units mismatch: All sides must be in the same unit. Convert before adding.
- Zero or negative sides: Not valid in geometry; sides must be positive lengths.
For deeper exploration of what perimeter values mean, refer to What Do Different Perimeter Values Mean? (2026).
Try the free Perimeter Calculator ⬆
Get your Perimeter of geometric shapes: calculation, formulas, and applications result instantly — no signup, no clutter.
Open the Perimeter Calculator