Baluster layout for a straight run of guard from the opening limit of the International Residential Code, R312.1.3: a 4 in sphere may not pass. The edition and amendments the local jurisdiction has adopted decide, so confirm the guard height, the openings and the stair guards with the building department before you build. Structure, stair guards and rail systems are not part of the calculation.

Maintained by BuildSolver · Updated

Calculator · Construction

Baluster spacing calculator

Enter the clear span between two posts and the width of a baluster, and this page gives the number of balusters, the gap between them and the center to center spacing for a straight run of guard. The residential code does not let a 4 in sphere pass an opening, so the gap has to be under 4 in. A 60 in span with a 1.5 in baluster takes 11 balusters and a gap of 3.625 in; the count is the smallest one whose gap is under 4 in. For the footings under the posts use the concrete calculator; for the stair beside the guard, the stair stringer calculator.

  1. The distance from the face of one post to the face of the next, in inches, along the rail. A span in feet is times 12: 6 ft is 72 in.
  2. The width of one baluster at its thinnest point (a 2x2 is 1 1/2 in) and the largest gap you will accept. The code does not let a 4 in sphere pass, so 4 in is the largest target.
  3. The result gives the number of balusters, the smallest count whose gap is under the target, the gap itself and the center to center spacing.
  4. The first baluster center is the gap plus half the baluster width from the face of the post, and then every center to center spacing. Check the gap beside each post and under the bottom rail.

Balusters, gap and center to center spacing on a straight, level run between posts, under the 4 in sphere rule of IRC R312.1.3. No stair guards, structure or rail systems.

The clear distance from the face of one post to the face of the next, along the rail, in inches. Measure it on the posts as set, not center to center. Feet times 12: 6 ft is 72 in and 8 ft is 96 in. The page lays out spans from 6 in to 240 in.

The width of one baluster across the opening, in inches. A 2x2 baluster is 1 1/2 in (1.5), not 2 in; a 1x1 metal baluster is 3/4 in (0.75) to 1 in. On a turned or tapered baluster enter its thinnest point, where the opening is largest.

The gap you want to stay under, in inches. IRC R312.1.3 does not let a 4 in sphere pass, so 4 is the largest the page accepts and the gap it returns is strictly under it. Enter 3.5 or 3.75 for a tighter layout with margin.

Example result for the default inputs

Span 60 in, baluster 1.5 in wide, target gap under 4 in.

Balusters

11 balusters

Gap between

3.625 in

Center to center

5.125 in

Openings

12 gaps

Calculation details
Opening limit, R312.1.3A 4 in sphere must not pass, so the gap must be strictly under 4 in. Target here: under 4 in
Balustersfloor((60 - 4) / (1.5 + 4)) + 1 = floor(10.182) + 1 = 11. A whole-number quotient still adds one, because that gap would be exactly 4 in
Gap between balusters and posts(60 - 11 x 1.5) / 12 = 3.625 in, in each of the 12 openings, the two at the posts included
Center to center3.625 + 1.5 = 5.125 in, about 5 1/8 in to the nearest 1/16; build to the decimal
Layout from the face of the postFirst baluster center at 4.375 in, then every 5.125 in; the last center is 4.375 in from the other post
One baluster fewer10 balusters would give a gap of 4.091 in, which is not under 4 in
Check against the limit3.625 in is under the 4 in sphere limit
Not worked here, R312.1Guard where the drop is more than 30 in (R312.1.1); height 36 in minimum (R312.1.2); the opening between the bottom rail and the walking surface must also stop a 4 in sphere; a stair guard has its own openings (6 in triangle, 4 3/8 in sides) and a 34 in height
  • Enter the clear span, face of post to face of post, and the width of the baluster at its thinnest point: on a turned or tapered baluster the largest opening is where it is narrowest. The layout assumes equal spacing across a straight, level run.
  • This is the gap on a straight, level run between posts. The sloped guard of a stair has its own opening limits and height, which are not worked here. The IRC text is read from reprints, so check the edition and the amendments your jurisdiction has adopted; local amendments differ, and some ban horizontal rails that can be climbed.
  • This page lays out the balusters and checks no structure, so the guard load (R301.5), post size and spacing, rail size and fasteners are not checked. The adopted code and the authority having jurisdiction decide.

For estimation purposes only. Consult a licensed engineer for final designs.

Get this result as a PDF, free account

Sign up with your email. Back on this page in the same browser, your inputs are filled in. No card.

Lay out the stair stringer

Free without signup

How the number of balusters is found

The page works from the clear span between two posts, the width of one baluster and the largest gap you will accept. A gap sits on each side of every baluster, the two beside the posts included, so n balusters make n + 1 equal gaps. The page finds the smallest whole number of balusters that keeps the gap under the target, and then the real gap and the spacing that result.

Gap for n balusters
gap = (L - n x w) / (n + 1)L is the clear span and w the baluster width. For 60 in, 11 balusters of 1.5 in leave 43.50 in, shared by 12 gaps: 3.625 in each.
Balusters needed
n = floor((L - g) / (w + g)) + 1g is the target gap, 4 in at most. This is the smallest whole n whose gap is strictly under g. For 60 in: (60 - 4) / (1.5 + 4) = 10.18, so floor(10.18) + 1 = 11 balusters. A whole-number quotient gets the same + 1: at 59 in it is exactly 10, and the count is 11, not 10.
A whole-number quotient still adds one
gap < g, never gap = gA sphere 4 in across passes an opening of exactly 4 in, so a gap of 4 in does not meet the rule. At 59 in the quotient is exactly 10, 10 balusters would leave a gap of 4.000 in, and the page gives 11. At 48 in it is exactly 8 and the page gives 9.
Center to center
on center = gap + w3.625 + 1.5 = 5.125 in, about 5 1/8 in. Build to the decimal and use the fraction only as a reading on the tape.
First baluster from the post
first center = gap + w / 2The center of the first baluster is 4.375 in from the face of the post, then every 5.125 in. The last one is 4.375 in from the other post.
Check against one baluster fewer
gap(n - 1) is not under gWith 10 balusters in 60 in the gap is 4.091 in, over the limit, which is why 11 is the count. A thinner baluster needs more: 0.75 in balusters on 60 in take 12, a gap of 3.923 in.

Six spans with a 1 1/2 in baluster

Each row is one rail section with a gap under 4 in, worked with the same function as the form. A 36 in (3 ft) span takes 6 balusters, and a 96 in (8 ft) span takes 17. The 48 in row is a whole-number case: eight balusters would leave a gap of exactly 4 in, which a 4 in sphere passes, so the count is nine.

Balusters, gap and center to center spacing for six spans
Clear spanBalusterBalustersGap, inCenter to center, inGap with one fewer, in
36 in (3 ft)1 1/2 in baluster63.8575.3574.750
48 in (4 ft)1 1/2 in baluster93.4504.9504.000
60 in (5 ft)1 1/2 in baluster113.6255.1254.091
72 in (6 ft)1 1/2 in baluster133.7505.2504.154
84 in (7 ft)1 1/2 in baluster153.8445.3444.200
96 in (8 ft)1 1/2 in baluster173.9175.4174.235

The last column is the gap you would get by rounding the count down: it is never under 4 in, which is why each count is the smallest that works. For the 60 in span the gap with 10 balusters is 4.091 in against 3.625 in with 11.

Standards and data sources

  • Stairbuilders and Manufacturers Association, R312.1.3 Opening limitations (2018 IRC) - The opening rule this page is built on: 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, with the 6 in triangular opening and the 4 3/8 in stair-side exceptions. A guide to the 2018 text; the ICC pages do not open for automated readers, so the wording is a reading, not the official page.
  • Haysville, Kansas, Chapter 4 Article 3 (2018 IRC adopted with amendments) - A second reading of R312.1.3 in an adopting ordinance: guards with intermediate rails or ornamental closures that do not allow passage of a sphere 4 inches in diameter, the 6 in triangular exception, and local amendments that ban a ladder effect from horizontal rails and set the stair-side opening back to 4 in. It also shows a handrail height amended to 32 to 38 in, so local text differs from the model code.
  • Washington State Building Code Council, WAC 51-51-0312 (R312 Guards) - Guard height and where a guard is required: 36 inches minimum (R312.1.2), 34 in on the open side of a stair measured from the nosing line, 34 to 38 in where the guard top is also the handrail, and a guard where the drop is more than 30 in (R312.1.1). This is Washington's adopted text with its own amendments, not a copy of the model code.
  • Princeton, Minnesota, deck handout (MNSPECT, Minnesota Residential Code R312) - A building department reading of the same limits for a deck: 36 in guard height, a 4 in sphere not passing any opening, a 6 in sphere not passing the triangle at a stair, and 4 3/8 in at the open side of a stair. Read in the PDF.
  • Otsego County, Michigan, Building Department, handout for landings, stairways, handrails and guards (2015 Michigan Residential Code) - A second building department handout, read in the PDF: R312.1.3 with the 4 in sphere and the 6 in and 4 3/8 in stair exceptions, the 36 in guard height (R312.1.2), a guard where the drop is more than 30 in (R312.1.1), and a stair handrail height of 34 to 38 in (R311.7.8.1), which is not computed on this page.
  • BuildRefs, baluster spacing and the 4 in sphere rule - A secondary page for the arithmetic: n balusters make n + 1 gaps, the gap is (L - n w) / (n + 1), and the count is n >= (L - 4) / (w + 4) rounded up, which gives the same count except at a whole-number quotient, where it gives one fewer and a gap of exactly 4 in. Its worked example, 60 in of span with a 1 1/2 in baluster, 11 balusters and a gap of about 3.63 in, is this page's default. It paraphrases the code and does not quote it.

Limitations of this calculator

  • This page lays out the balusters of a straight, level run of guard between two posts from the span, the baluster width and a target gap. It is a planning aid for a quote, a cut list or a first layout, not a design. The edition adopted and the amendments of your jurisdiction decide, and the building department decides whether a given guard passes. Check with them before you build.
  • The 4 in rule is IRC R312.1.3, read in guides, an adopting ordinance and building department handouts, because the ICC text pages do not open for automated readers. The wording was read in the 2015 and 2018 forms; the 2021 and 2024 editions were not read in the ICC text. Local amendments exist, such as a ban on horizontal rails that make a ladder. Check the text your jurisdiction has adopted.
  • A sphere 4 in across passes an opening of exactly 4 in, so the page treats the rule as a gap strictly under 4 in and never returns a gap of 4 in. A target above 4 in is refused. The gap it returns is under the target you enter, and a gap within 1/16 in of 4 in gets a warning, because a small error in the posts or the balusters takes it over.
  • The page works a straight, level run only. The sloped guard on the open side of a stair has its own openings, a 6 in sphere for the triangle formed by the riser, tread and bottom rail and 4 3/8 in along the treads, and its own height, 34 in from the nosing line. None of that is worked here, and the gap measured on a slope is not the gap along the rail. Lay a stair guard out from the code and the drawings.
  • The opening from the walking surface up to the bottom rail also has to stop a 4 in sphere, as does the opening above the top of any bottom rail up to the guard height. The page sets the gaps between balusters only and lists these as a reminder. It does not work guard height (36 in minimum for a deck guard in the text read), where a guard is required (a drop of more than 30 in), handrails or the openings at a post.
  • This is layout, not structure. The guard load of IRC R301.5, the size and spacing of posts, the rail, the fasteners and the post connections to the deck are not checked, and no baluster size or material is recommended. Cable, horizontal bar and glass systems, balusters that are not evenly spaced and curved or angled runs are not covered.
  • Values outside the field ranges are not accepted: span 0 to 1,000 in, baluster width 0 to 100 in and target gap 0 to 100 in. A span under 6 in or over 240 in, a width under 1/4 in or over 12 in, a baluster as wide as the span, a target under 1/2 in and a target over 4 in are refused with a sentence. The 6 in, 240 in, 1/4 in, 12 in and 1/2 in limits are this page's, not the code's. A baluster so wide that the count leaves no room for a gap is refused, with the numbers.
  • Measure the clear span on site, post face to face, and the baluster at its thinnest point. The count follows from both: a 1/2 in error in a span near a whole-number quotient can add or drop a baluster, so check the span again before you cut.

Common mistakes when spacing balusters

  1. Rounding the count down. (60 - 4) / (1.5 + 4) = 10.18. Rounding down gives 10 balusters and a gap of 4.091 in, which a 4 in sphere passes. Round up: 11 balusters and 3.625 in.
  2. Treating a 4 in gap as passing. The rule is that a 4 in sphere does not pass, and a 4 in opening lets it through. At 59 in of span with a 1.5 in baluster, 10 balusters leave exactly 4.000 in. The page gives 11, with a gap of 3.542 in. A 48 in span does the same at 9 balusters instead of 8.
  3. Using the nominal size of the baluster. A 2x2 is 1.5 in wide, not 2 in. Worked with 2 in, a 60 in span gives 10 balusters; built with the real 1.5 in balusters the gap is 4.091 in, over 4 in. Measure the baluster you buy.
  4. Measuring the posts center to center. Posts 62 in center to center, 3.5 in wide, leave a clear span of 58.5 in. Worked with 62 in the page gives 11 balusters; the clear span of 58.5 in needs 10, with a gap of 3.955 in. The rule is applied to the opening, so use the clear span.
  5. Dividing by the wrong number of gaps. With 11 balusters in 60 in, 43.50 in is left. A gap sits on each side of every baluster, so there are 12, not 11 or 10: 43.50 / 12 = 3.625 in. Dividing by 11 gives 3.955 in and by 10 gives 4.350 in, and the marks come out wrong.
  6. Using a straight-run layout on a stair. The openings on the open side of a stair follow the slope of the stair and have their own limits: a 6 in sphere for the triangle formed by the riser, tread and bottom rail, and 4 3/8 in along the treads in the text read. The straight-run count on this page does not carry over to a raking guard. Check the stair guard against the code.

Common questions about baluster spacing

What is the maximum spacing between deck balusters?

The residential code, IRC R312.1.3, does not let a sphere 4 in across pass any opening in a guard from the walking surface to the guard height. A 4 in sphere passes an opening of exactly 4 in, so the gap between balusters has to be under 4 in, not 4 in or less. For 60 in of clear span and 1.5 in balusters that is 11 balusters with a gap of 3.625 in. The jurisdiction's adopted edition and amendments decide.

How many balusters do I need for a 6 ft or an 8 ft rail section?

With 1 1/2 in (2x2) balusters and a gap under 4 in, 72 in (6 ft) of clear span takes 13 balusters, a gap of 3.750 in; 96 in (8 ft) takes 17, a gap of 3.917 in; 36 in takes 6. The span is the clear distance between the posts, not center to center.

What is the formula for baluster spacing?

n balusters make n + 1 gaps, so gap = (L - n x w) / (n + 1), with L the clear span and w the baluster width. The smallest n with a gap under g is n = floor((L - g) / (w + g)) + 1, floor of the quotient plus one, so a whole-number quotient of 10 also gives 11. For L = 60, w = 1.5 and g = 4 that is floor(10.18) + 1 = 11. The center to center spacing is the gap plus the baluster width.

Is a 4 in gap allowed?

No. The rule is that a 4 in sphere does not pass, and it passes a 4 in opening. This page returns a gap strictly under the target you enter, which is 4 in at most. At 59 in of span with 1.5 in balusters, 10 balusters would leave exactly 4.000 in, so the count is 11 and the gap 3.542 in.

How do I lay out the balusters on a rail?

Find the count and the gap, then mark the center of the first baluster at the gap plus half the baluster width from the post, and every gap plus baluster width after that. For 60 in with 1.5 in balusters the first center is 4.375 in from the face of the post and the spacing is 5.125 in, about 5 1/8 in. Dry-fit the first and last, and check the gap beside each post.

Does the gap at the bottom of the rail count too?

Yes. The opening limit runs from the walking surface to the required guard height, so the space between the deck and the bottom rail has to stop a 4 in sphere as well. This page sets the gaps between balusters only. Check the bottom clearance and the openings at the posts on the drawings.

Are stair baluster spacings different?

In the text read, yes. The triangular opening formed by the riser, tread and bottom rail of a stair guard may not pass a 6 in sphere, and the openings along the open side of a stair 4 3/8 in, with a stair guard 34 in high from the nosing line. Some local amendments set the stair-side opening back to 4 in. This page works a straight, level run only, so lay out a stair guard from the code.

How high does the guard have to be?

In the text read, a guard is 36 in high at least, measured from the walking surface, and a guard is required where the drop is more than 30 in. A stair guard may be 34 in, and a guard top that is also the handrail is 34 to 38 in. Local amendments change these numbers (one ordinance read for this page amends the handrail height), so check the edition adopted locally. Height is not computed on this page.

Used on the same job