Fence Spacing Calculator

Space posts evenly along a straight run, then work out the exact gap between pickets so every section looks the same.

Post spacing

Measured from the center of the first post to the center of the last post.

A 4×4 is 3.5 in, a 6×6 is 5.5 in, a vinyl post is usually 5 in.

Picket spacing

The clear gap from one post face to the next (96 in on center minus a 3.5 in post = 92.5 in).

The real gap is adjusted so it is the same everywhere, including at both posts.

How even post spacing works

Divide the run length by the maximum spacing and round up. That gives the number of sections. Divide the run length by that number to get the on-center spacing.

sections = ⌈ run length ÷ max spacing ⌉ on center = run length ÷ sections posts = sections + 1

Example: a 100 ft run with posts at most 8 ft apart needs 13 sections. The posts are 7' 8-5/16" apart on center, and you need 14 posts.

How picket spacing works

For a section with a gap at both posts, there is always one more gap than there are pickets:

pickets = ⌊ (section − gap) ÷ (picket + gap) ⌋ actual gap = (section − pickets × picket) ÷ (pickets + 1)

Cut a spacer block to the actual gap and use it between every picket. It is faster and more accurate than measuring each one.

The 4-inch rule

Pool barriers and many deck railings must not have openings a 4 in (about 10 cm) sphere can pass through. Keep picket gaps below that if the fence protects a pool or small children.