THE GEOMETRY BEHIND THE PLAN
Picket spacing:
counts, end gaps
and exact closure.
A picket count uses whole numbers. The space left between those pickets is a division problem. This guide explains how the two choices fit together, without choosing a gap or product for you.
Decorative arithmetic only. No example below recommends a gap, establishes a suitable fence design, or checks pool-safety, structural or building requirements. Use the actual dimensions and requirements of your own project separately.
1. Define one clear bay
In this model, the clear bay width is the distance between the two boundaries you want the pickets and selected gaps to fill. It is not an overall fence-run length, and the calculator does not add post widths to it. Every picket in the bay is represented by the same actual width.
Enter each measurement in millimetres, centimetres, metres or decimal inches. Mixed units are allowed: a 0.5 m bay, 7 cm picket and 25 mm chosen gap describe the same numbers as 500 mm, 70 mm and 25 mm. Result units can change independently, so converting a result does not overwrite the measurements you entered. One inch is exactly 25.4 mm.
2. Count the gap intervals before dividing
Let W be the clear bay width, p the actual width of one picket and N the whole picket count. Pickets occupy N × p. The remainder is W − N × p.
With equal end gaps, there is one gap before the first picket, N − 1 gaps between pickets, and one gap after the last: N + 1 intervals. With no end gaps, the outer pickets meet the two boundaries and only the N − 1 internal intervals remain.
Equal end gaps: g = (W − N × p) ÷ (N + 1)
No end gaps, N ≥ 2: g = (W − N × p) ÷ (N − 1)
These formulas describe the stated model; they are not installation rules. Zero gaps are allowed by the arithmetic. A negative remainder is impossible because the pickets themselves are wider than the bay.
A complete exact example: 500 mm
Use a hypothetical 500 mm clear bay, 70 mm pickets and a user-chosen 25 mm maximum gap, with equal end gaps. The result is five pickets and six gap intervals:
5 × 70 mm = 350 mm of pickets
500 − 350 = 150 mm of remaining width
150 ÷ 6 = 25 mm per gap
Closure: 350 + 6 × 25 = 500 mm exactly
The first picket starts 25 mm from the near boundary. Each later picket starts 70 + 25 = 95 mm after the previous start. The five starts are 25, 120, 215, 310 and 405 mm. The last picket ends at 475 mm, leaving the same 25 mm end gap.
Keep the same bay and five-picket count but remove the end gaps: the 150 mm remainder is now divided by only four internal intervals, giving 37.5 mm each. If the chosen maximum remains 25 mm, the no-end-gap solver instead needs six pickets: 420 mm of pickets plus five 16 mm gaps closes the same 500 mm bay.
3. Solve a chosen maximum with a whole count
The maximum-gap mode finds the fewest whole pickets whose equal modelled gaps are at or below the value you enter. It does not always produce that exact gap. Write your chosen maximum as G:
Equal end gaps: N = max(1, round up[(W − G) ÷ (p + G)])
No end gaps: N = max(2, round up[(W + G) ÷ (p + G)])
The no-end-gap formula above applies when the bay is wider than one picket. If W = p, one picket fills the bay exactly, with zero gaps. After choosing a count, the calculator checks that N × p does not exceed W and that the remaining width can be shared by the chosen intervals.
For another hypothetical equal-end example, W = 1,000 mm, p = 70 mm and G = 20 mm gives N = round up(980 ÷ 90) = 11. The remaining 230 mm is split across 12 gaps, so g = 115/6 mm, approximately 19.166667 mm. The exact gap is below the chosen 20 mm maximum.
4. Space a count you already have
Known-count mode uses the whole number you enter and divides the remainder. It does not silently add pickets to meet a target. For a 900 mm bay and twelve 75 mm pickets, the pickets occupy all 900 mm and every gap is zero, under either end treatment.
One picket with no end gaps only works when that picket fills the entire bay. A 70 mm picket cannot fill a 500 mm bay while also being flush to both boundaries. Equal end gaps would be a different model, with a gap on each side.
A zero maximum gap also needs an exact fill. A 500 mm bay cannot be filled exactly by whole 70 mm widths: seven occupy 490 mm and leave a remainder, while eight occupy 560 mm and do not fit. The tool reports an error rather than returning a negative gap or silently changing a width.
5. Decimal inches and result conversion
For a hypothetical 36 in bay, 2.5 in pickets and chosen 1 in maximum gap with equal ends, the solver selects ten pickets. Their total width is 25 in; eleven gaps share the remaining 11 in, giving exactly 1 in each. Switching the result to millimetres shows the same geometry, not a new plan.
Enter decimal inches such as 2.5, rather than fractions such as 2 1/2. Inputs accept up to six decimal places. The converter retains those exact decimals internally; repeating divisions are stored as fractions. Displayed positions and gap sizes are rounded only after the plan is solved.
6. Read the closure check and position list
The closure check adds the total picket width and total width of all gap intervals. It must equal the entered clear bay, with an exact residual of zero. With equal ends, this includes both outer gaps; with no ends, it includes only the internal gaps.
For picket number i, starting at i = 1, the start position is the near-end gap plus (i − 1) × (p + g). The end position adds the picket width; the centre adds half that width. These positions are measured from the same near boundary. The export retains exact fractions alongside rounded decimal positions, because repeatedly adding a rounded gap can drift from the exact closure.
The scaled diagram is a visual check rather than a full-size setting-out template. It draws at most 120 pickets. Larger valid plans keep their exact results and downloadable position schedule without drawing a misleading partial diagram. The on-page position table is also bounded; the download includes every picket up to the 10,000-picket plan limit.
What this plan leaves out
The tool uses one straight bay, uniform picket widths and equal selected gaps. It does not calculate picket heights, cutting lengths, saw kerf, rails, fixings, slopes, taper, material movement or product suitability. The numerical maximum is a choice supplied by you, not a safety threshold.
The panel and post shopping calculator answers a separate question using an effective repeated panel-bay width. Read the panel counting guide before treating that shopping-model width as a clear opening.