Perimeter of a Rectangle Calculator
A perimeter of a rectangle calculator doubles length plus width: a 20 × 12 ft rectangle has a 64 ft perimeter, the figure for fencing, edging, or baseboard.
A perimeter of a rectangle calculator adds up the distance around the edge of a rectangular space. The shortcut is 2 × (length + width). A 20 ft by 12 ft rectangle has a perimeter of 2 × 32 = 64 ft, which is the amount of fence, edging, or baseboard that runs around it.
The formula in plain words
Walk around the rectangle. You go along the length, then the width, then back along the length, then back along the width. That is length + width + length + width.
Because the two lengths are the same and the two widths are the same, you can add one length and one width and double it. That is the formula.
The answer is a distance, so it is in feet. Area is a different answer in square feet, so do not confuse the two.
Worked examples
Example 1, the default: 20 ft by 12 ft.
- Length + width: 20 + 12 = 32 ft
- Perimeter: 2 × 32 = 64 ft
- Area for comparison: 20 × 12 = 240 sq ft
Example 2, a fenced yard: 40 ft by 30 ft.
- Perimeter: 2 × (40 + 30) = 140 ft
- Panels of 8 ft: 140 ÷ 8 = 17.5, rounded up to 18 panels
- Posts around a closed loop: 140 ÷ 8 = 17.5, rounded up to 18 posts
- If a 4 ft gate takes the place of fence, the fence run drops to 136 ft
A closed loop has as many posts as sections, since the last section ends at the first post. An open fence line needs one more post than sections.
Perimeter and area of common rectangles
| Size | Perimeter | Area |
|---|---|---|
| 10 × 8 ft | 36 ft | 80 sq ft |
| 12 × 12 ft | 48 ft | 144 sq ft |
| 15 × 10 ft | 50 ft | 150 sq ft |
| 20 × 12 ft | 64 ft | 240 sq ft |
| 40 × 30 ft | 140 ft | 1,200 sq ft |
| 100 × 50 ft | 300 ft | 5,000 sq ft |
Two shapes can share a perimeter and have very different areas. A 15 × 10 ft rectangle and a 20 × 5 ft rectangle both have a 50 ft perimeter, but the first holds 150 sq ft and the second only 100 sq ft.
How to measure
Measure two adjacent sides with a tape or a measuring wheel. For a fence or edging job, measure along the line where the material will actually go, not the property line on paper.
Indoors, measure the walls. For baseboard, take the perimeter and subtract the width of each doorway, since trim does not run across them. A 14 × 11 ft room has a 50 ft perimeter, and two 3 ft doors bring the baseboard run to 44 ft.
Common mistakes
- Using area when the material runs along an edge, or perimeter when it covers the surface.
- Adding only two sides. A common slip is to add length and width and stop, which gives half the answer.
- Forgetting openings. Gates, doors, and gaps for a driveway all reduce the run.
- Ignoring corners. Fence corners and trim miters use a little extra, so round up.
- Mixing feet and inches in the same sum.
An L-shaped space
Take a 30 × 20 ft rectangle and cut a 10 × 8 ft corner out of it. The perimeter of the L is still 2 × (30 + 20) = 100 ft, because the notch moves two sides inward without changing their combined length. The area does drop, from 600 sq ft to 520 sq ft. This shortcut works for any L made of right angles and is a handy check on a long measurement.
Using the perimeter to price a job
Material priced by the linear foot multiplies straight onto the perimeter. If edging costs $2.50 per foot, the 64 ft run around the 20 × 12 ft bed is 64 × $2.50 = $160. Add 5% to 10% for cuts at corners. If the product comes in 8 ft lengths, divide 64 by 8 and you need 8 pieces.
Related calculators
Once you have the perimeter, the fence calculator finds panels and posts, and the fence post calculator counts posts at your spacing. For trim, use the baseboard calculator. To check the matching floor area, the square footage calculator multiplies the same two sides.
Frequently asked questions
What's the formula for the perimeter of a rectangle?
Perimeter = 2 × (length + width). For a 20 ft by 12 ft rectangle, that is 2 × 32 = 64 ft. It is the same as adding all four sides, 20 + 12 + 20 + 12, because opposite sides are equal.
What's the difference between perimeter and area?
Perimeter is the distance around the edge, in feet. Area is the surface inside, in square feet. The 20 × 12 ft rectangle has a 64 ft perimeter and a 240 sq ft area. Fencing and trim are bought by perimeter, while flooring and sod are bought by area.
Do I need to measure all four sides of a rectangle?
No. Two adjacent sides are enough, because the opposite sides match. If your four measurements disagree by more than an inch or two, the space is probably not a true rectangle, and you should measure the diagonals to check it is square.
Does this work for a space that isn't a perfect rectangle?
Only for the rectangular part. For an L-shaped yard, measure every outside run and add them. A trick for L shapes: the perimeter equals that of the bounding rectangle, so a 30 × 20 ft L with a corner cut out still has a 100 ft perimeter.
Estimates only. Verify quantities with your supplier before purchasing.