Choose a gap, then check the layout
Fence picket spacing: how wide a gap, and how it changes
For solid wood privacy fencing, UFP's installation guide specifies no gap between pickets. Spaced wood and ornamental metal fences leave visible openings: the Zippity Newberry wood kit shows a 2⅓-inch gap, while Eastern Ornamental's aluminum installation guide lists 3 13/16-inch picket spacing. These gaps apply to those products. New, wet pressure-treated boards shrink as they dry, so even a tight installation can develop visible gaps. Choose your fence style and follow its installation instructions before calculating the board count.
How wide should the gap be
| Fence type | Gap between pickets | What the instructions cover |
|---|---|---|
| Solid wood privacy | No gap; butt pickets together | UFP's loose-picket privacy layout. This is the installation position, not a promise that drying wood will stay tight. |
| Spaced wood picket | 2⅓ in | The gap shown in Zippity's Newberry wood fence kit assembly drawing. Other kits and custom layouts can differ. |
| Ornamental aluminum | 3 13/16 in | Eastern Ornamental's residential specifications in its installation guide. Use the panel's factory spacing. |
Measure a gap between the facing edges of neighboring pickets. Center-to-center spacing also includes a picket's width, so it is a different measurement. For loose wood pickets, UFP recommends a spacer cut to the desired gap to keep the openings consistent. Check the end spaces as well as the spaces between boards.
Why new pressure-treated wood needs a wider gap
Gaps between new pressure-treated pickets can widen as the wood dries. Viance's installation tips say treated boards shrink in width and thickness as they dry and advise butting boards together at installation. A wider finished gap does not mean you should automatically add extra space between wet boards.
The USDA Forest Products Laboratory's Wood Handbook, under Dimensional Stability, explains that wood shrinks as it loses bound water from its cell walls below the fiber saturation point. Movement across the grain is much greater than movement along it. For upright fence pickets, that means the board face can become narrower, leaving more space between neighboring edges. Wood can swell again as it gains moisture.
The handbook's shrinkage tables describe drying from green wood to oven-dry conditions; they are not predictions of the gap your outdoor fence will develop. Species, grain direction and moisture conditions matter. Measure the supplied boards and follow the instructions for their condition at installation. A gap calculated from today's widths is a layout measurement, not a forecast of the dried fence.
The picket spacing formula
Subtract the total board width from the clear opening, then divide the remaining width by the number of spaces. The end treatment determines that number: N + 1 for equal end gaps, or N − 1 for flush end pickets. The worked examples below use illustrative dimensions and a chosen maximum gap to demonstrate the arithmetic; their calculated gaps are not installation recommendations.
Measure the clear opening and actual picket width
Start with the two dimensions that the formula balances: the usable opening and the width occupied by a single picket. Call the opening L and the actual board width w. Call the number of whole pickets N and the clear gap g. Keep every length in the same unit through the calculation. N is a count, so it has no length unit and must be a whole number.
The clear opening runs from one boundary of the infill to the other. For boards installed between post faces, this is the face-to-face measurement. Post spacing measured on centers is a different dimension. Trim or other pieces inside the opening also consume width; decide which surfaces bound the pickets and measure the space that remains between them.
A nominal lumber label is not a measurement of the board face. For example, this nominal 1 × 6 picket listing specifies an actual width of 5.5 in. Measure the boards you will install and use their actual face width. Do not enter 6 in merely because the product name includes 1 × 6. The worked layout here uses a separate illustrative input of 3.5 in.
Measure the opening at the heights where you will set out the boards. If the available width changes between rails, a single rectangular layout will not describe all of them. Resolve that shape before treating a computed gap as an installation instruction. Also check several boards: the equations assume every picket has width w. Substituting a wider board without adjusting its neighbors uses up part of the calculated clearance.
Use the picket spacing calculator to enter your dimensions and produce the full table. This guide explains how to check those results with arithmetic. It addresses a single row of equally wide boards; its gap calculations do not verify pool barrier, child barrier, railing or baluster requirements.
Equal end gaps: N + 1 spaces
Imagine filling an opening from left to right: one gap, one board, another gap, another board, and so on until a final gap reaches the right boundary. Every board has a gap before it, and there is one more gap after the last board. That makes N + 1 equal spaces. The two end spaces belong in the same division as the interior spaces.
L = Nw + (N + 1)g
Rearrange that width balance to isolate the gap:
g = (L − Nw) / (N + 1)
The result is a clear edge-to-edge gap. To get the interval between board centers, add one board width: c = w + g. The end gap remains g, because an end gap runs from the boundary to a board edge. It does not include half a board. Using center spacing as an end clearance would shift the entire layout.
A 96-inch example
Set L = 96 in, w = 3.5 in and N = 15. The boards occupy 15 × 3.5 = 52.5 in. Subtracting that from the opening leaves 43.5 in. Divide by N + 1 = 16 to get g = 43.5 / 16 = 2.71875 in. On a tape marked in thirty-seconds, that is 2 23/32 in. The center interval is 3.5 + 2.71875 = 6.21875 in.
Fixed count vs maximum gap
If you already know N, the gap equation completes the calculation. To find the fewest pickets for a maximum allowable gap G, require g ≤ G. Substituting the equation and gathering the terms containing N gives N ≥ (L − G) / (w + G). Round that lower bound up to a whole picket, then confirm the boards still fit. Use at least one picket for this layout.
With G = 3 in, the lower bound is (96 − 3) / (3.5 + 3) = 14.307692. Rounding up gives 15. The next smaller count, 14, produces (96 − 14 × 3.5) / 15 = 3.1333 in per gap, above the limit. This comparison proves why the smaller count is insufficient.
Rounding a count up makes the spaces smaller, but it can also make the boards too wide to fit. Check Nw ≤ L after rounding. A very narrow maximum can have no solution with whole, untrimmed boards. A negative residual is a fit failure; it is not an instruction to overlap the pickets. The tool reports that condition so you can revise the board width or layout.
Flush end pickets: N − 1 spaces
When the first board starts at the left boundary and the last board ends at the right boundary, the two end gaps disappear. Only the spaces between boards remain. Count those spaces by pairing each board with the next one: N boards form N − 1 pairs.
L = Nw + (N − 1)gg = (L − Nw) / (N − 1)
This division requires at least two boards. A single board is a special case: it can meet both boundaries only if its width equals the opening. There is then no interior gap to calculate. For two or more boards, the center interval is still w + g, but the first left edge is now zero.
For a maximum gap G, the count inequality becomes N ≥ (L + G) / (w + G). The sign before G in the numerator changes because there are two fewer gaps than in the equal-end model. With the same example dimensions, (96 + 3) / (3.5 + 3) = 15.230769. Rounding up requires 16 pickets. Their 15 gaps are 2.666666666… in each.
Changing the end treatment changes the count calculation even when L, w and G stay the same. Check the actual edge condition in a sketch before choosing a formula. A post cap, rail joint or decorative trim detail does not by itself tell you whether the picket's outside edge should be flush. The opening boundaries and the intended board positions determine that choice.
Turn the result into layout marks
Choose the left boundary as a single datum and measure every position from it. Let e be the left end gap, so e = g for equal ends and e = 0 for flush ends. Number boards with i beginning at 1. Their coordinates follow directly from the center interval c:
Left edge: xᵢ = e + (i − 1)(w + g)Center: xᵢ + w / 2Right edge: xᵢ + w
The board number begins at 1, so the first board has zero intervals before it. The second has one interval, the third has two, and the last has N − 1. This indexing avoids shifting the first board by a complete interval. Keep e separate from c when you write out the marks; they describe different parts of the opening.
| Picket | Left edge | Center | Right edge | Left edge at 1/16 in |
|---|---|---|---|---|
| 1 | 2.71875 | 4.46875 | 6.21875 | 2 3/4 |
| 2 | 8.9375 | 10.6875 | 12.4375 | 8 15/16 |
| 3 | 15.15625 | 16.90625 | 18.65625 | 15 3/16 |
Why repeated rounding creates drift
The exact gap in this example lies between sixteenth-inch marks. Rounded to that precision, it becomes 2 3/4 in, or 2.75 in. If you rebuild the entire opening using that rounded gap, the finished width becomes 52.5 + 16 × 2.75 = 96.5 in. That differs from the measured opening by 0.5 in.
Instead, retain the unrounded gap in every coordinate calculation and round each resulting coordinate once for the tape. The rounding error at one mark is then confined to that mark. It is not carried into the next board's position. The tool follows this rule for left edges, centers and right edges, including the tables for separate bays.
Choose one coordinate column for setting the boards and make the mark convention visible on your layout strip. A center mark and an edge mark can both be correct yet refer to different positions on the same board. Label the datum, direction of measurement and bay identity before transferring the strip to another rail.
Verify the finished width
Check the width balance with the unrounded numbers before using the rounded marks. For equal ends, Nw + (N + 1)g must return L. The worked example closes as 52.5 + 16 × 2.71875 = 96 in. For flush ends, Nw + (N − 1)g must return L, and the final right edge should coincide with the right boundary.
A more general check uses separate end and interior spaces: L = Nw + (N − 1)g + 2e when both ends have equal clearance e. This is useful across unequal bays. If you hold the interior gap fixed, the balanced end gap is e = [L − Nw − (N − 1)g] / 2. A negative answer means the proposed boards and interior gaps cannot fit.
Equal gaps within each bay and a common interior gap across every bay are different design choices. The first keeps every space inside an opening equal; the second can produce different end clearances at each pair of posts. Verify the end clearances as well as the interior gap whenever a maximum applies. In the tool, both choices appear side by side with separate results for each opening.
Finally, dry-fit or check the marks against the measured opening. Arithmetic can confirm the dimensions you entered, but it cannot correct a tape referenced to the wrong face or a board wider than its input. If the last mark disagrees with the site measurement, check those inputs before distributing an unexplained error across the fence.
When the formula is not enough
A racked fence on a slope needs a defined direction of measurement. Distance measured along a sloping rail differs from its horizontal projection. These formulas balance lengths along one chosen axis; they do not calculate slope geometry or the clearance under the fence. Establish the intended construction and dimensions before applying an equal-spacing result. Use the stepped vs racked fence layout and slope math guide to calculate bay rises and rail lengths, then space plumb pickets horizontally.
Board-on-board and shadowbox patterns use more than one row or face. Their overlaps and offsets need a cross-section that identifies which board edges bound each opening. A negative gap in this single-row formula does not model that construction. Use the board-on-board fence calculator to count both rows and check their gap and overlap against a defined cross-section.
Keep purchase quantities separate from the layout using the count the pickets, rails and posts to buy. Once you have measured the opening and chosen the end treatment, enter your dimensions in the picket spacing calculator.