Perimeter Calculator
The perimeter is the total distance around a shape — the length of fence, edging or trim you would need.
Perimeter of a shape
Formulas
| Shape | Area | Perimeter |
|---|---|---|
| Square (side s) | s² | 4s |
| Rectangle (l × w) | l × w | 2(l + w) |
| Triangle | ½ × b × h | a + b + c |
| Circle (radius r) | πr² | 2πr |
| Ellipse (semi-axes a, b) | πab | ≈ Ramanujan approximation |
| Trapezoid | (a + b) ÷ 2 × h | a + b + c + d |
| Parallelogram | b × h | 2(a + b) |
| Rhombus (diagonals p, q) | pq ÷ 2 | 4s |
| Sector (angle θ°) | (θ ÷ 360) × πr² | 2r + (θ ÷ 360) × 2πr |
| Regular n-gon (side s) | ns² ÷ (4 tan(180°/n)) | n × s |
Worked example
A rectangular garden 8 m × 5 m
- P = 2 × (length + width)
- 2 × (8 + 5) = 2 × 13 = 26
26 m of fencing goes all the way round.
Circles and ellipses
A circle’s perimeter is called its circumference: C = 2πr = πd. An ellipse has no simple exact formula; this calculator uses Srinivasa Ramanujan’s second approximation, which is accurate to within a tiny fraction of a percent even for long, thin ellipses.