What this calculator does
This balustrade spacing calculator works out how many balusters, the upright rails in a balustrade, fit along a run of railing while keeping every gap at or under a maximum you set, spreading any leftover space evenly rather than bunching it at one end.
Balustrades and railings usually have a safety-driven maximum gap written into the applicable building code, most often aimed at stopping a young child slipping through or getting a foothold to climb. That maximum varies by jurisdiction and by the type of installation, which is why it is a free input here rather than a fixed number: always check the actual code that applies to your project before relying on a figure from this or any general planning guide.
The formula
The calculator finds the smallest number of balusters, at the given width, that keeps every gap at or under the maximum allowable gap you entered, then spreads the leftover space evenly across every gap, including the two end gaps against the posts. This gives an actual gap that is typically a little tighter than the maximum you set, since the total space rarely divides evenly.
| Term | Meaning |
|---|---|
| Balustrade run length | The total length of railing being filled with balusters, from post to post. |
| Baluster width | The width of each individual upright rail. |
| Maximum allowable gap | The largest gap permitted between balusters under the building code or design standard that applies to this installation. |
The inputs explained
| Field | What to enter |
|---|---|
| Balustrade run length (mm) | The total length of the balustrade run, from one end post to the other. |
| Baluster width (mm) | The width of a single baluster. |
| Maximum allowable gap (check your local building code) (mm) | The maximum gap permitted between balusters where you are building; check your local building code rather than assuming a figure. |
When to use it
Planning a deck or stair balustrade
Before ordering materials, working out the exact baluster count and actual gap confirms the run can be filled evenly at the chosen spacing, rather than discovering an awkward leftover gap on site.
Checking against a child-safety code requirement
Many jurisdictions set a maximum gap specifically to stop a young child slipping through or climbing the balustrade; entering that exact figure as the maximum allowable gap checks a design meets it before construction.
Comparing baluster widths
A wider baluster needs fewer of them to fill the same run at the same maximum gap, which affects both material cost and the finished look; comparing options side by side shows that trade-off directly.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How the baluster count and actual gap change with run length
A fixed baluster width and maximum gap, across a range of run lengths.
| Run length | Number of balusters needed | Actual gap between balusters (and at each end) |
|---|---|---|
| 1200 mm | 8 | 97.8 mm |
| 1800 mm | 13 | 91.4 mm |
| 2400 mm | 17 | 95.6 mm |
| 3000 mm | 21 | 98.2 mm |
| 3600 mm | 25 | 100.0 mm |
| 4200 mm | 30 | 96.8 mm |
How the baluster count changes with the maximum allowable gap
A fixed run length and baluster width, across a range of maximum allowable gaps.
| Maximum allowable gap | Number of balusters needed | Actual gap between balusters (and at each end) |
|---|---|---|
| 75 mm | 21 | 70.9 mm |
| 90 mm | 18 | 88.4 mm |
| 100 mm | 17 | 95.6 mm |
| 110 mm | 16 | 103.5 mm |
| 125 mm | 14 | 122.7 mm |
| 150 mm | 12 | 147.7 mm |
Questions
What is the maximum gap allowed for a balustrade?
It depends on the jurisdiction and the type of balustrade, and commonly sits somewhere in the range of 100 to 125 mm where a child-safety requirement applies, but this varies by location and use. Always check the specific building code that applies to your project rather than relying on a general figure.
How is this different from the fence picket calculator?
The underlying spacing arithmetic is similar, but the fence picket calculator is aimed at a decorative fence run with no particular safety constraint on the gap, while this calculator is built around a maximum allowable gap driven by balustrade safety codes, which is a free input here since it varies by jurisdiction.
Why is the actual gap usually smaller than the maximum I entered?
The calculator rounds up to the number of balusters needed to stay at or under the maximum gap, and that number rarely divides the run length into gaps of exactly the maximum size, so the actual gap that results is typically a little tighter.
Does this account for the balusters at the very ends of the run?
Yes, the leftover space is spread across every gap including the two end gaps against the posts, so the run has one more gap than it has balusters.
For a similar spacing calculation without a safety-driven gap limit, see the fence picket calculator.