This baluster calculator works out how many balusters or spindles you need to fill a railing, and the even gap to leave between them so the whole run looks tidy and stays within the building code. You enter the clear length of the railing between the posts, the width of each baluster, and the maximum gap you are allowed, then the calculator finds the smallest number of balusters that keeps every gap under that limit and spreads them out evenly. In New Zealand the Building Code clause F4 says a barrier on a deck, balcony or stair must not let a 100 mm sphere pass, so the gaps between balusters have to be less than 100 mm, which is the default here. The maths treats the run as a repeating pattern of baluster then gap, with a gap at each end, so the number of gaps is always one more than the number of balusters. Use it when building or restoring a deck balustrade, a stair rail or a fence, so you can buy the right quantity and set out the spacing before you start fixing timber. Always confirm the gap against your final baluster size and check any local requirements.
Gaps must stay under 100 mm to meet Building Code clause F4. Set out from the centre so the two end gaps match. Estimate only, confirm against your actual timber.
The run is a repeating pattern of baluster then gap, with a gap at each end, so the number of gaps is one more than the number of balusters. To find the count, the calculator takes the rail length less one maximum gap, divides by the baluster width plus the maximum gap, and rounds up: that is the fewest balusters that still keep every gap under the limit. The even gap is then the rail length minus all the baluster widths, shared across those gaps. On-centre spacing is one baluster width plus one gap, which is the distance from the centre of one baluster to the next.
You have a 3000 mm clear railing, 40 mm balusters, and a 100 mm maximum gap. The count is (3000 minus 100) divided by (40 plus 100), which is 2900 divided by 140, or 20.7, rounded up to 21 balusters. With 21 balusters there are 22 gaps, and the timber takes up 21 times 40, which is 840 mm, leaving 2160 mm of gap. Shared across 22 gaps that is 98.2 mm each, safely under 100 mm, and the on-centre spacing is 40 plus 98.2, which is 138.2 mm.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland by SiteHost New Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-31 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.