The perimeter is the length of the boundary of a shape: how much fence a garden needs, how much trim goes round a room or how far a runner goes round a track. For circles it is called the circumference.
How to use the Perimeter Calculator
- Shape
- Side length a
- Length a
- Width b
- Side a
- Side b
- Side c
- Side d
- Radius r
- Central angle α
- Semi-axis a
- Semi-axis b
- Outer radius R
- Inner radius r
- Number of sides n
Results update as you type, and everything is calculated in your browser.
How it works
Choose the shape and enter its dimensions. Straight-sided shapes simply add their sides. Ellipses have no exact elementary formula, so Ramanujan’s second approximation is used, which is accurate to a few parts per billion for most ellipses.
Inputs explained
| Field | What to enter |
|---|---|
| Shape | Choose one: Square, Rectangle, Triangle (three sides), Circle … |
| Side length a | Units: cm, m, mm, in, ft, yd … |
| Length a | Units: cm, m, mm, in, ft, yd … |
| Width b | Units: cm, m, mm, in, ft, yd … |
| Side a | Units: cm, m, mm, in, ft, yd … |
| Side b | Units: cm, m, mm, in, ft, yd … |
| Side c | Units: cm, m, mm, in, ft, yd … |
| Side d | Units: cm, m, mm, in, ft, yd … |
| Radius r | Units: cm, m, mm, in, ft, yd … |
| Central angle α | Units: °, rad, π rad, grad, turn |
| Semi-axis a | Units: cm, m, mm, in, ft, yd … |
| Semi-axis b | Units: cm, m, mm, in, ft, yd … |
| Outer radius R | Units: cm, m, mm, in, ft, yd … |
| Inner radius r | Units: cm, m, mm, in, ft, yd … |
| Number of sides n | A number |
Example values
How the main result changes when Side length a changes and everything else stays at the example values above:
| Side length a (cm) | Perimeter (cm) |
|---|---|
| 2.5 | 26 |
| 3.75 | 26 |
| 5 | 26 |
| 6.25 | 26 |
| 7.5 | 26 |
| 10 | 26 |
Formula
Square 4a · Rectangle 2(a + b) · Triangle a + b + c · Circle 2πr · Semicircle πr + 2r
Sector 2r + rα · Ellipse ≈ π(a + b)(1 + 3h/(10 + √(4 − 3h))), h = ((a − b)/(a + b))²
Worked example
Inputs: Shape: Rectangle; Length a: 8 cm; Width b: 5 cm.
Results: Perimeter = 26 cm.
Key terms
- Perimeter
- The total length of a shape's boundary.
Frequently asked questions
What is the difference between perimeter and area?
Perimeter is the length around a shape; area is the surface inside it.
Is circumference the same as perimeter?
Yes. Circumference is the perimeter of a circle.
Why is the ellipse perimeter approximate?
It needs an elliptic integral; Ramanujan's formula is extremely close.
How much fencing does a 10 m × 6 m garden need?
2 × (10 + 6) = 32 m.