Baluster Spacing Calculator
Enter the opening between posts and the actual baluster width to get a count, equal gaps and layout marks for a level railing. The spacing math works for fence pickets too, but guards have different requirements: a 4 in sphere must not pass. Check local requirements before building.
Baluster spacing layout – picketcalc.com
Your baluster layout
- Balusters
- 18
- Number of gaps
- 19
- Exact clear gap
- 3.631578947… in
- Center to center
- 5.131578947… in
- Each end gap
- 3.631578947… in
For level guards, a 4 in sphere must not pass (2021 IRC R312.1.3). Check every installed opening, including below the rail. Rounded tape marks and a calculated layout do not establish code compliance.
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.
| Baluster | Left edge exact | Left edge tape | Center exact | Center tape | Right edge exact | Right edge tape |
|---|---|---|---|---|---|---|
| 1 | 69 / 19 = 3.631578947… | 3 5/8 | 83.25 / 19 = 4.381578947… | 4 3/8 | 97.5 / 19 = 5.131578947… | 5 1/8 |
| 2 | 166.5 / 19 = 8.763157894… | 8 3/4 | 180.75 / 19 = 9.513157894… | 9 1/2 | 195 / 19 = 10.263157894… | 10 1/4 |
| 3 | 264 / 19 = 13.894736842… | 13 7/8 | 278.25 / 19 = 14.644736842… | 14 5/8 | 292.5 / 19 = 15.394736842… | 15 3/8 |
| 4 | 361.5 / 19 = 19.026315789… | 19 | 375.75 / 19 = 19.776315789… | 19 3/4 | 390 / 19 = 20.526315789… | 20 1/2 |
| 5 | 459 / 19 = 24.157894736… | 24 3/16 | 473.25 / 19 = 24.907894736… | 24 15/16 | 487.5 / 19 = 25.657894736… | 25 11/16 |
| 6 | 556.5 / 19 = 29.289473684… | 29 5/16 | 570.75 / 19 = 30.039473684… | 30 1/16 | 585 / 19 = 30.789473684… | 30 13/16 |
| 7 | 654 / 19 = 34.421052631… | 34 7/16 | 668.25 / 19 = 35.171052631… | 35 3/16 | 682.5 / 19 = 35.921052631… | 35 15/16 |
| 8 | 751.5 / 19 = 39.552631578… | 39 9/16 | 765.75 / 19 = 40.302631578… | 40 5/16 | 780 / 19 = 41.052631578… | 41 1/16 |
| 9 | 849 / 19 = 44.684210526… | 44 11/16 | 863.25 / 19 = 45.434210526… | 45 7/16 | 877.5 / 19 = 46.184210526… | 46 3/16 |
| 10 | 946.5 / 19 = 49.815789473… | 49 13/16 | 960.75 / 19 = 50.565789473… | 50 9/16 | 975 / 19 = 51.315789473… | 51 5/16 |
| 11 | 1044 / 19 = 54.947368421… | 54 15/16 | 1058.25 / 19 = 55.697368421… | 55 11/16 | 1072.5 / 19 = 56.447368421… | 56 7/16 |
| 12 | 1141.5 / 19 = 60.078947368… | 60 1/16 | 1155.75 / 19 = 60.828947368… | 60 13/16 | 1170 / 19 = 61.578947368… | 61 9/16 |
| 13 | 1239 / 19 = 65.210526315… | 65 3/16 | 1253.25 / 19 = 65.960526315… | 65 15/16 | 1267.5 / 19 = 66.710526315… | 66 11/16 |
| 14 | 1336.5 / 19 = 70.342105263… | 70 5/16 | 1350.75 / 19 = 71.092105263… | 71 1/16 | 1365 / 19 = 71.842105263… | 71 13/16 |
| 15 | 1434 / 19 = 75.47368421… | 75 1/2 | 1448.25 / 19 = 76.22368421… | 76 1/4 | 1462.5 / 19 = 76.97368421… | 77 |
| 16 | 1531.5 / 19 = 80.605263157… | 80 5/8 | 1545.75 / 19 = 81.355263157… | 81 3/8 | 1560 / 19 = 82.105263157… | 82 1/8 |
| 17 | 1629 / 19 = 85.736842105… | 85 3/4 | 1643.25 / 19 = 86.486842105… | 86 1/2 | 1657.5 / 19 = 87.236842105… | 87 1/4 |
| 18 | 1726.5 / 19 = 90.868421052… | 90 7/8 | 1740.75 / 19 = 91.618421052… | 91 5/8 | 1755 / 19 = 92.368421052… | 92 3/8 |
Compare bay layouts
How to use the calculator
- Enter the clear opening between the finished post faces and the measured baluster width. Choose inches or millimeters and keep the measurements in that unit.
- Choose equal end gaps or flush end balusters. Equal ends leave matching spaces beside the posts and between balusters; flush ends put the outside balusters against the posts.
- Set your maximum clear gap. The default is a planning choice below the 4 in sphere diameter, not a code-prescribed spacer.
- Read the count and exact gap, then mark each position from the left edge of the opening. Print the layout or copy its link to save your inputs.
Fixed-count mode checks a count you already have. If its gaps are too large, add balusters or revise the layout. Changing the maximum alone does not change a fixed count. Maximum-gap mode chooses the fewest whole balusters that fit the selected spacing limit.
Measure between posts and use the actual width
Measure the empty space the balusters will fill, horizontally between the inside faces of the finished posts. Post sleeves, trim and mounting parts can move those boundaries inward. Take the measurement where the infill sits, after allowing for those parts. A rail's stock length or a post-center dimension includes material outside that empty space.
Check the opening at the upper and lower rail positions. If those widths differ, look for a leaning post, a tapered sleeve or a mounting offset before copying the layout onto both rails. The tool assumes a constant opening and equally wide, plumb balusters. Measure every section separately; matching post spacing does not guarantee matching clear openings.
Use the installed face width for square wood balusters and the outside diameter for round metal balusters. The examples below assume measured widths of 1.5 in and 0.75 in respectively. A nominal lumber label is not a measurement. Check several pieces from the batch, and use the width in the orientation you will install them.
Turned profiles or decorative collars need another check. A wide collar near the bottom does not close the opening farther up a narrow shaft. Check the widest finished opening through the guard's height. For a proprietary railing kit, follow its connector and hole-spacing instructions before substituting a custom layout.
Worked deck examples: 6 ft and 8 ft clear sections
These examples use equal end gaps and a 3.875 in planning maximum. The openings are clear distances between posts, not nominal panel sizes or approved structural spans.
| Clear section | Baluster | Count | Actual gap | First left edge | First center | Second center |
|---|---|---|---|---|---|---|
| 6 ft (72 in) | Square wood, 1.5 in | 13 | 3.75 | 3.75 | 4.5 | 9.75 |
| 6 ft (72 in) | Round metal, 0.75 in | 15 | 3.796875 | 3.796875 | 4.171875 | 8.71875 |
| 8 ft (96 in) | Square wood, 1.5 in | 18 | 69 / 19 = 3.631578947… | 69 / 19 = 3.631578947… | 83.25 / 19 = 4.381578947… | 180.75 / 19 = 9.513157894… |
| 8 ft (96 in) | Round metal, 0.75 in | 20 | 81 / 21 = 3.857142857… | 81 / 21 = 3.857142857… | 88.875 / 21 = 4.232142857… | 185.625 / 21 = 8.839285714… |
Square wood balusters
In the 6 ft section, 13 balusters occupy 19.5 in. That leaves 52.5 in divided among 14 gaps, each 3.75 in. The first center mark is 4.5 in; the next is 9.75 in from the same starting point.
The 8 ft section needs 18 balusters. Its remaining 69 in is split into 19 gaps. The gap repeats as a decimal, so use the exact expression in the table. The first center's tape mark is 4 3/8 in at the tool's default tape precision; measure each later mark independently from the left edge of the opening.
Round metal balusters
With the narrower 0.75 in diameter, the 6 ft section needs 15 balusters and the 8 ft section needs 20. Their actual gaps are 3.796875 in and 81 / 21 = 3.857142857… in. Narrower pieces leave more open space at the same count, so the tool adds pieces to stay within the selected maximum.
Use center marks when locating round-baluster connectors. For a board-edge layout, use the left-edge column throughout. Mixing a center mark with an edge mark shifts the piece by half its width. Re-enter an example's opening and width above to get every mark, select flush ends or compare a fixed count.
Balusters per foot and per section
For a quick estimate, divide a section's calculated count by its clear length in feet. The wood examples give 13 / 6 = 2.17 balusters per foot and 18 / 8 = 2.25 per foot. Both metal examples give 2.50 per foot. These are rounded densities derived from those complete layouts, not required spacing rates.
Use those densities to compare likely quantities while sketching a project. For an order, calculate each opening and add the whole counts. End gaps restart at every post, and rounding happens separately in each section; multiplying a density by the total railing length can miss that difference. The counts describe installed balusters only. Keep any purchase allowance for cuts or damaged pieces separate.
Deck railing spacing: the sphere rule
For required guards, 2021 IRC R312.1.3 requires that a 4 in sphere must not pass through openings from the walking surface to the required guard height. This includes gaps between balusters, beside posts and below the bottom rail. An exactly 4 in calculated gap is not treated as passing here. The calculator checks the horizontal layout; inspect the other openings on site.
Stair balusters: measure the rail and the horizontal run
The same section has separate stair exceptions. Exception 2 prohibits passage of a 4⅜ in sphere through guards on the open side of stairs. Exception 1 prohibits passage of a 6 in sphere through the triangle formed by the riser, tread and bottom rail of a guard at the open side of a stair. The triangle allowance does not apply to the gaps between balusters.
Measure the sloping opening along the rail's layout line between the inside post faces. Record the horizontal run and vertical rise between those endpoints as separate dimensions. A tape resting on the rail reads the slope length, which is longer than the horizontal run. Do not enter that rail measurement as a level opening for vertical balusters.
For plumb balusters, the face widths and clear gaps fill the horizontal run. Center marks along the rake are farther apart: horizontal center spacing equals along-rail center spacing multiplied by horizontal run divided by slope length. To transfer a horizontal center mark onto a straight sloping rail, multiply its distance from the starting inside post face by slope length divided by horizontal run.
The slope length and horizontal spacing guide explains that geometry and how to establish a level reference. This calculator has no stair mode and does not check the tread-to-rail triangle. Confirm the rake layout and connector positions against the railing system's instructions, then check the finished stair openings separately.
Common spacing mistakes
- Using nominal size: measure the baluster itself. A wider label entered as the actual width reserves space that a narrower installed piece leaves open.
- Measuring post centers: the calculator needs clear space between the infill boundaries. Including parts of both posts produces the wrong count and marks.
- Rounding a gap up to 4 in: a convenient spacer does not override the sphere rule. Read the unrounded result and check installed openings.
- Adding a rounded gap repeatedly: this accumulates error across the section. Use cumulative marks from the same starting edge, and check the last piece against the far post before fastening the whole run.
Where the rule applies
The 4 in sphere rule is for required guards, such as those protecting deck edges, stairs and landings, subject to the stair exceptions above. Ordinary yard fences usually have no baluster gap rule. For a yard fence layout, use the picket spacing calculator.
Pool barriers follow pool barrier rules (see our pool fence requirements guide); a guard layout does not establish that a pool enclosure meets them. Local codes and amendments govern. Ask your building department which edition and requirements apply to your project.