Rectangle Perimeter Calculator

Compute rectangle perimeter from length and width.
Use it for baseboards, fence lengths, and frame trim.
Multiple units supported.

Perimeter

P = 2 × (l + w)

Two lengths, two widths. Add them, double the sum. A 12 ft × 8 ft room has perimeter 2 × 20 = 40 ft.

Why “two times length plus width” is the form, not “length times width times two”:

A common mental slip is to compute 2 × l × w, which gives twice the area, an entirely different quantity. The perimeter is the distance around the outside and has nothing to do with the interior. Watch the order: l + w first, then double it.

Where rectangle perimeters come up in real projects:

  • Baseboard for a room. A 14 ft × 12 ft bedroom needs 2 × (14 + 12) = 52 linear ft. Subtract the door openings, usually 32 to 36 in each, so one door leaves 49 ft and two leave 46 ft.
  • Fencing a backyard. A 30 ft × 50 ft yard has a 160 ft perimeter, but the side against the house rarely needs fencing. Three sides come to 30 + 50 + 30 = 110 ft, and an L along two sides is 80 ft.
  • Picture frame moulding. A 16 in × 20 in artwork has a 72 in perimeter, but that is not what you buy. Mitred corners run the moulding round the OUTSIDE of the picture, so each side gains twice the moulding width: 2-inch moulding on this frame needs 72 + 8 × 2 = 88 in, and you would buy 8 ft to have something to grip in the saw.
  • Gutter on a hip roof. All four eaves take gutter, so a 40 × 60 ft house needs 200 linear ft, plus corners and downspouts.
  • Edging a flower bed. A 4 × 8 ft raised bed takes 24 ft of border timber.

Worked example: fencing a yard with three gates

Yard is 80 ft × 60 ft. Perimeter: 2 × 140 = 280 ft. Three 4-ft gates take 12 ft, so 268 ft of fence. With 8-ft panels that is 33.5, round up to 34. Add four corner posts, two posts per gate, and a line post at every panel joint.

Quick math: same area, less material

A 6 × 24 rectangle and a 12 × 12 square both enclose 144 sq ft. Square perimeter: 48 ft. Rectangle perimeter: 60 ft. Same fenced area but the rectangle needs 25% more fence. If you have a budget for fencing, the closer to a square the cheaper.

For an exact L-shape or U-shape, calculate each segment separately and sum. Most real-world plots aren’t perfect rectangles.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.