Handrail Picket Calculator: Spacing & Count
- On-center spacing
- in
- Result
- Rail length
- 120 in
- You entered
- Picket width
- 2 in
- You entered
This handrail picket calculator works out how many pickets (balusters) you need for a handrail section and the exact spacing between them. You enter the total rail length, the picket width, and your desired maximum gap, and it returns the number of pickets and the precise on-center spacing. The result is given in inches or millimeters, depending on your input.
Formula
The calculator uses two standard equations from building and railing design:
- Number of pickets = ⌈(L + W) / (W + G)⌉
- On-center spacing = (L − N × W) / (N + 1)
Where:
- L = total rail length (in inches or mm, same unit throughout)
- W = width of one picket (same unit as L)
- G = maximum allowable gap between pickets (same unit)
- N = number of pickets (rounded up to the nearest whole number)
The on-center spacing is the distance from the center of one picket to the center of the next. The clear gap (the space you can actually see through) is equal to the on-center spacing minus the picket width. Most building codes specify a maximum clear gap (often 4 inches), so you should check that your calculated clear gap does not exceed your local requirement.
Worked Example
Using the default values: rail length = 120 in, picket width = 2 in, max gap = 4 in.
- Calculate the numerator: 120 + 2 = 122
- Calculate the denominator: 2 + 4 = 6
- Divide: 122 / 6 = 20.333…
- Round up to the nearest whole number: N = 21 pickets
- Now compute the on-center spacing: (120 − 21 × 2) / (21 + 1) = (120 − 42) / 22 = 78 / 22 = 3.545… inches
- Round to two decimals: 3.55 inches on-center
The clear gap is 3.55 − 2 = 1.55 inches, which is well under the 4-inch maximum. The calculator shows 21 pickets and 3.55 inches on-center.
Why Use a Picket Calculator?
Handrail picket spacing is not just a cosmetic choice—it is a safety issue, especially on decks, stairs, and balconies. Building codes in many regions require that the space between balusters be small enough that a child’s head cannot get stuck. The most common rule is a 4-inch maximum clear gap, but some jurisdictions use 4.375 inches or other values. A calculator helps you:
- Determine exactly how many pickets to buy, avoiding waste and extra trips to the store.
- Ensure even spacing so the railing looks professional and uniform.
- Check that your design meets the relevant code before you cut.
Without a calculator, people often end up with too few pickets (creating a code violation) or too many (wasting material). The formula also works for fence pickets, stair balusters, and even decorative screen panels.
How to Measure and Use the Calculator
To get accurate results, measure carefully:
- Measure the total length of the rail between the posts (or between the inside edges of the end posts). Use a tape measure and record the length in inches (or mm).
- Measure the actual width of one picket. If you are using square balusters, this is the side width. For turned balusters, measure the widest point that faces the gap.
- Determine your maximum allowable clear gap. If you are following a code, use that value. If not, a common aesthetic choice is 4 inches.
- Enter these three numbers into the calculator. The result gives you the number of pickets and the on-center spacing.
When you install, mark the center of the first picket at half the on-center spacing from the post, then continue marking at each full on-center interval. This ensures the end gaps are equal.
Common Mistakes and How to Avoid Them
- Mixing units: If you measure the rail in feet but the picket width in inches, the formula will be wrong. Convert everything to the same unit first (e.g., multiply feet by 12 to get inches).
- Using on-center spacing as the clear gap: The code usually refers to the clear space between pickets, not the center-to-center distance. Always subtract the picket width from the on-center spacing to get the actual gap.
- Forgetting to round up: The number of pickets must be a whole number. Always round up, never down, to ensure the gap does not exceed your maximum.
- Ignoring the end posts: The rail length should be measured between the inside faces of the posts, not the outside. If you include the posts, the spacing will be off.
- Assuming the picket width is uniform: For turned or shaped balusters, the width may vary. Use the maximum width that affects the gap.
Limitations of the Formula
This calculator assumes the pickets are installed vertically and evenly spaced along a straight horizontal rail. It does not account for:
- Angled or curved rails (stairs, ramps) where the horizontal projection differs from the actual length along the slope.
- Pickets that are not parallel to each other (e.g., some decorative patterns).
- Special code requirements for stair rails, where the spacing is measured along the incline.
- Structural requirements for picket thickness or attachment methods.
For stairs, you typically measure the length along the stringer (the sloped part) and use that as the rail length. The same formula applies, but the on-center spacing is measured along the slope, not horizontally.
Frequently Asked Questions
How many pickets do I need for a 12-foot railing with 4-inch spacing?
Assuming 2-inch wide pickets: first convert 12 feet to 144 inches. Using the formula: N = ceil((144 + 2) / (2 + 4)) = ceil(146/6) = ceil(24.33) = 25 pickets. The on-center spacing would be (144 − 25×2)/(25+1) = (144−50)/26 = 94/26 = 3.615 inches, giving a clear gap of 1.615 inches.
What is the maximum gap for handrail pickets?
The most common building code requirement is a maximum clear gap of 4 inches (101.6 mm) between balusters. This is intended to prevent a small child’s head from getting trapped. Some local codes may allow up to 4.375 inches, but 4 inches is the safest and most widely used standard. Always check your local building code.
Should I space pickets on center or by clear gap?
Most codes specify the clear gap (the open space between pickets). However, when installing, it is easier to mark on-center spacing because that is what you measure with a tape. The calculator gives both: the number of pickets and the on-center spacing. Just remember that the clear gap is always less than the on-center spacing by the picket width.
Can I use this calculator for stair railings?
Yes, but you must measure the rail length along the slope of the stairs (the actual length of the railing), not the horizontal run. The formula works the same way. For stairways, some codes require the same 4-inch gap, but the measurement is taken along the incline.
What if my pickets are not rectangular?
If you are using round or turned balusters, measure the width at the widest point that faces the gap. For round balusters, that is the diameter. The formula still works, but the clear gap will be slightly larger at the narrow points. For accurate code compliance, use the maximum width in the calculation.
How do I convert inches to millimeters?
Multiply inches by 25.4 to get millimeters. For example, 4 inches = 101.6 mm. If you are working in metric, enter all measurements in millimeters and the calculator will output in millimeters as well.
Related
Formula used
in rail_length | Rail length | in | 120 | 0 in picket_width | Picket width | in | 2 | 0 in max_gap | Max gap | in | 4 | 0 out picket_count | Number of pickets | - | ceil((rail_length + picket_width) / (picket_width + max_gap)) | 0 out spacing | On-center spacing | in | (rail_length - (picket_count * picket_width)) / (picket_count + 1) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.