Calculate the perimeter of rectangles, triangles, circles, polygons, and more, or solve for a missing dimension from a known perimeter.
Perimeter Formula
Perimeter is the total length around the outside of a two-dimensional shape. The formula depends on the shape you are measuring, so this calculator switches the formula based on the shape you choose.
Rectangle: P = 2(l + w) Square: P = 4s Triangle: P = a + b + c Parallelogram: P = 2(b + s) Trapezoid / quadrilateral: P = a + b + c + d Circle: C = 2*pi*r = pi*d Semicircle: P = pi*r + 2r Quarter circle: P = pi*r/2 + 2r Regular polygon: P = n * s Ellipse (Ramanujan II): P ≈ pi(a + b)[1 + 3h / (10 + sqrt(4 - 3h))] Irregular polygon: P = sum of all sides
- P = perimeter (the distance around the shape)
- l, w = length and width of a rectangle
- s = side length
- a, b, c, d = individual side lengths
- r = radius, d = diameter
- n = number of sides of a regular polygon
- a, b (ellipse) = semi-major and semi-minor axes, h = ((a − b) / (a + b))²
For straight-sided shapes you add the side lengths together. For a square or regular polygon you multiply one side by the number of equal sides. For circular shapes the boundary is based on pi: a full circle uses the circumference, while a semicircle and quarter circle add the straight edges to part of that curve. The ellipse uses Ramanujan’s second approximation because an ellipse perimeter has no simple exact formula.
The calculator also runs in reverse. If you already know the perimeter, you can solve for a missing dimension, such as the side of a square (s = P / 4), one side of a rectangle when the other is known (missing side = P / 2 − known side), or the radius of a circle (r = P / 2pi).
Common Perimeter Formulas by Shape
Use this table as a quick reference for which inputs each shape needs.
| Shape | Inputs needed | Perimeter formula |
|---|---|---|
| Square | Side | P = 4s |
| Rectangle | Length, width | P = 2(l + w) |
| Triangle | Three sides | P = a + b + c |
| Circle | Radius or diameter | C = 2*pi*r |
| Regular polygon | Number of sides, side length | P = n * s |
Interpreting the Result
Perimeter and area answer different questions. Perimeter is a length, measured in single units such as feet or meters. Area is the space inside, measured in square units. The table below shows how the same units apply to each.
| Measurement | What it tells you | Example unit |
|---|---|---|
| Perimeter | Distance around the edge (fencing, trim, border) | ft, m |
| Area | Space covered inside the boundary (flooring, paint) | ft², m² |
Example Problems
Example 1: Rectangle. A garden bed is 12 feet long and 8 feet wide. Using P = 2(l + w), the perimeter is 2(12 + 8) = 2(20) = 40 feet. You would need 40 feet of edging to surround it.
Example 2: Circle. A round table has a radius of 3 feet. Using C = 2*pi*r, the perimeter (circumference) is 2 × 3.1416 × 3 ≈ 18.85 feet.
Frequently Asked Questions
What is the difference between perimeter and circumference?
They measure the same thing: the distance around a shape. Perimeter is the general term used for any shape, while circumference is the specific name for the perimeter of a circle. The calculator labels the circle result as circumference but treats it the same way.
Can I find a missing side if I know the perimeter?
Yes. Switch the solve-for selector to “Missing dimension from perimeter.” Enter the known perimeter and any required known dimension, and the calculator returns the missing side. For example, a square with a perimeter of 24 has a side of 24 / 4 = 6.
How do you find the perimeter of an irregular shape?
Add the lengths of every outside side. Choose the custom polygon side list option and enter each side length separated by commas. The calculator sums them to give the total perimeter. The shape does not need equal sides.
