How the calculation works
For a spaced section, choose the smallest whole count N that keeps every equal gap at or below your entered maximum: N = max(1, ceil((length − (end gaps − 1) × maximum gap) / (picket width + maximum gap))). Actual gap = (length − N × picket width) / (N − 1 + end gaps). Board-on-board uses no end gaps and maximum first-layer gap = cover width − 2 × minimum overlap. Add one centered cover for each of the N − 1 interior gaps. Reject full-width layouts that do not fit or make adjacent cover boards collide.
A worked example
For one clear 96 in section, 5.5 in base pickets, 5.5 in cover pickets and an entered 1 in minimum overlap, the smallest supported layout has 12 base pickets and 11 covers: 23 boards before allowance. The 11 first-layer gaps are 30/11 ≈ 2.7273 in; centered covers overlap each adjoining base picket by about 1.3864 in. This example starts and ends with full base pickets and does not specify a recommended overlap.
Before you use the result
Measure one clear section after excluding posts, gates, trim and required boundary clearances. The tool keeps pickets at their full entered widths and adjusts equal spacing; it does not rip the final board. If no such layout fits, choose different measured widths, end treatment or a separate cutting plan. Spaced mode uses either no end gaps or two end gaps equal to the interior gaps. Board-on-board means one base layer with full base pickets at both ends, plus one centered cover over each interior gap on the same face. It does not mean two complete fences, shadowbox boards on opposite rail faces, tongue-and-groove or a universal board-on-board installation method. Adjacent covers must not overlap in their shared face plane. With only one base board and no gap, no cover is counted. Enter an overlap/gap chosen for your actual product and installation; the calculator does not recommend one or model wood movement. Count separate sections separately because end conditions restart; multiply only sections with identical clear widths. The additional allowance is applied separately to base and cover counts after summing identical sections and rounded up once per group. Even when the board widths match, those separately rounded allowances may exceed one combined purchase calculation. No posts, rails, bracing, fasteners, height, wind loads, slope, gate structure, pool barriers or code compliance are designed. Building a gate or selecting fence height requires a separate structural and installation plan. Changing units relabels entries; reenter measurements in the chosen units. All defaults are illustrative. Inputs support at most nine decimal places.