Fence Calculator

Updated 2026-10-15

Enter the length of your fence run, its height, the post spacing and the size of your pickets. The calculator works out the posts, rails and pickets to buy, how long the posts need to be, and how much concrete it takes to set them.

One straight run. Leave out the width of any gates.
Usually 6–8 ft (1.8–2.4 m) center to center.
A "1×6" picket is actually 5.5 in wide.
0 for a solid privacy fence.

How the fence calculator works

A typical wood fence is built from three kinds of parts. Posts are set in the ground at regular spacing. Horizontal rails run between the posts, and vertical pickets are fastened to the rails. The calculator treats your fence as one straight run, divides it into sections, and counts each part from there.

Sections = fence length ÷ post spacing, rounded up
Posts = sections + 1
Rails = sections × rails per section
Pickets = fence length ÷ (picket width + gap) × (1 + extra %), rounded up
Post length = fence height + depth in the ground

The post concrete assumes a round hole about three times as wide as the post: 10 in across for a 4×4 post (which is really 3.5 × 3.5 in), or 25 cm for a 9 × 9 cm post, filled with concrete for the full buried depth. An 80 lb bag of premixed concrete makes about 0.6 cubic feet, and a 25 kg bag about 0.012 m³ (12 liters). Yields differ between products, so check the figure printed on the bag you buy.

Worked example

Take a 100 ft run of 6 ft fence with posts every 8 ft. 100 ÷ 8 = 12.5, which rounds up to 13 sections, so you need 14 posts. Burying each post 2 ft means buying 8 ft posts. With 3 rails per section, that's 39 rails, 8 ft long. Each 5.5 in picket plus a 0.5 in gap takes up 6 in, so 1,200 in of fence needs 200 pickets, and 5% spare makes 210 pickets. Fixing each picket to 3 rails with 2 screws per rail takes 1,260 screws. Each 10 in hole, 2 ft deep, holds about 0.92 cubic feet of concrete around the post, so 14 posts need about 12.9 cubic feet (0.48 cubic yards): 22 bags at 80 lb.

Common fence sizes

Fence heightRails per sectionTypical post depthPost length to buy
3–4 ft (0.9–1.2 m)22 ft (0.6 m)6 ft (1.8 m)
5 ft (1.5 m)32 ft (0.6 m)7–8 ft (2.1–2.4 m)
6 ft (1.8 m)32–3 ft (0.6–0.9 m)8–9 ft (2.4–2.7 m)

A common rule of thumb is to bury at least one third of the post's above-ground height, and never less than 2 ft (60 cm). In places where the ground freezes, the bottom of the hole should sit below the local frost depth, which can be deeper than these figures. Your local building department can tell you the frost depth in your area.

Picket spacing and privacy

The gap you leave between pickets changes the count a lot. Butting 5.5 in pickets tightly together (gap 0) on a 100 ft fence takes about 219 pickets before spares, while a 2 in gap brings it down to 160. Keep in mind that boards shrink as they dry, so pickets butted tightly on a privacy fence often end up with small gaps after a season. For full privacy, many builders use a shadowbox layout (pickets on both sides of the rails, offset) or overlap the boards slightly, which needs more pickets than the calculator's single-sided count.

Practical tips

  • Corners and several runs. Work out each straight side separately and add them up, then subtract one post for every corner, since neighboring sides share the corner post.
  • Gates. Leave the gate opening out of the fence length, then add a gate post on each side of it. Gate posts carry more load, so many builders use 6×6 posts set deeper there.
  • Short last section. When the length doesn't divide evenly by the post spacing, the last section is shorter. You still need a full set of rails for it, cut down to size.
  • Use the right materials. Choose posts rated for ground contact and corrosion-resistant (exterior or galvanized) screws or nails, since fasteners for treated lumber need to resist corrosion.
  • Drainage. Putting a few inches of gravel at the bottom of each hole helps water drain away from the end of the post. Slope the top of the concrete away from the post for the same reason.
  • Before you dig. Check property lines, local height limits and any permit or homeowner association rules first. In the US, call 811 a few days ahead so buried utility lines can be marked; elsewhere, contact your local utility locating service.

Frequently asked questions

How many fence posts do I need for 200 feet?
With posts every 8 ft, 200 ÷ 8 = 25 sections, so 26 posts for one straight run. With 6 ft spacing it's 34 sections and 35 posts.
How many pickets are in 8 feet of fence?
8 ft is 96 in. With 5.5 in pickets butted together, that's 96 ÷ 5.5 = 17.5, so 18 pickets. With a 0.5 in gap, it's 96 ÷ 6 = 16 pickets.
How many bags of concrete do I need per fence post?
For a 4×4 post in a 10 in hole, 2 ft deep, about 0.92 cubic feet, which is 1.5 bags of 80 lb concrete. In practice, plan on 2 bags per post, or work out the total for all posts and round up once, as the calculator does.