Introduction
This baluster calculator tells you how many balusters (spindles) you need and how far apart to set them. Type in your railing size, post width, and baluster width. It spaces everything evenly and checks the gaps against your local building code.
Most codes say a 4-inch ball must not fit through any opening in a guardrail. That rule changes by country, so you can pick your region (the United States, Canada, the UK, Ireland, Spain, Australia, France, or Germany) or set your own limit. Every result shows Pass or Fail.
Use the Baluster Count tab when you know the total length of your railing and the number of posts. Use the Baluster Spacing tab when you have several sections, like a deck with a flat run and a stair run. You can add up to 10 sections at once.
Stairs are handled too. Enter your riser height and tread depth, and the calculator works out the stair angle. It then gives you two sets of marks: one measured flat, and one measured along the slope of the handrail, so you can mark your rail and start drilling.
You also get:
- The even gap between each baluster
- On-center spacing for fast layout
- A list of every baluster position
- A layout drawing with a close-up view
- Step-by-step math so you can check the work
Work in inches, feet, centimeters, or millimeters. Inch users get fractions down to 1/16", the way a tape measure reads. Always check your local code before you build.
How to use our Baluster Calculator
Enter your railing size, post size, and baluster width, and the calculator tells you how many balusters you need, the even gap between them, the on-center spacing, and whether the layout passes code.
Unit System: Pick inches, feet, centimetres, or millimetres. Inches gives you a whole number box plus a fraction list.
Jurisdiction / Code Maximum Gap: Choose your country or region. This sets the biggest gap allowed between balusters.
Custom Maximum Gap: Only shows if you pick "Custom." Type the largest gap your local code or spec allows.
Baluster Width: Pick your baluster type, or choose Custom. Use the shaft width, not the decorative face width.
Custom Baluster Width: Only shows if you pick Custom. Type the real width of one baluster.
Post Width: Type the actual face width of your posts. A 4×4 post is 3.5 in and a 6×6 post is 5.5 in.
Target Gap (optional): Leave blank to use the code limit. Type a value here to test a gap you want.
Baluster Count tab
Total Railing Length: Measure the whole run from end to end, including the posts.
Number of Posts: Count every post, including both ends. Two posts make one bay.
Post Width (this run): Change this if the posts in this run differ from your global post width.
Baluster Spacing (gap): Type the clear gap you want between balusters. The calculator tightens it so every gap is equal and legal.
Baluster Spacing tab
Add Flat Section / Add Staircase Section: Add up to 10 sections. Use flat for level railing and staircase for sloped railing.
Section Width: Measure the opening for that one section.
Width Measured: Tell the calculator how you measured: inside face to inside face, center to center, or outside to outside.
Span Direction (stairs): Choose if you measured flat across the floor (run) or along the slope (rake).
Riser Height (stairs): Type the height from one tread top to the next tread top.
Tread Depth (stairs): Type the depth of one step, nose to nose.
Results and diagram
View Mode: Switch the drawing between horizontal railing, stairs, or a kneewall.
Section shown in diagram: Pick which section you want drawn and worked out step by step.
Close-up detail: Zoom in to see the baluster width, clear gap, and on-center spacing side by side.
Calculate: Press it to update your results. Clear All resets the inputs back to the defaults.
What Are Balusters?
Balusters are the small upright posts that fill the space between a handrail and the floor, deck, or stair. People also call them spindles or pickets. They stop people and pets from falling through the railing, and they help hold the handrail steady. Balusters can be wood, metal, glass, or composite.
The 4-Inch Rule
Most building codes use a "sphere rule" for baluster spacing. In the United States, the IRC and IBC say a 4-inch ball must not pass through any opening in a guardrail. That means the clear gap between two balusters must be less than 4 inches. Other countries use their own limit:
- United States: 4 in (101.6 mm)
- Canada, United Kingdom, Ireland, Spain: 100 mm
- France: 110 mm
- Germany: 120 mm
- Australia: 125 mm
The rule protects small children, who can slip through wide gaps. Always check with your local building office before you build, since city rules can be stricter.
Gap vs. On-Center Spacing
These two numbers are not the same, and mixing them up is the most common layout mistake.
- Clear gap: the open air space between the side of one baluster and the side of the next one. This is the number the code cares about.
- On-center (OC): the distance from the middle of one baluster to the middle of the next. It equals the gap plus the baluster width.
Example: a 1.5-inch baluster with a 3.875-inch gap gives 5.375 inches on center. You mark the on-center numbers on the rail, because it is faster and more exact than measuring each gap.
Measuring Your Railing
Posts take up space, so they must be subtracted before you divide up a run. A nominal 4×4 post is really 3.5 inches wide, and a 6×6 post is really 5.5 inches. Measure inside face to inside face between two posts to get the clear span, also called a bay. If you measured center to center or outside to outside, you need to remove one or two post widths first.
For baluster width, use the true shaft width, not the fancy decorative part. A 3/4-inch metal tube is 0.75 inch. A 2×2 wood baluster is really 1.5 inches.
Stair Balusters and the Rake
Stair railings slope, so the math changes a little. The slope is called the rake. Balusters on stairs still stand straight up and down, and the gap is still measured straight across, but the marks on the sloped handrail are spread farther apart than the marks on the level floor below.
The stair angle comes from the riser height and tread depth. A stair with a 7.5-inch rise and a 10-inch tread sits at about 36.9 degrees. To get the rake spacing, divide the level on-center spacing by the cosine of that angle. That is why stair sections usually need the same number of balusters as a flat run of the same horizontal length, but with wider marks on the rail.
Layout Tips
- Always round the baluster count up. Rounding down makes gaps too wide and fails inspection.
- Keep every gap equal, including the two end gaps next to the posts. Uneven ends look sloppy and can break code.
- An odd number of balusters puts one baluster in the middle. An even number puts a gap in the middle.
- Buy a few extra balusters for cuts, splits, and mistakes.
- Guardrails on decks and landings usually must be at least 36 inches tall for homes, and stair handrails sit around 34 to 38 inches above the tread nose.
Good baluster spacing is about safety first, then looks. Even gaps that beat the code limit will pass inspection and give a clean, professional finish.