Lelifi·tools

Perimeter Calculator

Perimeter is the distance around a shape. A 6 ft square has a perimeter of 24 ft, an 8 x 5 ft rectangle has 26 ft, and a circle of radius 7 ft has a circumference of 43.98 ft. Choose the shape above and the calculator shows the perimeter with the formula it used.

Pick a shape, type the sides or the radius, and read the distance around it, formula and all.

By the Lelifi editors ·

Key takeaways

Same 24 ft of fence, three different lawns1 x 112 x 104 x 86 x 6All four rectangles use 24 ft of fence. The areas run 11, 20, 32 and 36 sq ft: the square holds the most lawn.
Four rectangles with the same 24 ft perimeter hold 11, 20, 32 and 36 sq ft of area, and the square wins.
Three shapes, one perimeter eachSquares = 6, P = 24Rectangle12 x 7, P = 38Circler = 7, C = 43.98Each shape enters its own formula in the calculator and returns its boundary length.
The calculator's three most used modes: a 6 ft square at 24 ft, a 12 x 7 rectangle at 38 ft, and a radius 7 circle at 43.98 ft.
On this page
  1. What perimeter measures, and how to read it back
  2. The five formulas this calculator uses
  3. The circle case: perimeter becomes circumference
  4. Regular polygons: one side repeated n times
  5. Perimeter against area: the fence and the lawn
  6. Fencing, baseboards and other budget lines
  7. Walking and running: perimeter on the move

What perimeter measures, and how to read it back

Perimeter is the total length of a shape's boundary: the fence line around a yard, the tape measure run around a room, the chalk line around a ball field. The word itself carries the recipe, since the Greek roots mean measure around. Whatever the shape, the perimeter always comes out in plain length units, feet or meters or inches, never square units, because the walk around the edge is a one dimensional trip.

For shapes built from straight sides, the whole job is adding. Walk the boundary once, add every segment, and the sum is the perimeter. Wolfram MathWorld's perimeter entry (accessed 2026) defines it exactly this way for plane figures, and notes the special case that sends the idea further: for a circle the boundary is one smooth curve, so the perimeter is computed rather than walked, and mathematicians give it its own name, the circumference.

Keep the units honest and the answer stays useful. If two sides are in feet and one wall was measured in inches, convert first, then add, because a mixed unit sum is silently wrong. The NIST unit conversion guidance (SP 1038, 2006) recommends converting before computing and rounding only the final result, which fits perimeter work well: add full values, round the total once at the end.

The five formulas this calculator uses

Every common shape has a shortcut formula that skips the segment by segment walk. Each one is the segment sum in disguise, and each row below carries a worked example with real numbers.

The triangle row carries one quiet warning: the three numbers must be able to close up. No side can be longer than the other two combined, so sides of 2, 3 and 10 cannot form a triangle at all, and a perimeter computed from them describes nothing.

The circle case: perimeter becomes circumference

A circle's boundary has no corners and no straight segments, so addition cannot touch it. The boundary length is the circumference, and it follows from one constant: pi, about 3.14159, the ratio of every circle's boundary to its diameter. Double the radius for the diameter, multiply by pi, and the walk is done: C = 2 x pi x r, or the same thing written as C = pi x d.

Worked both ways at radius 7 ft: the diameter is 14 ft, so the circumference is 3.14159 x 14 = 43.98 ft, and the radius route gives 2 x 3.14159 x 7 = 43.98 ft, the same number because the formulas are one rearrangement of each other. MathWorld's entry on pi (accessed 2026) explains why the ratio comes out the same for every circle, large or small.

Rounding pi too early bends the answer. Carrying pi as 3.14 at radius 7 gives 43.96 ft instead of 43.98 ft, a two hundredth drift that grows with the circle. The same reason the widget computes with full precision applies here: convert and compute first, round the printed answer last.

Regular polygons: one side repeated n times

The last formula in the table covers every regular polygon at once. Regular means every side is the same length, so the segment by segment walk collapses to one multiplication: P = n x s, the number of sides times the side length. A hexagon with 3 in sides is 6 x 3 = 18, a pentagon with 4 in sides is 5 x 4 = 20, and a square is just the case n = 4, which is why the square formula and the polygon formula agree with each other.

ShapeFormulaWorked example
SquareP = 4ss = 9: 4 x 9 = 36
ShapeSides (n)Side lengthPerimeter
Square46 in24 in
Pentagon54 in20 in
Hexagon63 in18 in
Octagon82.5 in20 in

The table hides a useful pattern: as the side count grows at a fixed perimeter, each side shrinks. A 20 in perimeter is 4 sides of 5 in, 5 sides of 4 in, or 8 sides of 2.5 in, and pushed far enough it approaches a circle whose circumference is 20 in. That is the same limit the track section below touches: many short steps add to the same boundary as one smooth curve.

Irregular polygons are the leftover case. If the sides differ, the n x s shortcut no longer applies, and the honest method is the plain sum of measured sides. An L shaped room, a truncated lot line, or a garden bed with a chamfered corner all fall back to the tape measure and the addition the first section described. The widget's polygon mode expects the sides to be equal, so check that before entering n and s.

Perimeter against area: the fence and the lawn

Perimeter and area answer different questions, and mixing them up is the classic measuring mistake. Perimeter is the fence run; area is the lawn inside it. Paint, baseboards, fence rails and trim follow the perimeter. Seed, mulch, sod and flooring follow the area. The units tell them apart at a glance: feet against square feet.

The two quantities also move independently, which the table below shows with four rectangles that all use exactly 24 ft of fence.

Sides (ft)Perimeter (ft)Area (sq ft)
1 x 112411
2 x 102420
4 x 82432
6 x 62436

The same 24 ft of boundary holds anywhere from 11 to 36 sq ft depending on the proportions, and the square, the most compact of the four, holds the most. Stretch the rectangle and the lawn shrinks while the fence bill stays put. That is why a fence quote and a lawn order are quoted from two different measurements, and why the square footage calculator belongs next to this page in the toolkit: perimeter plans the edge, area plans the inside.

Fencing, baseboards and other budget lines

Fencing is the clearest budget case. A yard measuring 40 ft by 25 ft has a perimeter of 2 x (40 + 25) = 130 ft. At $12 per installed foot, the fence line costs 130 x 12 = $1,560, and a gate shifts a few feet of that line from fence to gate pricing. Because every side of the yard feeds the total, a two foot measuring error on one boundary quietly moves the whole quote, so measure each run before pricing.

Baseboards run the same arithmetic indoors. A 15 ft by 12 ft room has a perimeter of 2 x (15 + 12) = 54 ft, and the doorway eats about 3 ft of it, so the trim order is roughly 51 ft, plus one cut of slack per corner. Crown molding and gutter runs follow the identical pattern: the boundary length, minus openings, plus waste.

ProjectMeasurementsPerimeterOrder line
Backyard fence40 x 25 ft130 ft130 ft at $12 per foot is $1,560
Living room baseboard15 x 12 ft, one 3 ft doorway54 ft51 ft plus corner slack
Plywood edge banding4 x 8 ft sheet24 ft24 ft of banding per sheet
Picture frame24 x 18 in84 in84 in of moulding before miter cuts

The order line column is where the perimeter turns into money. Fencing quotes per installed foot, trim quotes per eight or twelve foot stick, and both convert the boundary length into a parts list. Round the wrong direction and the job comes up one stick short; round the right direction and the offcut bin absorbs the slack.

Walking and running: perimeter on the move

Sports and travel use the circle and oval versions. An Olympic running track measures 400 m along its innermost lane, a circumference figure set by the shape of the loop rather than by straight segments. Walkers on a park loop talk about their route in exactly these terms: two laps of a quarter mile path is half a mile of boundary walked twice.

The same idea repeats at every scale. A city block has a perimeter you can pace in minutes, a farm field has one a surveyor prices in hours, and a tabletop game map has one you count in grid edges. Each case is the definition from the first section, applied to a boundary you can physically travel: start at a point, follow the edge, and stop where you began.

One caution for fitness tracking: a GPS trace of a loop usually reads slightly short of the true perimeter, because the device samples positions and cuts the corners between them. A measured 400 m lap can log as 396 m, and the drift repeats every lap. When the boundary matters, trust the surveyed or computed figure, and let the walk be the check rather than the source. When the next step is the inside rather than the edge, the area calculator takes over, and for round projects the circumference calculator works the circle case in depth.

Frequently asked questions

What is the perimeter of a 6 foot square?

24 ft. A square has four equal sides, so P = 4s = 4 x 6 = 24 ft.

How do I find the perimeter of a rectangle?

Add the length and width, then double the sum: P = 2(length + width). An 8 by 5 ft rectangle gives 2 x 13 = 26 ft.

What is the perimeter of a circle called?

The circumference. It is computed as C = 2 x pi x r, so a circle of radius 7 ft has a perimeter of about 43.98 ft.

How do I find the perimeter of an irregular shape?

Add every side. An L shaped room with runs of 10, 4, 6, 2, 4 and 2 ft has a perimeter of 10 + 4 + 6 + 2 + 4 + 2 = 28 ft, with no shortcut formula.

What is the perimeter of a 4 by 8 sheet of plywood?

24 ft. P = 2 x (4 + 8) = 24, so a full sheet carries 24 ft of edge, which is why the trim math for one sheet never needs a calculator.

Is perimeter measured in square units?

No. Perimeter is a length, so it uses feet, meters or inches. Square units belong to area, which measures the surface inside the boundary.

Can two shapes have the same perimeter but different areas?

Yes, and it happens constantly. Rectangles of 1 x 11 and 6 x 6 both have a 24 ft perimeter, but their areas are 11 sq ft and 36 sq ft.

How much fencing do I need for a 40 by 25 ft yard?

130 ft around, from P = 2 x (40 + 25). At $12 per foot the fence line runs 130 x 12 = $1,560 before gates and corners hardware.

How do I find the perimeter of a triangle with sides 5, 6 and 10?

Add the three sides: 5 + 6 + 10 = 21. Check that the longest side is shorter than the other two combined, which holds here, so the triangle can close.

What is the perimeter of a hexagon with 3 inch sides?

18 in. A regular hexagon has 6 equal sides, so P = 6 x 3 = 18 in.

How many baseboards do I need for a 15 by 12 ft room?

The perimeter is 2 x (15 + 12) = 54 ft, and a 3 ft doorway removes 3 ft of it, so order about 51 ft plus a little slack for corner cuts.

Does doubling the sides double the perimeter?

Yes. Perimeter scales in step with length: a 6 ft square has 24 ft of edge and a 12 ft square has 48 ft, while the area inside grows by four times, not two.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.