What this calculator does
Pickets rarely divide evenly into a fence length once a gap is added between each one, so a fence built to a single fixed spacing usually ends with an odd, cramped gap at one end. This calculator works out how many pickets actually fit a given run, then spreads whatever space is left over evenly across every gap, so every gap ends up the same width rather than one being different from the rest.
The same style of calculation is used for deck balustrades, screening and paling fences: fit as many pickets as possible at roughly the desired gap, then redistribute the small leftover evenly rather than forcing an exact but visually uneven spacing.
The formula
The number of pickets that fit is the fence length plus the desired gap, divided by picket width plus the desired gap, rounded down. Multiplying that picket count by the picket width gives the total width used by pickets alone; whatever length is left over is then divided evenly across all the gaps between pickets, giving the actual gap that will be built rather than the originally desired one.
| Term | Meaning |
|---|---|
| Fence length | The total length of the fence run the pickets need to fill. |
| Desired gap | The gap you would like between pickets, used to work out how many fit; the actual built gap is usually slightly different once leftover space is redistributed. |
| Actual gap | The gap that results once the leftover space from rounding down the picket count is spread evenly across every gap in the run. |
The inputs explained
| Field | What to enter |
|---|---|
| Fence length (mm) | The total length of the fence run to be filled with pickets. |
| Picket width (mm) | The width of a single picket. |
| Desired gap (mm) | The gap you would like between pickets. The calculator finds how many pickets fit near this gap, then evens it out exactly. |
When to use it
Planning a paling or picket fence panel
Before cutting or ordering pickets, working out the count and actual gap for a specific bay or panel length avoids discovering partway through the run that the last gap does not match the rest.
Matching an existing fence run
If a neighbouring section already has a set picket width and gap, checking how that spacing plays out over a new run of different length shows whether it will land evenly or need a small adjustment.
Comparing picket width options
Wider pickets need fewer of them to fill the same run, which changes both material cost and the final built gap; comparing a few picket widths against the same fence length and desired gap shows that trade-off directly.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How picket count and actual gap change with picket width
A fixed 6,000 mm fence length and 10 mm desired gap, across a range of picket widths.
| Picket width | Pickets needed | Actual gap between pickets | Total picket width used |
|---|---|---|---|
| 75 mm | 70 | 10.9 mm | 5,250 mm |
| 100 mm | 54 | 11.3 mm | 5,400 mm |
| 125 mm | 44 | 11.6 mm | 5,500 mm |
| 150 mm | 37 | 12.5 mm | 5,550 mm |
Questions
Why is the actual gap different from the gap I entered?
The desired gap is used to work out roughly how many pickets fit, but that count is rounded down to a whole number. Whatever length is left over after fitting that many pickets is then spread evenly across all the gaps, which nudges the built gap slightly wider than what was originally entered.
What if I need an exact gap rather than an evenly redistributed one?
That is only possible if the fence length divides exactly into whole pickets plus that exact gap, which is uncommon in practice. Redistributing the leftover evenly is the standard way to avoid one oddly-sized gap at the end of the run.
Does this work for horizontal batten screening as well as vertical pickets?
Yes, the arithmetic is identical, since it only depends on a total run length, an individual element width and a desired gap. See the board and batten siding calculator for the same calculation framed around horizontal battens.
Should I measure the fence length between posts or including them?
Measure the clear run the pickets need to fill, typically the gap between posts (or between a post and a corner), not the overall fence length including post widths.
For horizontal screening battens rather than vertical pickets, see the board and batten siding calculator. If the same project also needs roof trusses costed out, the roof truss cost calculator covers that.