Skip to main content
Fence Calculator

Fence perimeter calculator

Get the total perimeter feet and the post sections that length implies for a rectangular yard, with the spacing math shown.

Fence perimeter

Enter your measurements and the result updates as you type.

Overview

For a rectangular yard, the perimeter is two times the length plus two times the width, and once you have that footage the post-planning math follows from your spacing. This calculator returns both: the perimeter feet and how many post sections a chosen spacing splits the run into.

The section count rounds up, since a partial spacing at the end of the run still needs a section and a post. For a yard that is not a rectangle, walk the boundary with the linear feet calculator instead and feed its total into the full fence take-off.

Assumptions

  • A rectangular yard: perimeter is two times length plus two times width.
  • Post sections equal the perimeter divided by the selected spacing, rounded up.
  • Gate openings and house returns still need subtracting from the run for a true material order.

Common mistakes

  • Adding only two sides when the run wraps the yard both directions, which halves the real perimeter.
  • Splitting the perimeter by a spacing and rounding down, which leaves the last section short of a post.
  • Building the estimate on area instead of perimeter, when posts and rails follow the outline of the lot, not its square footage.

In-depth guides

Buying guide

A fence perimeter calculator does one job precisely for a rectangular yard: it turns a length and a width into a total run, using two times the length plus two times the width, and then it carries that run straight into post planning. For a lot that really is a rectangle, this is faster and just as accurate as walking every side with a tape, since a rectangle has exactly two distinct dimensions and the perimeter formula captures the whole boundary from them. A 150 by 100 foot yard comes out to 500 feet of perimeter: 300 feet from the two long sides, 200 feet from the two short sides. That figure is the full outline of the lot, the number a material order for posts, rails and panel around the whole yard needs to start from, before any gate openings or house returns are subtracted from it, and it takes the measurement out of the field entirely once a reliable length and width are already known.

Once the perimeter is known, the calculator divides it by a chosen post spacing to get a section count, and that division always rounds up, not down. A 500 foot perimeter at 8 foot spacing is 62.5 sections mathematically, but a partial section at the end of a run still needs a full post to close it, so the real count is 63 sections and, with the closing end post, 64 posts along the run before corners and gates are added on top. Rounding down here is one of the more common ways a post order comes up short, since it quietly drops the post needed to terminate the last, shorter-than-full-spacing section, a mistake that only surfaces once the crew reaches the end of the run and finds one fewer post than the layout needs. The fence post calculator carries this same rounding logic forward into a full post count once height, spacing and corner or gate posts are all factored in together, and the fence post concrete calculator picks up from there to size the concrete needed per hole.

Perimeter and linear feet are the same number for a rectangle, which is why the formulas feel interchangeable on a simple lot, but they stop agreeing the moment the boundary is not a clean rectangle. An L-shaped yard, a lot with a jog around a shed, or any boundary with more than four straight sides overcounts or undercounts under the plain rectangle formula unless the overlap or extra turns are handled by hand, which gets error-prone fast. For that case the linear feet calculator is the correct tool, since it adds each straight segment of the actual boundary one at a time rather than assuming two pairs of parallel sides. A yard with real elevation change across it adds a separate wrinkle that neither the rectangle formula nor straight segment addition captures on their own: a fence line that follows a grade is longer than its flat horizontal span, and the fence slope calculator converts a horizontal run and a slope percentage into the built length that grade actually requires.

Perimeter is ground footage only, independent of fence height, which is a distinction worth holding onto when a quote or a material list seems to shift unexpectedly. The same 500 foot perimeter needs a very different board, rail and panel count at 4 feet than it does at 6 feet, but the perimeter figure itself does not move, since height only changes what sits on top of that footprint, not the footprint. A narrower, barrier-specific version of this same rectangle math comes up for pool enclosures, where the pool fence calculator pairs a rectangular perimeter with the height and gate-latching defaults that pool barrier codes expect, rather than a general yard perimeter. For what actually counts as a legal boundary line to fence along in the first place, including easements and required setbacks from the property edge, see the property line and setback guide, and for how a given perimeter translates into material quantities by fence type, see the fence materials guide. Two further guides worth reading before ordering off a perimeter figure are how many posts for a fence, which works the spacing math in more detail, and how to measure your yard for a fence, which covers the practical side of getting accurate length and width numbers in the first place. The complete set of measurement tools is on the measurement calculators hub, alongside pool code specifics in pool fence code compliance. One more point worth flagging before ordering off a rectangle perimeter: a yard that looks rectangular on a plat can still have a slightly bowed or offset fence line in practice, where an existing wall, a shared driveway edge or a utility easement nibbles a few feet off one side, so it is worth a quick walk of the actual corners with a tape before treating the plat dimensions as final, even when the math itself is simple.

Frequently asked questions

What is the perimeter of a 150 by 100 foot yard?

The perimeter is 500 feet: two times 150 gives 300, two times 100 gives 200, and the sum is 500. That is the run a fence around the lot would span.

What is the formula for fence perimeter?

Multiply the length by two, multiply the width by two, and add the results together. The perimeter is then divided by your post spacing to plan the sections, rounding up to a whole number.

How many posts for a 500 foot perimeter at 8 foot spacing?

Five hundred feet divided by 8 feet is 62.5 sections, rounded up to 63, which with the end post gives 64 posts for the run before corners and gates are added.

My yard is L-shaped, not a rectangle. What now?

The rectangle formula overcounts on an L-shape unless you subtract the overlap. Instead, measure the actual boundary segment by segment with the linear feet calculator, and use that total as the run through your post spacing.

Does the perimeter change with fence height?

No. Perimeter is ground footage only: height changes board count, panel rows and cost, never the perimeter itself. Use the height and style in the material calculators for the board side of the take-off.

Should gates be subtracted from the perimeter?

Yes. The perimeter tells you the full outline, but panels do not fill gate openings, so subtract gate widths from the run when you order material. Keep the gate posts in the count, since a gate still needs a post on each side.

Is this the same as linear feet?

For a rectangle they coincide: linear feet of fence around the lot equals the perimeter. The two calculators diverge when a lot is irregular, which is when linear feet (measured side by side) is the correct tool.

Can I use this for a pool fence perimeter?

Yes, but restrict it to the barrier footprint rather than the whole yard: the pool fence calculator already carries the height and pool-specific defaults, and pairing the rectangle perimeter with a 4 to 6 foot height scaffold covers the common enclosure layout.