Construction

Fence Calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Source

Please enter a valid URL. Only HTTPS URLs are supported.

Styling

Input border focus color, switchbox checked color, select item hover color etc.

Advanced

Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a fence calculator?

A fence calculator tells you how much material a straight run of fence needs: how many posts to set, how many horizontal rails to span between them, and how many vertical pickets to cover the face. You enter the total fence length, the spacing between posts, the number of rails in each section, and the width of a picket plus the gap you want between pickets. The calculator returns the three counts so you can order lumber in one trip instead of measuring and tallying by hand.

Getting the counts right up front lets you price the job, plan post holes, and avoid both running short mid-build and paying for a pile of leftover boards.

How does it work?

A fence is a series of sections (also called bays or panels) — the runs of rail and picket between two neighboring posts. If the fence is LL long and posts are spaced SS apart, the number of sections is the length divided by the spacing, rounded up so the last, possibly shorter, bay still gets its own post:

sections=LS\text{sections} = \left\lceil \frac{L}{S} \right\rceil

A straight fence needs one more post than it has sections, because both ends are capped:

posts=LS+1\text{posts} = \left\lceil \frac{L}{S} \right\rceil + 1

Each section carries the same number of rails, RR (typically 2 for a short fence, 3 for a tall privacy fence), so the total rail count is:

rails=sections×R\text{rails} = \text{sections} \times R

Pickets are laid across the whole face. Each picket occupies its own width ww plus the gap gg you leave to the next one, so one picket “slot” is w+gw + g wide. Dividing the fence length by that slot width and rounding up gives the picket count:

pickets=Lw+g\text{pickets} = \left\lceil \frac{L}{w + g} \right\rceil

All four inputs are converted to a single common unit before dividing, so you can mix systems — enter the length in metres and the picket width in centimetres (or feet and inches) and the math still works.

Worked example

Take a 30 m fence with posts every 2.4 m, 3 rails per section, 14 cm wide pickets, and a 1 cm gap between them.

  • Sections: 30/2.4=12.5=13\lceil 30 / 2.4 \rceil = \lceil 12.5 \rceil = 13 bays.
  • Posts: 13+1=1413 + 1 = 14 posts — one at each bay boundary plus the closing end post.
  • Rails: 13×3=3913 \times 3 = 39 rails.
  • Pickets: each slot is 0.14+0.01=0.15 m0.14 + 0.01 = 0.15 \text{ m} wide, so 30/0.15=200\lceil 30 / 0.15 \rceil = 200 pickets.

So this fence needs 14 posts, 39 rails, and 200 pickets.

Practical notes

  • Buy a little extra. The counts above are the exact minimum. Add roughly 10% for split boards, mis-cuts, and the odd warped picket you set aside.
  • Corners and gates change the post count. The +1+1 end post assumes one straight run. Each corner or direction change adds a post, and a gate opening needs a sturdier post on each side, so add those in separately.
  • The gap can be zero. Set the gap to 0 for a solid privacy fence where pickets butt together; the picket formula then just divides the length by the board width.
  • Set posts a touch deeper than you think. Post length is not counted here, but a common rule is to bury about one-third of the post — pair this tool with the concrete calculator to estimate the bags needed to set each post.
  • Plan the wider project too. Use the square footage calculator to size a stain or paint order for the finished fence, or the mulch calculator for the bed you are fencing in.

Frequently asked questions

How many posts for a 100 ft fence with 8 ft spacing? There are 100/8=13\lceil 100 / 8 \rceil = 13 sections, so you need 13+1=1413 + 1 = 14 posts.

Do I count a post at both ends? Yes. A straight fence has a post at every section boundary and one extra to close the final end, which is why the formula adds one.

Should I use 2 or 3 rails? Use 2 rails for fences up to about 4 ft tall and 3 rails for taller privacy or security fences, where the middle rail keeps long pickets from bowing.

Report a bug

This field is required.