Deck & Stair Baluster Spindle Spacing Calculator (4-Inch IRC Sphere Rule)

Space stair and deck spindles evenly while satisfying the <4" IRC sphere code.

Balusters / Spindles Required 13 spindles
Exact Clear Gap Between Spindles 3.75 in (under the 4" sphere rule)
On-Center Layout Pitch 5.25 in OC
Total Spaces (Spindles + 1) 14 spaces
Inputs
Try:
in
Inside clear distance between structural newel posts in inches.
in
Actual width of each baluster or spindle in inches (e.g., 1.5" wood, 0.75" metal).
in
Maximum allowed clear space between spindles (IRC code requires <4.0").
Results & Graph
Balusters / Spindles Required
13 spindles
Exact Clear Gap Between Spindles
3.75 in (under the 4" sphere rule)
On-Center Layout Pitch
5.25 in OC
Total Spaces (Spindles + 1)
14 spaces

Balusters / Spindles Required

Graph 1 • How the inputs feed Baluster & Spindle Spacing
Deck & Stair Baluster Spindle Spacing Calculator (4-Inch IRC Sphere Rule) • Custom Domain Schematic (Carpentry & Framing) Takeoff Dim: clearIns × spindleW (Baluster & Spindle Spa) Clear Inside Rail Length In: 72 in • Spindle Width In: 1.50 in BALUSTERS / SPINDLES REQUI 13 spindles • Exact Clear Gap Betwee: 3.75 in (under t • On-Center Layout Pitch: 5.25 in OC Eq: Spindles = ceil((ClearInsideOpen
Graph 2 • Balusters / Spindles Required as Clear Inside Rail Length In changes (40% to 160% of current)
0 spindl 11.55 spindl 23.10 spindl 5 28.80in 8 43.20in 10 57.60in 13 72in 16 86.40in 19 100.8in 21 115.2in
Graph 3 • Clear Inside Rail Length In and Spindle Width In together Compares Balusters / Spindles Required when Spindle Width In is shifted +25% (solid) vs. −25% (dashed).
0 spindl 9.90 spindl 19.80 spindl --- Spindle Width In @ 75% 9 -30% 10 -15% 12 +0% 14 +15% 16 +30%
Summary: A 72" clear rail opening fits 13 spindles (1.5" wide) with 14 equal gaps of 3.75" (5.25" on-center).
Summary: A 72" clear rail opening fits 13 spindles (1.5" wide) with 14 equal gaps of 3.75" (5.25" on-center).
Interactive chart & math engine powered by CalculatorGraph

Formula: Baluster & Spindle Spacing Formula

Spindles = ceil(ClearInsideOpeningin − MaxGapinSpindleWidthin + MaxGapin)
ExactGap = Opening − Spindles·WidthSpindles + 1
Spindles = ceil((ClearInsideOpening_in − MaxGap_in) / (SpindleWidth_in + MaxGap_in)); ExactGap = (Opening − Spindles·Width) / (Spindles + 1)
  • clearInsideRailLengthIn: Clear Inside Rail Length (in)
  • spindleWidthIn: Spindle Width (in)
  • maxAllowedGapIn: Max Allowed Gap (in)

Rounding: Physical package counts round up where appropriate; continuous measurements round to 2 decimal places.

Frequently Asked Questions

Why does the calculator round the spindle count up?

Because a fraction of a spindle is no use and rounding down would leave gaps over the limit. For a 72 inch opening, the maths lands between 12 and 13 spindles. Twelve would leave gaps above 4 inches, so the calculator chooses 13, then spreads the leftover space equally to give 14 gaps of 3.75 inches.

Do the end gaps against the posts count as gaps?

Yes. The calculator always makes one more space than spindles, and every space is the same, including the two ends. In the default layout that is 14 spaces of 3.75 inches for 13 spindles. A sphere test checks the opening next to a post just like any other, so the ends must meet the same limit.

Can I set the maximum gap to exactly 4 inches?

You can, and on the default 72 inch run it makes no difference to the answer. On other lengths it may let you drop a spindle and run gaps very close to 4. Wood movement and small installation errors can then push a gap over. The default of 3.875 builds in an eighth of an inch to absorb that.

What spindle width should I enter for a 2x2?

Enter its actual measured width, which for a typical wood 2x2 is about 1.5 inches, the value the calculator starts with. Nominal lumber sizes are larger than the finished timber. Measure a few from your batch with callipers or a tape, since widths can vary slightly, and use the widest one you find.

How do I lay out spindles on a staircase?

Measure the horizontal distance between the posts and enter that as the clear length. The vertical spindles are tested by a sphere passing horizontally, so level spacing is what counts. Then mark the on-centre pitch along a level line and transfer it up to the sloping rail with a level or plumb line.

The gap is 3.444 inches. How do I measure that?

That is the 43 inch example, and it is about three and seven sixteenths. Rather than marking each gap with a tape, cut a spacer block to the gap and place it between each spindle as you fix them. The layout stays even and you avoid rounding errors building up across the 9 spaces in the run.

Why do two openings of similar length have different gap sizes?

Because the spindle count changes in whole steps. As an opening lengthens, the gaps grow until they reach the limit, then one more spindle is added and they all shrink. A 108 inch run gets 20 spindles at 3.71 inches, while a slightly shorter or longer one may land at a different point in that cycle.

Does a wider turned spindle reduce how many I need?

Yes. In a 72 inch opening, spindles 3.5 inches wide need only 10, compared with 13 at 1.5 inches. Measure the narrowest point a sphere could pass, though. Turned designs often pinch in at the neck, and the real opening there can be bigger than the gap the calculator shows for the full width.

Will this work for metal balusters?

Yes, as long as each baluster is a single straight bar of one width. Enter the bar's actual width. A thin 0.75 inch baluster in the default 72 inch run gives 15 balusters with gaps of 3.8 inches. Check whether your metal system includes fixed spacing in its rails, because some pre-drilled rails set the pitch for you.

What if my opening is only a few inches wide?

Very short openings, such as a gap beside a gate or a narrow return, may not need a spindle at all if the opening itself is under the limit. The calculator handles this: if the clear length is at or below your maximum gap, it returns 0 spindles and a single space equal to the opening. A 3 inch opening with the default limit shows 0 spindles and a 3 inch gap, under the 4 inch sphere rule.

Does passing the spacing mean my railing meets code?

No. This calculator handles only the gap between spindles. Guards also have rules for height, post strength, rail connections and other openings, and stairs add more of their own. Confirm the full design with your local building department or inspector, since local codes and amendments vary from place to place.

Thirteen spindles in a six foot opening

The starting example is a 72 inch clear opening between two posts, filled with spindles 1.5 inches wide, with no gap allowed to exceed 3.875 inches. The calculator answers 13 spindles. They create 14 equal spaces of exactly 3.75 inches, and the spindles sit 5.25 inches apart centre to centre.

Check it yourself. Thirteen spindles at 1.5 inches use 19.5 inches of the opening. That leaves 52.5 inches of air, shared across 14 gaps, which is 3.75 inches each. Every gap is the same, including the two at the ends against the posts, so the run looks even from any angle.

Twelve spindles would not do. Twelve would leave 13 gaps of a little over 4.15 inches, which is wider than the default limit and wider than the 4 inch sphere the code uses as its test. So the answer is the smallest whole number of spindles that keeps every gap under the limit you set.

Why the default limit is 3.875 and not 4

The rule behind this page, used in the International Residential Code, is usually described as the 4 inch sphere test: a ball 4 inches across must not pass through any opening in the guard. The calculator checks every result against that figure and says so in the gap line.

The default maximum gap is 3.875 inches, an eighth below the line, on purpose. Wood moves. Spindles twist and bow slightly as they dry, fasteners pull a little, and nobody cuts and sets a baluster run to a thousandth of an inch. A layout that only just passes at exactly 4 inches on paper can fail with a real sphere once it is built. The eighth of an inch is a margin for that.

On the default run, changing the limit from 3.875 to 4 makes no difference: the answer stays at 13 spindles with 3.75 inch gaps. On other lengths it may drop one spindle and push the gaps much closer to the edge. There is little to gain from removing the margin.

You can type a limit above 4, and the calculator will space to it, but the gap line then tells you plainly. Enter 4.5 on the default run and you get 12 spindles with gaps of 4.15 inches, marked NOT under the 4 inch sphere rule. On the default it reads 3.75 inches, under the 4 inch sphere rule. If you ever see the NOT version, lower the limit before you build. Your local building department has the final say on which rule applies to your deck or stair.

Measure the clear opening, not post centres

The first input is the clear inside length between the two faces that the spindles fill against, usually the inside faces of the posts at the height of the rail. It is not the post spacing measured centre to centre, and it is not the length of the rail board you cut.

That difference matters. Measuring centre to centre adds half of each post to the length, so the calculator thinks it has more room than it does. You will end up with gaps that are too small, or with a spindle that will not fit at the end. Measuring the wrong thing by even an inch or two on a 72 inch run changes the answer.

Measure at both the top and bottom rails if you can. Posts are not always perfectly plumb, and a run can be a quarter inch wider at one rail than the other. Use the smaller figure, which keeps the gaps under the limit at both ends of the spindle.

If a post has trim or a base block, measure from the face that the end gap will actually be against. That is where a sphere test would be done. A blank or zero opening, spindle width or gap limit stops the calculator with a request to enter that measurement, so fill in all three before reading a result.

Write each opening down with a label as you go. On a deck with several sections of slightly different length, it is easy to run the calculator for one section and build three from it. A minute with a notebook saves a run of spindles that ends with an odd gap against the last post.

How spindle width changes the count

Wider spindles take up more of the opening, so you need fewer of them. In the same 72 inch run with a 3.875 limit, spindles 1.5 inches wide need 13. Spindles 2 inches wide need 12, with gaps of 3.69 inches. Turned or square spindles 3.5 inches wide need only 10, spaced 3.36 inches apart.

Thin metal balusters go the other way. At 0.75 inches wide the same run takes 15, and the gaps open up to 3.8 inches, closer to the limit, because each spindle is giving back less width.

Enter the real width at its widest point, not the nominal size. A wood spindle sold as a 2x2 is typically 1.5 inches, which is why the default uses that figure. A turned spindle should be measured at the narrowest point that a sphere could slip past, which on some designs is the neck between turnings. If that neck is much narrower than the square ends, check the gap there separately.

Mixing widths in one run, such as a decorative wider spindle every few, breaks the equal spacing assumption. Lay out those runs by hand or treat each section between feature spindles as its own opening.

Marking out from the post

The calculator gives two spacing numbers. The exact clear gap is the air between neighbouring spindles. The on-centre pitch is that gap plus one spindle width, and it is the figure most people mark on the rail.

For the default, the first spindle's centre sits one gap plus half a spindle from the post face: 3.75 plus 0.75, so 4.5 inches. Every next centre is 5.25 inches further on. If you mark correctly, the thirteenth centre lands 4.5 inches from the far post, and the layout closes evenly.

Decimal results can be awkward on a tape. 3.75 is three and three quarters and 5.25 is five and a quarter, which are easy. The 43 inch example is not: its gaps are 3.444 inches and its pitch is 4.944 inches. Rather than chase sixty-fourths, cut a spacer block to the gap and use it between each spindle, or mark a story stick once and transfer it.

Marking every centre from the same starting post, rather than measuring each one from the last, stops small errors adding up along the run.

Fix the two end spindles first and check the remaining space before filling the middle. If the measured gap between them does not match what the calculator expects, stop and re-measure the opening rather than squeezing the difference into the last few gaps.

Short runs, long runs and stair rakes

Short openings are where the even spacing matters most visually. A 43 inch run between posts takes 8 spindles with 9 gaps of 3.44 inches. A 36 inch run takes 6, spaced at 3.86 inches. In both cases the end gaps match the middle ones, which looks tidier than a layout started at one post and finished with whatever is left.

Long runs drift towards the limit and then step back. A 108 inch opening needs 20 spindles with 21 gaps of 3.71 inches. As the run gets longer, the gap creeps up towards 3.875 until one more spindle is needed, at which point it drops back. That is why two similar lengths can end up with noticeably different gaps.

On stairs, the rail runs at an angle but the spindles stand vertical. The sphere passes between them horizontally, so the gap that matters is the level distance between neighbouring spindles. The simplest approach is to enter the horizontal distance between the posts, not the sloping rail length. If you enter the sloping length instead, the calculator spaces along the slope, the level gaps come out smaller than the figure shown, and you may use a spindle or two more than you needed.

Stairs also bring their own guard rules beyond the spindle gap, so check those with your local building office before you build.

Tightening the spacing on purpose

Some people want a denser look than the code requires, or have small children or pets and want gaps well under the limit. Lowering the maximum gap does that directly.

Setting the limit to 3.5 inches on the default 72 inch run gives 14 spindles with gaps of 3.4 inches and a pitch of 4.9 inches. That is one extra spindle per run. Over a deck with many sections, the extra spindles and the extra fixings add up, so it is worth running each section through before ordering.

Going much lower makes the run feel almost solid and adds material quickly. Somewhere between the default and an inch tighter is where most of the visual change happens.

Whatever limit you pick, the calculator still makes every gap equal. There is no option to cluster spindles or leave a wider gap at the ends.

Ordering material and what the count leaves out

The spindle count is per opening. Add up every section on the deck or stair before you order, and add a few spares for splits, knots, bent metal or bad cuts. On a default run that means 13 spindles plus spares, and for a section like the 108 inch example, 20 plus spares.

The calculator does not count fasteners, connectors or the posts themselves. It does not check the rail height, the strength of the posts, or whether a horizontal gap under the bottom rail also meets the sphere test. Those are separate checks.

It also assumes the opening is a straight line with spindles of one width. Curved rails, angled corners and panels that mix spindles with glass or cable infill need laying out differently.

Treat the result as a layout you can trust for equal gaps under your chosen limit, then confirm the rest of the guard against the rules your inspector uses.