What the fence-spacing result means
The exact clear gap is the open distance from one picket edge to the next. The center-to-center measurement adds one finished picket width. Every position in the table is measured from the far-left edge of the section you entered, so outside-to-outside layouts include the left post before the first picket mark.
Code and safety check: The calculator does not approve a fence or pool barrier. Verify opening limits, height, climbability, gates, hardware, setbacks, and permits with the applicable local authority.
How to use the calculator
- Choose whether your width is the clear opening or includes both posts.
- Enter the actual finished picket face width.
- Enter a maximum desired gap or a fixed number of pickets.
- Choose whether pickets sit flush at both clear-opening edges.
- Add picket height and waste allowance for a linear material estimate.
- Review the warning, diagram, and position table before laying out the rails.
The picket-spacing formula
First establish the clear opening. When the entered width includes posts, subtract two finished post widths. Then subtract the combined width of all pickets and divide the remaining width among the open spaces.
spaces = pickets − 1
With equal outside gaps:
spaces = pickets + 1
Exact gap:
(clear opening − picket count × picket width) ÷ spaces
Worked example
For a 96-inch clear opening with 3½-inch pickets and a requested maximum gap of 3½ inches, the calculator selects 14 pickets. They occupy 49 inches. With equal gaps at both outside edges, the remaining 47 inches are divided among 15 spaces:
(96 − 49) ÷ 15 = 3.1333 inches, displayed as approximately 3⅛ inches when rounded to the nearest sixteenth.
Common fence-layout mistakes
- Using nominal lumber width instead of the picket’s finished face width.
- Mixing an outside-to-outside section measurement with a clear-opening formula.
- Forgetting that edge pickets change the number of open spaces.
- Stepping off rounded gaps and accumulating error across a long section.
- Assuming a visually pleasing gap automatically meets local or pool-barrier rules.
- Ignoring actual post plumb, rail length, picket swelling, or uneven terrain.
Frequently asked questions
How do I calculate equal spacing between fence pickets?
Subtract the combined width of all pickets from the clear opening, then divide the remaining width by the number of spaces. The number of spaces depends on whether pickets sit at both opening edges.
How many spaces are there between fence pickets?
If the first and last pickets sit flush at the opening edges, there is one fewer space than pickets. If equal gaps also appear at both outside edges, there is one more space than pickets.
What fence-picket gap is allowed by code?
There is no universal answer. Requirements depend on location, fence purpose, height, pool-barrier rules, and other conditions. Confirm the current requirements with the authority having jurisdiction.
Why does maximum-gap mode add more pickets?
It rounds the calculated picket count upward so the exact equalized gap stays at or below the maximum you entered instead of exceeding it.
Should I measure between posts or across the posts?
The clear opening between inside post faces is simplest. If you measured outside-to-outside, select that basis and enter the finished width of each post so both can be deducted.
Related planning tools
Read How Much Space Should Be Between Fence Pickets? or use the board-and-batten calculatorfor an interior vertical-strip layout.
Measurement and safety disclaimer
This tool provides a planning estimate, not structural, permit, property-line, or code approval. Confirm site dimensions, boundaries, underground utilities, wind and load requirements, fasteners, product instructions, and current local rules. Use appropriate protective equipment and qualified help. Review the full measurement disclaimer.