WEBTOOLZHUB · HOME PROJECT WORKBOOK
Plan one straight fence opening
Use one unit throughout. Target gap is your chosen maximum, not a safety specification. Mark positions are left edges measured from the same starting boundary.
Calculations run in your browser. This tool does not upload your inputs. Example prices are not market quotes.
Measure one clear opening at a time
For evenly spaced fence pickets, start with the clear opening between the faces that bound the layout. Measure the actual picket width, decide how the end gaps should behave and calculate the number of full pickets that fits. A whole-fence quantity divided by a rough spacing is useful for budgeting, but it does not guarantee a balanced layout inside each bay.
This calculator offers two arrangements. Equal gaps places the same clear gap at both ends and between every pair of pickets. Flush ends places a full picket at each end of the measured opening and distributes the remaining space between them. Choose the arrangement that matches the detail you actually intend to build before comparing the results.
The tool is for straight, decorative fence layouts using equal-width pickets. It is not a guardrail, stair-baluster or pool-barrier compliance tool. A spacing that looks balanced is not evidence that it meets safety or local requirements. Obtain the appropriate specification for those applications and have it checked independently of this calculator.
Understand the three spacing measurements
Clear gap is the empty space between neighbouring pickets. Pitch is the distance from the start of one picket to the start of the next, and equals picket width plus clear gap. With equal-width pickets, pitch also equals their centre-to-centre distance. Confusing the gap with pitch shifts every mark after the first.
End clearance is different again: it is the empty space between a bounding face and the first or last picket. In equal-gap mode it matches the internal gap. In flush-end mode it is zero. Neither arrangement is automatically correct for every fence detail; the tool exposes the choice so it is not hidden inside a formula.
Use the same unit for opening width, picket width and target maximum gap. Inches, centimetres or millimetres all work, but do not enter an opening in feet while leaving picket width in inches. For example, an eight-foot opening is 96 inches before you deduct any components that are inside the measured boundary.
Choose a target maximum gap
The target maximum is a design input, not a statement about what spacing your fence should have. The calculator selects the smallest whole picket count that keeps the calculated gap at or below that number under the selected end treatment. Because the count must be a whole number, the resulting gap usually differs slightly from your target.
If you want a fixed picket count instead, use the formulas below to check it manually. A larger count generally reduces the gap, but it also increases material use and changes the visual rhythm. Lay out a representative section before cutting the whole order. The mathematical fit is only one part of deciding whether the appearance suits the project.
Measure several actual boards rather than relying only on the shelf description. If widths differ materially, an equal-width model will not predict each joint precisely. Decide how the boards will be selected and arranged, then confirm the finished layout with the actual stock. Do not assume a nominal width is the face width being installed.
Formula for equal gaps at both ends
Let S be the clear opening, W the actual picket width and N the number of pickets. There are N + 1 gaps when both end gaps match the gaps between pickets. The gap is (S − N × W) ÷ (N + 1). The first picket's left edge starts one gap from the opening's left boundary.
For a target maximum gap G, the smallest candidate count is the ceiling of (S − G) ÷ (W + G), with at least one picket. The calculator checks that the resulting full-width boards fit. Some combinations cannot satisfy the requested maximum without trimming a board or changing the end treatment; the tool reports that instead of returning a negative gap.
Example: S = 96 inches, W = 3.5 inches and G = 2 inches. The candidate count is ceiling((96 − 2) ÷ 5.5) = 18. Those boards occupy 63 inches. The remaining 33 inches split into 19 equal gaps, giving about 1.7368 inches per gap. Pitch is approximately 5.2368 inches.
Formula for full pickets at both ends
When a full picket begins at the left boundary and another ends at the right boundary, N pickets create N − 1 internal gaps. The clear gap becomes (S − N × W) ÷ (N − 1), with at least two pickets. The first left-edge mark is zero, and the last is S − W.
Using the same 96-inch opening, 3.5-inch pickets and 2-inch target maximum, the required count is ceiling((96 + 2) ÷ 5.5) = 18. The same 33 inches now split into 17 internal gaps, producing about 1.9412 inches each. Pitch is approximately 5.4412 inches. The board count matches the previous example, but the layout does not.
| 96-inch opening, 18 pickets | Equal end gaps | Flush ends |
|---|---|---|
| Actual picket width | 3.5 in | 3.5 in |
| Number of gaps | 19 | 17 |
| Clear gap | 1.7368 in | 1.9412 in |
| Pitch | 5.2368 in | 5.4412 in |
Mark from one reference edge
The calculator lists left-edge marks measured from the same starting boundary. This avoids repeatedly adding a rounded gap or pitch along the rail. Repeated rounding can accumulate enough error to make the last opening visibly different, especially across many pickets. Marking each position from the original reference keeps each measurement independently tied to the complete span.
The displayed decimals are calculation outputs, not a claim that timber can be installed to four decimal places. Convert the marks into a practical measuring method, check the last position and dry-layout the complete bay. If you use a spacer, verify its size against the chosen gap and recheck alignment as you progress.
Lowe's fence guidance recommends using alignment aids such as a mason line, level and spacers when placing pickets. The calculation supports that process by providing an initial layout. It cannot observe whether posts are plumb, rails are straight, boards vary in width or the measuring reference has moved during the work.
Repeat the calculation for different bays
Do not assume every opening is identical because the posts were intended to be equally spaced. Measure each finished clear opening. A gate bay, a corner or a last short section may need its own count and gap. Calculating each bay separately helps reveal an awkward residual section before you order or cut all the pickets.
For a rough total, add the fitted picket counts from all bays, then apply a considered spare-board allowance. The calculator's spare percentage rounds upward after one bay's count; it is not a requirement to add spares separately to every tiny section. Pooling counts first can avoid unnecessary repeated rounding when all boards are interchangeable.
Posts, rails, foundations and hardware are outside this spacing calculation. If you are using prefabricated panels instead of individual pickets, use the fence panel and post calculator. Panel-width planning and individual-picket spacing solve different layout problems and should not be substituted for each other.
Compare appearance and purchasing cost
Make one calculation for the spacing you initially prefer, then try a slightly smaller target. Compare the board count and gap, not just the final total. A change of one picket can improve symmetry, while a small target adjustment may produce no change at all because the same whole-number count still satisfies it.
Multiply the final purchase quantity by your actual unit price and add the other quote items separately. The fence quote comparison guide helps distinguish material quantities from removal, gates and other extras. Its cost comparison complements this layout worksheet without pretending that a board count represents the whole installed fence.
Check these details before cutting
Confirm the opening boundaries, actual board width, selected end treatment, target maximum and marking reference. Look at the final picket position and measure the remaining space explicitly. When the calculator says no full-width layout satisfies the inputs, reconsider the design or obtain a suitable trimming detail rather than forcing the numbers to fit.
Sloping, curved, racked or stepped arrangements require additional geometry. The straight horizontal span used here does not determine picket lengths, rail angles or how a fence follows uneven ground. It also cannot predict later changes in timber dimensions. Ask the product supplier or installer how their material should be detailed and installed for the conditions.
Frequently asked questions
Does the target gap equal the final gap?
Usually not. The target is a maximum, and the calculator chooses a whole picket count. It then divides the available space evenly, which normally produces a slightly smaller gap.
Should I measure between post centres?
Measure the clear opening used by your picket layout. Post-centre spacing includes portions of the posts and can overstate the available width if entered without adjustment.
Can this calculate deck or stair balusters?
Do not use it to establish safety compliance. Guards, stairs and pool barriers can have specific requirements beyond an attractive equal-gap layout. Use a checked design for those applications.
Why is a zero-gap request sometimes impossible?
A full-width layout with no gaps requires the opening to be an exact multiple of the board width under the selected arrangement. Otherwise trimming or a different layout is needed.
Do the marks refer to board centres?
No. The printed sequence is for each picket's left edge from the same reference boundary. Add half the actual board width if you need centre marks.
Does the spare allowance change the layout?
No. The fitted count determines the spacing. The allowance only increases the purchase quantity for your chosen contingency; the extra boards are not placed in the calculated opening.
Keep the layout with the material list
Print one labelled result for each different bay. Record the actual dimensions and mark which end starts the sequence. A clear fence picket spacing plan separates appearance, measurement and ordering so that the installer can verify the last board before the first permanent fixing is made.
Sources and method
Lowe’s: installing fence posts, rails and pickets supports the use of alignment tools and spacers. The two equal-spacing formulas and marking sequences are derived from the stated geometry.
Reviewed 15 November 2026. Equations and worked examples are WebToolzHub calculations. Check current product instructions and your measurements before buying.