KitQuarter

Perimeter Calculator: Find Any Shape's Perimeter

Pick a shape, enter its side lengths, and get the perimeter instantly, with the formula used and every step of the calculation shown.

James Carter, Math and Tools Editor
Reviewed by James Carter, Math and Tools Editor
Formulas verified against standard references. Calculator logic tested with verified worked examples. Last reviewed: October 2026. Our methodology

What Perimeter Means

The perimeter is the total distance around the outside of a flat shape. Walk the boundary of a garden and the steps you take add up to its perimeter. For polygons it is the sum of the side lengths, and for a circle it is the circumference, 2 times pi times the radius.

Perimeter is a length, so it is measured in linear units: centimeters, meters, inches, or feet. That is the key difference from area, which is measured in square units. Doubling every side of a shape doubles its perimeter, while its area grows four times, a distinction that matters whenever you compare fencing costs against turf costs.

Perimeter hero: 3D square, rectangle, circle, and triangle with labeled dimensions
Eight shapes, one idea: add up the boundary.

Formulas for the Eight Shapes

Each shape in the calculator has its own formula, but every one follows the same idea: add up the boundary. Regular shapes with equal sides use multiplication as a shortcut, while irregular shapes simply sum each side. The ellipse is the only shape here without an exact elementary formula, so the calculator uses Ramanujan's approximation, which is accurate to well within any practical need.

For a circle you can enter the radius directly. If you only know the diameter, halve it first, because using the diameter as the radius doubles the answer. The circle calculator covers the matching area and diameter conversions when you need them.

ShapeFormulaInputs
SquareP = 4 x sideSide length
RectangleP = 2 x (length + width)Length, width
TriangleP = a + b + cThree sides
CircleP = 2 x pi x rRadius
ParallelogramP = 2 x (base + side)Base, side
TrapezoidP = a + b + c + dFour sides
Regular polygonP = n x sideSides count, side
EllipseRamanujan approximationTwo semi-axes
Perimeter formulas chart: square, rectangle, circle, and triangle formulas with examples
Each formula adds the boundary; regular shapes use multiplication as a shortcut.

Worked Examples

Example 1, rectangle: a garden 8 m by 4 m needs 2 x (8 + 4) = 24 m of fence before gates. Example 2, triangle: sides 5, 7, and 9 give 5 + 7 + 9 = 21, and they form a valid triangle because each pair sums to more than the third side.

Example 3, circle: a wheel with radius 7 cm has circumference 2 x pi x 7 = 43.98 cm. Example 4, regular hexagon: 6 sides of 2 ft give 6 x 2 = 12 ft. Example 5, ellipse: semi-axes 5 and 3 give approximately 25.53 by Ramanujan's formula.

ShapeInputsPerimeter
Rectangle8 by 424
Triangle5, 7, 921
Circler = 743.98
Hexagon6 sides of 212
Ellipsea = 5, b = 325.53 approx

Perimeter vs Area

Perimeter and area answer different questions. Perimeter tells you how much fence, trim, or edging you need. Area tells you how much paint, carpet, or soil covers the inside. A long thin rectangle and a square can share the same perimeter while their areas differ wildly: a 1 by 9 rectangle and a 5 by 5 square both have perimeter 20, but areas 9 and 25.

Because of that, never buy material by the wrong measure. Fencing is priced per linear foot from the perimeter, while sod is priced per square foot from the area. Mixing the two up is the most expensive mistake in garden and flooring projects.

Common Mistakes

The most common mistake is mixing units: length in feet and width in inches gives a meaningless total, so convert everything to one unit first. The second is entering a diameter where a radius belongs, which doubles the circle answer. The third is forgetting that a triangle's sides must satisfy the triangle inequality, which the calculator checks for you.

A fourth mistake is rounding too early. Keep two or three extra digits through the working and round only the final answer, especially with pi, where 3.14 instead of 3.14159 shifts longer perimeters noticeably.

Practical Uses

Perimeter runs through everyday projects: fencing a yard, framing a picture, edging a garden bed, measuring a room for baseboards, or sizing a running track. Builders use it for trim and molding, teachers use it for geometry homework, and crafters use it for borders and bindings.

For a fence or edging project, measure each side, add a small waste allowance for cuts and overlaps, and round up to the lengths your supplier sells. An exact decimal is less useful than a rounded-up order that covers the job with material to spare.

Perimeter second hero: 3D measuring of a garden boundary with a tape measure
A garden 8 m by 4 m needs 24 m of fence before gates.

Frequently asked questions

What is the formula for the perimeter of a rectangle?

P = 2 x (length + width). A rectangle 8 by 4 has perimeter 2 x (8 + 4) = 24.

How do you find the perimeter of a triangle?

Add the three side lengths: P = a + b + c. Sides 5, 7, and 9 give 5 + 7 + 9 = 21.

What is the perimeter of a circle called?

The circumference. It equals 2 x pi x radius, or pi x diameter. A circle with radius 7 has circumference about 43.98.

Can you find perimeter if you only know the area?

Not in general. Many different shapes share the same area with different perimeters, so area alone is not enough except for shapes fixed by one measurement, like a square or circle.

What units is perimeter measured in?

Linear units: the same unit as your side lengths. Enter centimeters and the perimeter comes out in centimeters; it is never square units.

How accurate is the ellipse perimeter?

The calculator uses Ramanujan's approximation, which is accurate to far better than 0.1 percent for typical ellipses, plenty for practical use.

Do the triangle sides need to satisfy any rule?

Yes, the triangle inequality: each pair of sides must add up to more than the third side. The calculator rejects side sets that cannot form a triangle.