Picket spacing is the same arithmetic as baluster spacing without the sphere rule: choose a picket, choose the largest gap you want, and let the calculator fit a whole number of pickets with equal gaps at both posts. It also handles butt-joint fences and shadowbox fences, where pickets alternate faces and overlap.
Spaced pickets
Measure the clear distance between posts. With 4x4 posts set 8 ft on centre that is 92-1/2". Choose a target gap; the calculator finds the fewest pickets that keep every gap at or under it and spaces them evenly, so the first and last gaps against the posts match the rest.
n = ⌈ (L − g) ÷ (w + g) ⌉ gap = (L − n × w) ÷ (n + 1)
Butt-joint fences
Pickets touch for privacy. Wet pressure-treated pine shrinks across its width as it dries, so pickets nailed tight while wet often open up 1/8" to 1/4"; kiln-dried after treatment (KDAT) or cedar stays closer. Rip the last picket to fit.
Shadowbox
Pickets alternate front and back of the rails. Each front picket laps the back pickets beside it by the overlap, so the gap on each face is the picket width minus twice the overlap: a 5-1/2" picket with a 1" overlap leaves 3-1/2" between pickets on each face. You see through only at an angle.
gap on each face = picket − 2 × overlap centre-to-centre on one face = picket + gap
Posts and ground clearance
Wood fence posts are usually set 6 ft or 8 ft on centre; 8 ft sections use fewer posts but sag more in wide pickets and heavy rails. Keep pickets about 2" off the ground so they do not wick water and rot.
Fences around pools are barriers with their own rules (commonly 48" tall with no opening that passes a 4" sphere). Check local requirements before laying those out.
Laying out a whole run
Stretch a string line between the end posts, measure the full run and divide it into equal sections no longer than your rail stock, so every section takes the same picket layout and the same tape marks. A section that comes out a few inches short can take one less picket with the gaps recalculated; do not squeeze the last one.
A common rule of thumb buries about a third of the post’s height, at least 24" for a 6 ft fence, and deeper than the frost line where the ground heaves. Set corner and gate posts first and brace them before the line posts go in.
Rails and fastening
Two rails suit fences up to about 4 ft; 6 ft privacy fences usually get three so the pickets cannot cup or bow between them. Fasten each picket to every rail with two exterior screws or ring-shank nails, kept about 3/4" from the picket edges so they do not split.