Understanding your result
The count is the smallest whole number that satisfies the selected gap. Center marks measure from the inside face of the left post, not from its center. Display rounding is for reading; use enough precision when marking.
For the decking surface beneath a railing, use the Deck Board Calculator to estimate boards separately from the railing members.
The formula
L is the clear opening, B the actual baluster width, and G the maximum gap you enter. N balusters create N + 1 spaces when both ends have the same gap. First center = clear gap + half a baluster width; each following center advances by one width plus one gap.
Worked example
A 72-inch opening, 1.5-inch balusters, and 3.9-inch maximum gap require 13 balusters. They occupy 19.5 inches, leaving 52.5 inches across 14 gaps. Each gap is 3.75 inches; centers are 5.25 inches apart and the first center is 4.5 inches from the post.
How to use this calculator
- Measure between the inside faces of the two posts.
- Enter the actual baluster width and the chosen maximum clear gap.
- Check the equal gap and use center marks from the same starting face.
Measure the finished opening
Post sleeves, brackets, and decorative parts can reduce the space available. Measure after accounting for those parts. Nominal lumber sizes do not necessarily describe the finished width, so measure a sample baluster instead of entering the purchase label.
End gaps and installation tolerances
Dividing by N alone omits an end gap and changes the layout. This model deliberately keeps both end spaces equal to every internal space. A count of zero means only that your entered opening is within your entered gap; it is not a decision about whether a guard is required. Set a smaller planning gap if you need allowance for installation variation.
Use the correct railing instructions
This tool covers straight, level sections with constant-width members. Prefabricated rails may have fixed holes and their own spacing rules. Angled stairs, tapered balusters, structural loads, and local opening requirements need separate review against the actual product and jurisdiction.
Assumptions & limitations
What this calculation assumes
- All balusters have the same finished width and remain vertical in a level opening.
What to keep in mind
- This is a layout calculation, not a structural or building-code approval.
- Only the first 100 center marks are listed; the count and spacing cover the full opening.
Common questions
Can I enter nominal two-by-two lumber?
Enter its measured finished width. The calculator cannot infer planing or manufacturing tolerances.
Why can a narrow opening be impossible?
A thick baluster may leave too much gap when one is used, but two may not physically fit. Change the material or layout rather than forcing a negative gap.