Rectangle Perimeter Calculator
Compute rectangle perimeter from length and width.
Use it for baseboards, fence lengths, and frame trim.
Multiple units supported.
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, but that gives twice the area — a completely different number. The perimeter is the distance around the rectangle, not anything to do with the interior. Watch the formula: l + w first, then multiply by 2.
Where rectangle perimeters come up in real projects:
- Baseboard / molding for a room. A 14 ft × 12 ft bedroom needs 2 × (14 + 12) = 52 linear ft of baseboard. Subtract door openings (usually 32 to 36 in each). One door = -3 ft, two doors = -6 ft. So 46 to 49 ft of actual baseboard.
- Fencing a backyard. A 30 ft × 50 ft yard needs 160 ft of fence — but subtract the house wall (the side that doesn’t need fencing). Often you only fence three sides: 30 + 50 + 30 = 110 ft. Or 30 + 50 = 80 ft for an L-shaped fence.
- Picture frame molding. A 16 in × 20 in artwork needs 2(16 + 20) = 72 in of molding. Buy 80 in (7 ft) to allow for the 45° mitre cuts at corners.
- Gutter around a hip roof. Each side of the roof drops to a gutter at the eaves. A 40 × 60 ft house has 200 linear ft of gutter, plus corner pieces and downspouts.
- Curb edging around a rectangular flower bed. A 4 × 8 ft raised bed needs 24 ft of border timbers or stones.
Worked example — fencing a yard with three gates:
Yard is 80 ft × 60 ft. Total perimeter: 2 × 140 = 280 ft. Three 4-ft-wide gates take 12 ft total. Fence material needed: 268 ft. With 8-ft panels: 33.5 panels, round up to 34. Plus 1 corner post per corner, plus posts at gate ends, plus line posts every 8 ft.
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.