Equal gaps and marks for each bay

Picket Spacing Calculator

Enter the clear opening between posts and the actual picket width to find an equal layout. Choose how the ends meet the posts, set a maximum gap or a fixed count, and print the positions of every board. This is a layout calculation; pool barriers and railings require a separate code check.

Your opening and pickets

In inches, enter 96, 96 1/2, or 8' 0 1/2". In millimeters, enter a number. Use one unit throughout.

Compare multiple bays (optional)

Up to 12 openings. The left strategy uses your end and count modes. The right strategy keeps this interior gap and splits the remainder equally at the ends. In maximum-gap mode, it fits as many pickets as possible at that fixed gap.

Your picket layout

Pickets
15
Number of gaps
16
Exact clear gap
2.71875 in
Center to center
6.21875 in
Each end gap
2.71875 in

Marks start at the left edge of the clear opening. Decimal previews with … repeat or continue; their exact expressions appear in the table. Tape marks are rounded separately from the unrounded calculation.

Layout marks from the left datum

All dimensions in inches. Tape marks rounded to the nearest 1/16 in.

Each mark is measured from the left edge of the opening.
PicketLeft edge exactLeft edge tapeCenter exactCenter tapeRight edge exactRight edge tape
12.718752 3/44.468754 1/26.218756 1/4
28.93758 15/1610.687510 11/1612.437512 7/16
315.1562515 3/1616.9062516 15/1618.6562518 11/16
421.37521 3/823.12523 1/824.87524 7/8
527.5937527 5/829.3437529 3/831.0937531 1/8
633.812533 13/1635.562535 9/1637.312537 5/16
740.0312540 1/1641.7812541 13/1643.5312543 9/16
846.2546 1/4484849.7549 3/4
952.4687552 1/254.2187554 1/455.9687556
1058.687558 11/1660.437560 7/1662.187562 3/16
1164.9062564 15/1666.6562566 11/1668.4062568 7/16
1271.12571 1/872.87572 7/874.62574 5/8
1377.3437577 3/879.0937579 1/880.8437580 7/8
1483.562583 9/1685.312585 5/1687.062587 1/16
1589.7812589 13/1691.5312591 9/1693.2812593 5/16

Choose your picket layout

Use this tool after you know the width of a particular opening. It places whole, equally wide pickets across that opening and reports the spaces left between them. The clear gap is the empty distance from one board edge to the next. Center spacing includes a board width as well as that empty space. Those two measurements answer different questions when you set a spacer or mark a rail.

Measure between the surfaces that will bound the pickets. If the pickets sit between the inside post faces, measure between those faces. If trim reduces the usable opening, measure after accounting for the trim. A post center-to-center dimension includes parts of the posts and will produce the wrong layout here. Check the opening where the pickets will run; do not substitute the length of a loose rail.

Enter the measured face width of a board. Check several boards from the batch, especially if the widths vary. This calculator assumes the same width for every picket in a bay. A wider board consumes space that the calculation reserved for a gap. Sort boards or revise the input before laying out a bay whose pieces differ enough to affect the finished fit.

In inch mode, a plain number means inches. You can also enter a mixed fraction or feet followed by inches, such as 8' 0 1/2". The unit selector converts the current measurements, including any bay list, between inches and millimeters. Tape precision stays an inch-based increment; metric results show that increment converted to millimeters. Changing display units does not select a different fence design.

What this tool does not verify

A gap below the number you enter passes only that numerical comparison. The tool does not determine the rules for a pool enclosure, child barrier, deck railing, stair guard or baluster layout. Those applications can require checks beyond a single clear gap. Confirm the applicable requirements and the specified fence system before using the marks. The calculator also does not size posts, rails, connections or gate hardware.

For how many to buy: picket fence calculator, use the material calculator. It handles the fence run and purchase allowance. The layout count here is the number installed in a measured opening, without spare boards. Keep the installed count and the purchase total separate when you transfer results to your material list.

Equal end gaps vs flush end pickets

Choose equal end gaps when you want the empty space beside each post to match the empty space between boards. With N pickets, there are N − 1 interior gaps and two end gaps, making N + 1 spaces altogether. The first board begins one calculated gap away from the left datum. The last board stops the same distance short of the right boundary.

Choose flush end pickets when the outside edges of the first and last boards must meet the opening boundaries. That removes the end spaces and leaves N − 1 interior gaps. For the same opening and board width, a particular count produces larger interior gaps than it does with equal end spaces. Flush ends can therefore require another board to stay below the same maximum.

Neither setting trims an end picket. If you want a partial board beside a post, or a different clearance at each end, that is a different layout from the two equal-spacing choices. Measure the usable opening and settle the end treatment before comparing counts. A flush layout with one picket fits only when that picket is exactly as wide as the opening.

Calculate count, gap and center spacing

A 96-inch opening: worked example

For an illustrative 96 in clear opening, 3.5 in actual pickets and a maximum gap of 3 in, equal ends require 15 pickets. Their combined width is 52.5 in, leaving 43.5 in to divide into 16 spaces. Each exact gap is 2.71875 in, or 2 23/32 in. The center-to-center distance is 6.21875 in.

Reducing the count to 14 leaves 47 in spread across 15 gaps. That makes each gap 3.1333 in, which exceeds the 3 in maximum. The smaller count therefore fails even though all of its boards fit inside the opening. Keeping the original dimensions and switching to flush ends returns 16 pickets with 15 interior gaps of 2.666666666… in.

Maximum gap vs target gap

Maximum-gap mode finds the fewest whole pickets that keep every calculated gap within the limit you entered. The result will often be smaller than that limit because you cannot install a fraction of a picket. A maximum of 3 in does not promise a 3 in spacer. Read the resulting gap before cutting a spacer block or marking the first rail.

Fixed-count mode answers a different question: what gap will a chosen number of boards create? Enter the count you want to install and leave the maximum as a check. If the boards fit but the calculated gap exceeds that limit, the result stays visible with a warning. This lets you compare the layout while seeing why it fails your maximum. A layout whose boards exceed the available width is rejected instead of displaying negative gaps.

A target gap is a preferred appearance, not necessarily an upper limit. If you need exactly the same interior spacer across several openings, use the second multi-bay strategy below. It allows the end spaces to differ from the interior gap. Check both end spaces against your maximum; an acceptable interior spacer alone does not prove that the full bay meets the limit.

Mark each picket from one datum

The datum is the left edge of the clear opening, designated zero. Each table row gives the left edge, center and right edge of one picket, all measured from that same zero. Choose the column that matches your installation method. For example, align a board's left edge to the left-edge mark, or align its centerline to the center mark. Mixing those two columns shifts a board by half its width.

For the default example, the first picket starts at 2.71875 in, its center is 4.46875 in and its right edge is 6.21875 in. Each later position is calculated from the exact starting gap and the exact center spacing. The tool never advances through the bay by repeatedly adding the tape-rounded gap.

Exact results vs tape fractions

Select the tape precision you can read and mark consistently. Each coordinate is independently rounded to the nearest selected increment. The decimal column describes the unrounded calculation; an ellipsis means the decimal preview continues, and the row includes its exact arithmetic expression. A tape mark is a practical approximation of that coordinate. It does not replace the value used to compute the next row.

Adjacent rounded marks can alternate between slightly different measured intervals. That is expected when the true interval falls between tape graduations. Using one rounded spacer repeatedly creates a different layout and can leave a noticeable discrepancy at the far post. Keep the tape hooked or referenced at the same datum and read the cumulative position for each board.

Before fastening the whole bay, mark a rail or a separate layout strip and check the final right edge against the opening. Confirm which side of a pencil line represents the board edge. If a post is out of plumb or the rails span different clear widths, check those conditions before copying one rail's marks onto another. The table assumes a rectangular opening with consistent width.

Use Print or save PDF for the current inputs, results and marking table. Copy link puts the full input set into a URL so the same layout can be restored later, including units, precision and bay widths. A printed sheet carries that URL and the date it was printed. Recheck measurements after site changes; restoring an old link restores its recorded inputs.

Match different bay widths

Open the optional bay comparison and enter clear widths separated by commas. Measure every bay independently. The first strategy applies the selected end mode and count mode within each opening, so each bay gets its own equal spacing. The second uses the fixed interior gap you enter, balances the remaining width at the ends, and reports those end gaps separately. Each bay has its own left datum.

Computed example: 3.5 in pickets, 3 in maximum and 3 in fixed interior gap, equal ends.
OpeningA: picketsA: equal gapB: picketsB: each end gap
96 in152.71875 in150.75 in
100 in152.96875 in152.75 in

Strategy A preserves equal spaces within each bay but changes the spacer between unequal bays. Strategy B preserves the interior spacer across the run, with the extra width showing beside the posts. In maximum-gap mode, strategy B fits the largest whole count possible at that interior gap. It then checks the end remainder against your maximum. If an end gap is too wide, change the count, gap or layout choice.

In fixed-count mode, both strategies use your chosen count in each bay. A narrow bay can fail while a wider bay still fits; the comparison reports that failure beside the affected strategy. Expand a bay's layout marks to get its own coordinate table. Those positions restart at zero for each opening and should never be added to a previous bay's last mark. For the derivation and a width check before you fasten boards, read the picket spacing formula and worked layout.