Picket spacing comes down to one formula: divide the leftover space evenly across all the gaps in the section. The math takes 30 seconds on a calculator and ensures every gap looks identical from the gate to the corner.
The Formula
For one fence section between two posts:
- Clear span = post spacing (in.) minus post width (in.)
- Number of pickets = round up of (clear span - max gap) / (picket width + max gap)
- Exact gap = (clear span - pickets x picket width) / (pickets + 1)
The “+1” in the gap formula accounts for the gap at each post — n pickets create n+1 gaps, with gaps on both sides.
Worked Example
Section between 4x4 posts set 8 feet on center.
- Post spacing: 8 ft = 96 inches
- Post width (actual): 3.5 inches
- Clear span: 96 - 3.5 = 92.5 inches
- Picket width (actual 1x4): 3.5 inches
- Target maximum gap: 2.5 inches
Number of pickets: ceiling of (92.5 - 2.5) / (3.5 + 2.5) = ceiling of 90 / 6 = ceiling of 15 = 15 pickets
Exact gap: (92.5 - 15 x 3.5) / (15 + 1) = (92.5 - 52.5) / 16 = 40 / 16 = 2.5 inches exactly
In this case the target gap divides evenly. Usually it does not, and the exact gap comes out as a decimal — 2.27 inches instead of 2.5. That slight difference is invisible to the eye and is the correct answer.
Quick Reference: Pickets per 8-ft Section with 4x4 Posts (92.5-in. clear span, 3.5-in. pickets)
| Max gap | Pickets per section | Exact gap |
|---|---|---|
| 1/2 in. | 23 | ~1/2 in. |
| 1-1/2 in. | 19 | ~1-5/16 in. |
| 2-1/2 in. | 15 | 2-1/2 in. |
| 3-1/2 in. | 13 | ~3-3/8 in. |
For 5/4x6 boards (actual 5.5-in. width) with a 2.5-inch max gap: 12 pickets per section at approximately 2-1/16 in. exact gap.
Pool Fencing: The 4-Inch Rule
IRC Appendix AG105.2 and the International Swimming Pool and Spa Code Section 305 require pool barrier openings to be small enough that a 4-inch sphere cannot pass through. In practice, keep all gaps at 3-7/8 inches or less.
Where horizontal rails are closer than 45 inches to the ground, the fence must also prevent a 1-3/4-inch sphere from passing through any opening. This applies to the spaces between the bottom rail and the ground as well as between pickets. The purpose is to prevent a child from climbing the fence using the rails as ladder rungs.
| Pool barrier requirement | Maximum opening |
|---|---|
| All fence openings | 4-inch sphere |
| Openings where rail is less than 45 in. from ground | 1-3/4-inch sphere |
| Bottom of fence to grade | 4 inches maximum |
Privacy Fence Spacing
For a true privacy fence, pickets are either butted tightly together (0 gap) or installed with a 1/4 to 1/2-inch gap. Some styles overlap adjacent pickets by 1/2 to 1 inch, which means the gap formula gives a negative value and you instead calculate total picket count by dividing the span by (picket width minus overlap).
Board-on-board fences alternate pickets on front and back faces of the rails, each overlapping the next by about an inch. This style creates privacy even with wider spacing because the offset boards block sight lines.
Laying Out the Section
Once you have the exact gap:
- Cut a spacer block equal to the exact gap width
- Hang the first picket one full gap from the post face (not butted against it)
- Use the spacer block to position each subsequent picket
- Stop 3–4 pickets from the far post and measure the remaining space — distribute any discrepancy across those last few gaps rather than landing one odd gap at the end
Post dimensions vary slightly. Manufacturing tolerances in picket width add up across a long section. Checking the remaining space before the last few pickets catches these variations before they become obvious.
Horizontal Slat and Modern Fence Styles
Horizontal slat fences (boards running horizontally rather than vertically) use the same gap formula — just oriented differently. The “picket width” becomes the height of each horizontal board (typically 5.5 in. for 1x6 boards), and the “section height” is the fence height between rails or grade.
For a 6-foot fence using 1x6 horizontal boards at a 1-inch gap:
- Section height: 72 inches
- Board height (actual): 5.5 inches
- Number of boards: ceiling of (72 - 1) / (5.5 + 1) = ceiling of 71 / 6.5 = ceiling of 10.92 = 11 boards
- Exact gap: (72 - 11 x 5.5) / (11 + 1) = (72 - 60.5) / 12 = 11.5 / 12 = 0.96 in.
This is close to the target 1-inch gap. The small deviation from the target is invisible to the eye.
Measuring Existing Fence Sections
If you’re replacing pickets on an existing fence, measure the actual post width and the clear span before ordering material. Post width can vary if the fence has been repaired over time, and manufactured posts sometimes run slightly off the nominal dimension.
Measure the clear span on three different sections before cutting spacers. Span variation of more than 1/4 inch between sections suggests posts shifted over time — account for each section individually rather than using one average gap for the whole run.
Picket Material and Width Tolerances
Standard 1x4 and 1x6 cedar and pine pickets have manufacturing tolerances of about ±1/16 inch in width. Over a 20-picket section, that tolerance can add up to 1-1/4 inch of error if pickets run consistently wide or narrow. Check the actual width of 5–10 pickets from your delivery before cutting a spacer block. If the average width is 3.4 inches instead of 3.5 inches, recalculate your gap using 3.4 inches.
Composite and PVC pickets have tighter tolerances (±1/32 inch typical) and are generally more consistent than natural wood, making the gap formula more reliable across the full run.
Use the fence calculator to total your picket count across the full fence run once you know pickets per section. For post layout, see fence post spacing.