---
title: "Baluster spacing calculator: even gap and marks to print"
description: "Baluster spacing calculator: type the rail as your tape reads it, get the number of balusters, the even gap, the on-center and every mark to print."
canonical: https://klmlabs.app/construction-calculator/baluster-spacing-calculator/
updated: 2026-11-18
---

# Baluster spacing calculator

Type the rail between the posts, the baluster width and the biggest gap you will allow. A 9' 4-1/2" rail with 1-1/2" balusters and a 4" limit takes 20 balusters, 3-15/16" apart, 5-7/16" on center, and every mark from the left post is in the list below.

The tool on this page runs in your browser; nothing you type is sent anywhere unless you ask for the result by email: https://klmlabs.app/construction-calculator/baluster-spacing-calculator/

## The layout list for a 9' 4-1/2" rail, 1-1/2" balusters and a 4" limit (marks from the left post)

| No. | Left edge | Center | Right edge |
|---|---|---|---|
| 1 | 3-15/16" | 4-11/16" | 5-7/16" |
| 2 | 9-3/8" | 10-1/8" | 10-7/8" |
| 3 | 1' 2-13/16" | 1' 3-9/16" | 1' 4-5/16" |
| 4 | 1' 8-3/16" | 1' 8-15/16" | 1' 9-11/16" |
| 5 | 2' 1-5/8" | 2' 2-3/8" | 2' 3-1/8" |
| 6 | 2' 7-1/16" | 2' 7-13/16" | 2' 8-9/16" |
| 7 | 3' 0-1/2" | 3' 1-1/4" | 3' 2" |
| 8 | 3' 5-15/16" | 3' 6-11/16" | 3' 7-7/16" |
| 9 | 3' 11-3/8" | 4' 0-1/8" | 4' 0-7/8" |
| 10 | 4' 4-13/16" | 4' 5-9/16" | 4' 6-5/16" |
| 11 | 4' 10-3/16" | 4' 10-15/16" | 4' 11-11/16" |
| 12 | 5' 3-5/8" | 5' 4-3/8" | 5' 5-1/8" |
| 13 | 5' 9-1/16" | 5' 9-13/16" | 5' 10-9/16" |
| 14 | 6' 2-1/2" | 6' 3-1/4" | 6' 4" |
| 15 | 6' 7-15/16" | 6' 8-11/16" | 6' 9-7/16" |
| 16 | 7' 1-3/8" | 7' 2-1/8" | 7' 2-7/8" |
| 17 | 7' 6-13/16" | 7' 7-9/16" | 7' 8-5/16" |
| 18 | 8' 0-3/16" | 8' 0-15/16" | 8' 1-11/16" |
| 19 | 8' 5-5/8" | 8' 6-3/8" | 8' 7-1/8" |
| 20 | 8' 11-1/16" | 8' 11-13/16" | 9' 0-9/16" |
| Post | right post at 9' 4-1/2" |  |  |

## How do I work out the number of balusters and the even gap?

Three numbers go in: the rail length between the posts, the width of one baluster and the biggest gap you will allow. Four come out.

1. **Balusters, N** = (rail − biggest gap) ÷ (baluster width + biggest gap), rounded up. Round up, never down: rounding down leaves a gap wider than your limit.
2. **Even gap** = (rail − N × baluster width) ÷ (N + 1). N balusters leave N + 1 gaps, because the gap next to each post counts.
3. **On-center spacing** = even gap + baluster width. It is the distance from the middle of one baluster to the middle of the next.
4. **First baluster** = the even gap from the post to its edge, or the even gap plus half the baluster width to its center.

Rail length is post to post, inside face to inside face: that is the opening the balusters fill. The calculator rounds only what it shows, to the nearest 1/16", and it works every mark out exactly first, so the rounding does not add up along the rail.

## A worked example: a 9' 4-1/2" rail

The rail is 9' 4-1/2", which is 112-1/2" or 112.5". The balusters are 1-1/2" wide and the biggest gap is 4".

| Step | The sum | Result |
|---|---|---|
| Balusters | (112.5 − 4) ÷ (1.5 + 4) = 108.5 ÷ 5.5 = 19.73, rounded up | 20 |
| Even gap | (112.5 − 20 × 1.5) ÷ 21 = 82.5 ÷ 21 = 3.9286" | 3-15/16" |
| On center | 3.9286 + 1.5 = 5.4286" | 5-7/16" |
| First baluster | edge at 3-15/16" from the post; center at 3.9286 + 0.75 = 4.6786" | 4-11/16" |

Check it by adding up: 20 × 1.5" of balusters + 21 × 3.9286" of gaps = 30" + 82.5" = 112.5". The gaps and the balusters fill the rail exactly, and every gap is under 4".

The list in the calculator above carries this example: the first baluster centers at 4-11/16", the second at 10-1/8" and the third at 1' 3-9/16". Replace the numbers with yours and the list follows.

## The layout list: every mark from the left post

The table under the calculator gives the **left edge**, the **center** and the **right edge** of every baluster, measured from the inside face of the left post. Hook the tape on the post and mark the center of each baluster, or the left edge if you set a spacer block against it. The right post sits at the rail length, so the last gap closes on it. Check that last mark against the post before you fasten anything: if the post is 1/8" out, the rail you measured was.

The full list is on the page already. If you want it on paper at the rail, press **Email me the layout sheet (PDF)** and it comes to your inbox as one US Letter page with your rail, your answer, the marks and the sums; or press **Print the layout** and your browser prints the same list.

## The rule behind "4 inches"

The 4" is not a rule of thumb. In the 2021 International Residential Code ([as Colorado adopted it](https://up.codes/viewer/colorado/irc-2021/chapter/3/building-planning)) it is R312.1.3, Opening Limitations: required guards shall not have openings, from the walking surface up to the required guard height, that allow passage of a sphere 4 inches in diameter. The test is a sphere, so it is the clear opening you measure, not the on-center spacing. The "gap" in this calculator is the clear space between two balusters, or between a baluster and a post.

Three more things the same section says:

- **The triangle at the tread.** On a stair, the triangular opening formed by the riser, the tread and the bottom rail of the guard may not pass a 6" sphere (exception 1).
- **The open side of a stair.** Guards on the open side of stairs may not have openings that pass a 4-3/8" sphere (exception 2). So a stair is a different number from a deck.
- **Height.** Required guards are at least 36" high, measured above the walking surface or the line through the nosings (R312.1.2). On the open side of a stair the minimum is 34", measured from the nosing line.

And the limits of what this page can tell you: that is the model code, read in the 2021 edition as Colorado adopted it, and the [2024 Residential Code of New York State](https://up.codes/viewer/new_york/irc-2024/chapter/3/building-planning) repeats it as R321.1.3. States and towns adopt different editions and amend them, so **your local code decides**. The calculator starts at 4" because that is the model code's number. If your inspector gives you another, type it in the third box. If you type more than 4", the calculator warns you.

## Deck, stair or interior?

The code text above does not split decks from interior rails: it speaks of "required guards" at open-sided walking surfaces, "including floors, stairs, ramps and landings" (R312.1.1), where the drop is more than 30" within 36" of the edge. So the 4" sphere applies to a deck guard and to an interior balcony or landing guard the same way. The stair has its own two numbers, 4-3/8" and 6".

The calculator lays out a **level run**: a deck rail, a landing, a balcony. For a stair rail, [Angi](https://www.angi.com/articles/baluster-calculator.htm) says to measure the horizontal projection of the rail, not the diagonal length. That fits how balusters stand: they hang plumb, so the clear opening a sphere meets is the level distance between them. Type the horizontal projection as the rail, then mark the posts and the balusters plumb. We have not built a stair mode, so check each finished opening against the stair numbers above before you fasten. The stair's own rise and run are on the [stair calculator](https://klmlabs.app/construction-calculator/stair-calculator/).

## What do the other calculators leave out?

We read today's results on 2026-11-18. [Decks.com](https://www.decks.com/calculators/baluster-spacing-calculator/) takes the baluster width and the space in 1/8" steps from a list, handles several sections and a staircase section, and says the same 4" figure; it gives the spacing and the center points, but not a sheet to print or the code section. [Angi](https://www.angi.com/articles/baluster-calculator.htm) gives a table that counts 16 balusters for a 5' rail at 4", with 2" end spacing and no baluster width in the sum; with 1-1/2" balusters and a 4" gap, the same rail needs 11, and the table's 16 would put the gaps near 2". h3apps.com is the page for an app, with no calculator on it. The top result is a Reddit thread. None of them lists the marks to 1/16" from a tape reading and prints them, and none sets the stair numbers beside the 4" rule.

## Do it on your phone with the calculator app

The same sums run in Fraction Feet Inch Calculator, and the app does not have a baluster tool: the page does the baluster arithmetic, the app does the feet-inches-fractions arithmetic. Type the lines for the worked rail:

```
112-1/2" - 20 x 1-1/2"
÷ 21
```

The first line is the rail less the balusters, 82-1/2"; the second divides by the 21 gaps. The app adds, subtracts, multiplies and divides feet, inches and fractions exactly and answers to the nearest 1/16", so you get the even gap as a fraction at the rail with no signal needed: it works offline and keeps the history of every answer. Add the baluster width to the gap to get the on-center spacing.

## People also ask

### What is the recommended spacing for deck railing balusters?

No more than 4" between them, as the clear opening: that is the sphere test in the model code (IRC 2021 R312.1.3), and [Decks.com](https://www.decks.com/calculators/baluster-spacing-calculator/) says the same. On center that is about 5-1/2" for 1-1/2" balusters. Your local code decides.

### How do I calculate stair spindles?

Use the same four steps on the stair rail's horizontal projection, then check the finished openings: 4-3/8" at the open side of the stair and 6" at the triangle by the tread (R312.1.3, exceptions 2 and 1). The calculator above does the level-run arithmetic.

### What is the code for stair baluster spacing?

In the 2021 IRC, guards on the open side of stairs may not have openings that pass a 4-3/8" sphere, the triangle at the tread and bottom rail may not pass a 6" sphere, and the guard is at least 34" high from the nosing line (R312.1.3 and R312.1.2). Local codes amend this.

### How do I figure out the spacing between boards?

Subtract the boards' total width from the opening and divide by one more than the number of boards: (opening − boards × board width) ÷ (boards + 1). It is the same even-gap sum as step 2 above, and works for slats and pickets too.

## Work out your own with Fraction Feet Inch Calculator

- Add, subtract, multiply and divide feet, inches and fractions exactly
- Answers to the nearest 1/16", or any step from 1/2" to 1/64"
- The history keeps every answer
- Works offline, with no account to sign up for

Download Fraction Feet Inch Calculator on the App Store: https://apps.apple.com/us/app/fraction-feet-inch-calculator/id6816445977

iPhone and iPad, iOS 17.0 or later. All the facts: https://klmlabs.app/construction-calculator/

## The facts this page states, with sources

As KLM Labs' fact record words them; the page may put them in its own words. Fraction Feet Inch Calculator's facts page: https://klmlabs.app/construction-calculator/

- Add, subtract, multiply and divide feet, inches and fractions exactly, like 5' 7-3/8". (Source: [Apple's app lookup](https://itunes.apple.com/lookup?id=6816445977&country=us).)
- Answers to the nearest 1/16", or any step from 1/2" to 1/64". (Source: the app's source code (private).)
- The history keeps every answer: tap one to reuse it, or copy and share it. (Source: [Apple's app lookup](https://itunes.apple.com/lookup?id=6816445977&country=us).)
- Works offline. (Source: [Apple's app lookup](https://itunes.apple.com/lookup?id=6816445977&country=us).)
- No account or sign-up. (Source: [Apple's app lookup](https://itunes.apple.com/lookup?id=6816445977&country=us).)
- IRC 2021 R312.1.3 Opening Limitations: required guards shall not have openings from the walking surface to the required guard height that allow passage of a sphere 4 inches (102 mm) in diameter. Exceptions: 1. the triangular openings at the open side of stair, formed by the riser, tread and bottom rail of a guard, shall not allow passage of a sphere 6 inches (153 mm) in diameter; 2. guards on the open side of stairs shall not have openings that allow passage of a sphere 4-3/8 inches (111 mm) in diameter. (Source: https://up.codes/viewer/colorado/irc-2021/chapter/3/building-planning (the 2021 IRC as adopted in Colorado without amendments; read 2026-11-18).)
- IRC 2021 R312.1.2 Height: required guards at open-sided walking surfaces, including stairs, porches, balconies or landings, shall be not less than 36 inches (914 mm) in height measured vertically above the adjacent walking surface or the line connecting the nosings. Exception 1: guards on the open sides of stairs shall be not less than 34 inches (864 mm) measured vertically from a line connecting the nosings. (Source: https://up.codes/viewer/colorado/irc-2021/chapter/3/building-planning (read 2026-11-18).)
- R312.1.1 Where required: guards are required on open-sided walking surfaces more than 30 inches (762 mm) measured vertically to the floor or grade below at any point within 36 inches (914 mm) horizontally of the edge. (Source: https://up.codes/viewer/colorado/irc-2021/chapter/3/building-planning (read 2026-11-18).)
- The Residential Code of New York State (the 2024 IRC with amendments) carries the same opening rule as R321.1.3: 4 inches, with the same 6 inch triangle and 4-3/8 inch stair exceptions, so the section number changes from state to state. (Source: https://up.codes/viewer/new_york/irc-2024/chapter/3/building-planning (read 2026-11-17).)
- Decks.com: U.S. building codes mandate that balusters have no more than a 4-inch gap between them; its rule of thumb is three balusters for every foot of railing; its calculator takes widths and spaces in 1/8 inch steps and has a staircase section. (Source: https://www.decks.com/calculators/baluster-spacing-calculator/ (Decks.com, Deck Baluster Spacing Calculator; read 2026-11-18).)
- Angi: for a stair railing, measure the horizontal projection instead of the diagonal length; its cheat sheet counts 16 balusters for a 5 ft rail at 4 inches, with 2 inch end spacing and no baluster width in the sum. (Source: https://www.angi.com/articles/baluster-calculator.htm (Angi, Baluster Calculator: How Many Balusters Do I Need?; read 2026-11-18).)

## More construction charts and guides

- [Stair calculator: risers, treads, stringer and the code check](https://klmlabs.app/construction-calculator/stair-calculator/): Type your total rise: the risers, the riser height, the treads, the run, the stair angle and the stringer length, with the 2021 IRC check.
- [Stair riser height code: 7-3/4" max riser, 10" min tread](https://klmlabs.app/construction-calculator/stair-rise-and-run/): Stair riser height code: 7-3/4" max riser, 10" min tread (IRC). IRC 2024, New York and IBC limits in one table, the 7-11 rule, stair layouts. Free PDF.
- [Feet inch calculator: add, subtract, multiply and divide](https://klmlabs.app/construction-calculator/feet-and-inches-calculator/): Add, subtract, multiply or divide feet and inches, answer exact and still a fraction, with the working. 12' 6" divided by 3 is 4' 2".
- [Board foot calculator: how to calculate board feet](https://klmlabs.app/construction-calculator/board-feet/): Board foot calculator for lumber: type the size, the length and how many boards, keep a board list to print, and read the chart for 1x4 to 6x6.
- [Fraction to decimal chart: inches, millimeters and feet](https://klmlabs.app/construction-calculator/fraction-decimal-inch-chart/): A fraction to decimal chart for every 64th of an inch, with millimeters and decimal feet, plus inches to decimal feet. Free printable PDF, US Letter.
- [Decimal to inches: the tape mark, in feet and inches](https://klmlabs.app/construction-calculator/decimal-to-inches/): 13.375 in = 13-3/8 in. An eighths lookup for any N.375, plus a converter: type a decimal or paste a cut list for the 1/16" tape mark and feet and inches.
- [Cubic yard calculator: find cubic yards from feet, inches and fractions](https://klmlabs.app/construction-calculator/cubic-yard-calculator/): Add every slab, pad or bed in feet and inches. Get cubic yards, bags or tons to order, with waste, and print the list.
- [Roof pitch calculator: pitch, angle and rafter cuts](https://klmlabs.app/construction-calculator/roof-pitch-chart/): Type rise and run in feet and inches: pitch, angle and rafter length to 1/16", with the birdsmouth drawn. Print the cut card. Chart 1/12 to 24/12.
- [Concrete calculator for slab: bags, yards and an order sheet](https://klmlabs.app/construction-calculator/concrete-bags-per-yard/): Concrete calculator for a slab: type the length, the width and the depth, and get the cubic yards, the bags of 80, 60 or 40 lb and a printable order sheet.
- [Square footage calculator for feet, inches and fractions](https://klmlabs.app/construction-calculator/square-feet-from-feet-and-inches/): Type each room as your tape reads it, like 12' 6-1/2". Get one total in square feet, yards and meters, and keep a room list to print or share.
- [Crown molding angles chart: miter and bevel settings](https://klmlabs.app/construction-calculator/crown-molding-angles/): Miter and bevel for 52/38, 45/45 and 38/52 crown molding or moulding, corners 60° to 150°, cut flat on a compound saw. Printable one-page PDF chart.
- [How many feet and inches: the chart and the converter](https://klmlabs.app/construction-calculator/inches-to-feet/): Type inches and read them as feet and inches: 75 3/8 is 6' 3-3/8". Type 5' 4" and it gives 64 inches. A chart of every inch to 12 feet, as a PDF.
- [How to read a tape measure: every mark, with a cheat sheet](https://klmlabs.app/construction-calculator/how-to-read-a-tape-measure/): How to read a tape measure: all 16 marks in an inch named, 32nds, metric, the red 16" marks and diamonds. Free cheat sheet and practice sheet.
- [mm to inches and cm to inches: the tape mark for a metric length](https://klmlabs.app/construction-calculator/mm-to-inches/): 10 mm is 3/8", 16 mm is 5/8", 25 mm is 1" on a tape. Tables from 0.005 mm to 1000 mm in inches, with the nearest 1/16" mark, long or short. Cm too.
- [cm to feet and inches](https://klmlabs.app/construction-calculator/cm-to-feet-and-inches/): cm to feet and inches: type 182 or 1.82 m, get 5' 11-5/8" on the tape, the total inches, the decimal feet and the sum, plus a chart and a list to print.
- [Gravel calculator](https://klmlabs.app/construction-calculator/gravel-calculator/): Gravel calculator: type length, width and depth as your tape reads them, pick the stone, and get cubic yards and tons with the sum and an order sheet.
- [Drywall calculator](https://klmlabs.app/construction-calculator/drywall-calculator/): Drywall calculator: type the room as your tape reads it. See the same room for 4x8, 4x10 and 4x12 sheets, with offcut, butt joints and a list to print.
- [Deck board calculator](https://klmlabs.app/construction-calculator/deck-board-calculator/): Deck board calculator in feet and inches: the rows across your deck, the ripped last board, cuts with joints on the joists, and the boards to buy.
- [Mulch calculator](https://klmlabs.app/construction-calculator/mulch-calculator/): Mulch calculator: type beds as your tape reads them, round beds too, and the depth. Get cubic yards, 2 and 3 cu ft bags, and the depth for your mulch.
- [Rebar calculator](https://klmlabs.app/construction-calculator/rebar-calculator/): Rebar calculator for a slab in feet and inches: bars each way, the cut plan from 20 ft bars with laps and offcuts, weight per foot, ties, a list to print.
- [Tile calculator](https://klmlabs.app/construction-calculator/tile-calculator/): Tile calculator for a room in feet and inches: tiles across and down, the cut tile at each wall, a sliver warning, waste, boxes and a list to print.
- [Rafter calculator](https://klmlabs.app/construction-calculator/rafter-calculator/): Rafter calculator: span as your tape reads it plus pitch gives rafter length to 1/16", plumb and level cut angles, rafter count and the board to buy.
- [Fence calculator](https://klmlabs.app/construction-calculator/fence-calculator/): Fence calculator in feet and inches: posts that divide each run into equal bays, rails and the boards to buy, pickets, and concrete bags per post.
- [Linear feet calculator](https://klmlabs.app/construction-calculator/linear-feet-calculator/): Linear feet calculator: add pieces as your tape reads them, take off doors, add waste, convert sq ft and board feet, count boards, price the run.

All 25 construction charts: https://klmlabs.app/construction-calculator/guides/

## Sources

1. [UpCodes: 2021 IRC Chapter 3, R312.1 Guards (height R312.1.2, opening limitations R312.1.3), as adopted in Colorado](https://up.codes/viewer/colorado/irc-2021/chapter/3/building-planning)
2. [UpCodes: Residential Code of New York State, Chapter 3 (the same rule as R321.1.3)](https://up.codes/viewer/new_york/irc-2024/chapter/3/building-planning)
3. [International Code Council: 2021 IRC, Chapter 3, Building Planning (the official text)](https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning)
4. [Decks.com: Deck Baluster Spacing Calculator (the 4-inch gap, three balusters a foot)](https://www.decks.com/calculators/baluster-spacing-calculator/)
5. [Angi: Baluster Calculator (measuring a stair rail by its horizontal projection)](https://www.angi.com/articles/baluster-calculator.htm)
6. [Fraction Feet Inch Calculator on the App Store](https://apps.apple.com/us/app/fraction-feet-inch-calculator/id6816445977)

Last updated November 18, 2026.
