Formula

Perimeter of a rectangle

Also written: perimeter formula · 2l + 2w · distance around a rectangle

P=2l+2wP = 2l + 2w

The perimeter of a rectangle is twice its length plus twice its width, because opposite sides are equal. For any other shape, add every side.

What each part means

ll
the length
ww
the width

When to use it

You need the distance around a shape — fencing, framing, edging, trim. For shapes that are not rectangles, add the sides instead.

The general rule is simpler than the formula

For any shape with straight sides, the perimeter is the sum of the sides. That is the definition, and it never fails.

8+5+8+5=268 + 5 + 8 + 5 = 26

The rectangle formula is that addition grouped, nothing more:

8+82l+5+52w=2l+2w\underbrace{8 + 8}_{2l} + \underbrace{5 + 5}_{2w} = 2l + 2w

A square has four equal sides, so P=4sP = 4s for the same reason.

Units are never squared

Perimeter is a distance, so it is measured in cm or m. A perimeter given in cm² has been confused with an area, and the units alone reveal it.

Perimeter tells you almost nothing about area

The two vary independently, which surprises people.

RectanglePerimeterArea
1×111 \times 1124241111
4×84 \times 824243232
6×66 \times 624243636

Same fence, triple the field. For a fixed perimeter the area is largest when the shape is squarest — which is why fields, rooms and packaging tend towards square.

Rearranged

l=P2w2w=P2l2l = \frac{P - 2w}{2} \qquad w = \frac{P - 2l}{2}

In practice: subtract the pair you know from the perimeter, then halve what is left. A perimeter of 3030 with a length of 99 leaves 3018=1230 - 18 = 12 for two widths, so each is 66.

Read the question first

“Perimeter” and “how much fencing” are usually the same number — but not when a side is left open for a gate or a wall. See perimeter.

Lessons that teach this

Related