Fence Calculator
Enter the length of a straight fence, the post spacing and any gates. You’ll get the posts, bays (or panels), rails and pickets to buy, plus a plan of the post layout.
- Imperial
- Metric
- Steps shown
- Free
Your measurements
Results
- Posts
- —
- Bays (panels)
- —
- Pickets to buy
- —
- Bay width
- —
- Rails
- —
- Pickets (exact)
- —
How we got this
Want your brand in front of people using the Fence Calculator? Sponsor this calculator
Worked example
A 100 ft fence with posts no more than 8 ft apart, one 4 ft gate, three rails per bay, 5 1/2 in pickets with 1/2 in gaps, and 10% waste:
- Fenced length: 100 − 4 = 96 ft, in 2 segments of 48 ft (one each side of the gate).
- Bays: 48 ÷ 8 = 6 per segment, so 12 bays of exactly 8 ft.
- Posts: 12 bays + 1 gate + 1 = 14 posts (the gate posts are included).
- Rails: 12 × 3 = 36 rails.
- Pickets: (1,200 + 0.5) ÷ 6 = 200.1, rounded up to 201. With 10% waste: 222 pickets.
How it works: the formula
- Fenced length = total length − gates × gate width.
- Segments = gates + 1. The gates split the fence into equal segments.
- Bays per segment = ⌈segment ÷ max post spacing⌉. Bays come out equal and never wider than your spacing.
- Posts = bays + segments = bays + gates + 1.
- Rails = bays × rails per bay.
- Pickets = ⌈(length + gap) ÷ (picket width + gap)⌉, then × (1 + waste). The gates are clad too.
Assumptions and limitations
- A straight fence on level ground. Corners and changes of direction need an extra corner post each.
- Gates are assumed spread evenly along the run. If yours are at one end, the bay sizes change but the counts are usually the same.
- Post depth, footings, concrete, gate hardware and fixings aren't included. Use the Post Hole Calculator for concrete.
- Check local rules on fence height, boundaries and permits before you build.
Tools for this job
We may earn a commission if you buy through these links, at no extra cost to you. As an Amazon Associate we earn from qualifying purchases. Read our affiliate disclosure
-
Post hole digger
Digs neat, straight-sided holes for posts and footings.
See options on Amazon : Post hole digger (opens in a new tab) -
Post level
Straps to a post to check plumb on two faces at once.
See options on Amazon : Post level (opens in a new tab) -
Mason’s line and stakes
Keeps a fence line straight from end post to end post.
See options on Amazon : Mason’s line and stakes (opens in a new tab)
Frequently asked questions
How many fence posts do I need?
Divide the fence length by the post spacing, round up to get the number of bays, and add one. A 100 ft fence with posts no more than 8 ft apart needs 13 bays and 14 posts. Each gate splits the run, so it adds one more post.
How far apart should fence posts be?
Most wood fences use posts 6 to 8 ft (1.8 to 2.4 m) apart. Prefabricated panels set the spacing for you. Closer posts make a stiffer fence and suit windy sites and tall privacy fences.
How many pickets do I need?
Divide the fence length by the picket width plus the gap between pickets. For 5 1/2 in pickets with 1/2 in gaps, each picket covers 6 in, so 100 ft (1,200 in) needs about 201 pickets. Add about 10% for splits and offcuts.
How many rails does each section need?
Two rails suit fences up to about 4 ft high. Three rails are typical for 5 to 6 ft privacy fences, so the boards don’t warp in the middle.
Related calculators
-
Construction estimating
Post Hole & Footing Concrete Calculator
Concrete for round post holes and footings, minus the post, in volume and bags.
-
Decks & fences
Deck Materials Estimator
Deck boards, joists, beams and screws for your deck size, with a waste allowance.
-
Construction estimating
Concrete Slab Calculator
Concrete volume for slabs, pads and rectangular footings, in yards, metres and bags.