Free Perimeter Calculator
Calculate the perimeter of any shape: rectangle, square, triangle, circle (circumference), and regular polygon. Step-by-step formulas with every result.
Formula: P = 2(length + width)
Was this helpful?
Formula: P = 4s (all four sides equal)
Was this helpful?
Formula: P = a + b + c (sum of all three sides). For right triangles, leave side C blank to calculate hypotenuse automatically.
Was this helpful?
Formula: C = 2πr = πd. Enter radius OR diameter.
Was this helpful?
Formula: P = n × s (number of sides × side length). For regular polygons only (all sides equal).
Was this helpful?
📚 Sources & Methodology
All formulas follow established Euclidean geometry:
- Euclidean Geometry — Rectangle P=2(l+w), Square P=4s, Triangle P=a+b+c, Polygon P=ns
- Circle Circumference — C=2πr using pi=3.14159265358979 (IEEE 754 double precision)
- Pythagorean Theorem — c=sqrt(a²+b²) for right triangle hypotenuse calculation
- NCTM Mathematics Curriculum Standards — geometry and measurement standards for K-12
- ISO 80000-2 — mathematical signs and symbols standard
Perimeter Calculator — All Shapes with Formulas
What is Perimeter?
Perimeter is the total distance around the outside boundary of a two-dimensional shape. It is measured in linear units (centimeters, meters, feet, inches) — the same units as the side lengths. Perimeter is used whenever you need to measure an outline: fencing a yard, framing a picture, laying a garden border, or trimming a carpet.
The key distinction: perimeter measures the outside edge (linear units), while area measures the inside space (square units). A 4 ft × 6 ft rectangle has a perimeter of 20 ft but an area of 24 sq ft. They answer different questions.
Perimeter of a Rectangle — Formula and Examples
The perimeter of a rectangle equals twice the sum of its length and width: P = 2(l + w). This works because a rectangle has two pairs of equal sides — two lengths and two widths.
P = 2(length + width) = 2l + 2w
Example 1: 8 cm × 5 cm → P = 2(8+5) = 26 cm
Example 2: 12 ft × 9 ft → P = 2(12+9) = 42 ft
Example 3: 1.5 m × 0.8 m → P = 2(1.5+0.8) = 4.6 m
Perimeter of a Square
A square has four equal sides, so its perimeter is simply four times the side length: P = 4s. If you know the area of a square, find the side first: s = √area, then P = 4s.
P = 4s (four equal sides)
Example 1: side = 7 m → P = 4 × 7 = 28 m
Example 2: area = 25 cm² → side = √25 = 5 cm → P = 20 cm
Perimeter of a Triangle
The perimeter of any triangle is the sum of all three sides: P = a + b + c. For a right triangle where only two legs are known, the hypotenuse is calculated using the Pythagorean theorem: c = √(a² + b²).
| Triangle Type | Formula | Example |
|---|---|---|
| Scalene (all sides different) | P = a + b + c | 3+5+7 = 15 |
| Isosceles (2 equal sides) | P = 2a + b | 2(6)+4 = 16 |
| Equilateral (all equal) | P = 3s | 3×8 = 24 |
| Right (legs known) | P = a+b+√(a²+b²) | 3+4+5 = 12 |
Circumference of a Circle
The circumference is the perimeter of a circle — the distance around its edge. Formula: C = 2πr = πd, where r is the radius and d is the diameter. Pi (π) = 3.14159265...
C = 2 × π × r (using radius)
C = π × d (using diameter)
Example 1: r = 5 cm → C = 2 × 3.14159 × 5 = 31.42 cm
Example 2: d = 14 m → C = 3.14159 × 14 = 43.98 m
Reverse: r = C / (2π) | d = C / π
Perimeter of a Regular Polygon
A regular polygon has all sides equal and all angles equal. Its perimeter is simply: P = n × s, where n is the number of sides and s is the side length. This applies to pentagons (5), hexagons (6), octagons (8), and any regular shape.
| Shape | Sides | Formula | Example (side=4) |
|---|---|---|---|
| Triangle | 3 | 3s | 12 |
| Square | 4 | 4s | 16 |
| Pentagon | 5 | 5s | 20 |
| Hexagon | 6 | 6s | 24 |
| Heptagon | 7 | 7s | 28 |
| Octagon | 8 | 8s | 32 |