Layout calculator · Free

Slat Spacing Calculator

Space bed slats, slat walls, fence slats, and bench seats evenly. Enter a maximum gap to get the fewest slats that meet it, then mark every slat from one end.

Max-gap slat countFlush or equal endsNearest 1/32 inch
Live spacing layout
Inches · fractions OK · nearest 1/32
Step 01

Enter the layout

Minimum number of slats for a gap ≤ 3"12
How much wood do I need? Material estimate

12 slats × 60" = 60.0 linear ft · 13.13 board feet

Board feet use the actual sizes entered here. Open in the board foot calculator to add waste, other parts, tax, and a shareable shopping list.

Measure twice

How to space slats evenly

Measure the span the slats will cover

The span is the clear distance the slats fill. For a bed it is usually the inside length of the side rails, from headboard to footboard, because slats run across the width of the bed and are spread along its length. For a slat wall it is the width of the wall section between trim, corners, or openings. For a fence bay it is the distance between posts at the rail where the slats attach.

Measure in the place the slats actually sit. A bed frame can be slightly narrower at the ledger than at the top of the rail, and a wall can be out of plumb. If the span varies, calculate at the narrowest point or calculate each section separately.

Use the real slat width

Enter the width you measure, not the name of the board. A 1×4 is about 3½ inches wide and a 1×6 about 5½ inches. Rough-sawn or reclaimed slats can vary from piece to piece; if they do, measure a few and use the average, then rip any oversize slats so the gaps stay consistent.

Pick the end condition

Choose flush outer edges when the first and last slat sit tight against the ends, such as a fence bay or a panel framed on both sides. Choose equal outer gaps when the space at each end should match the space between slats. Bed slats usually look and work best with equal outer gaps, so no slat sits directly against the headboard or footboard where a center support or leg may be in the way.

Let a maximum gap set the slat count

Many slat jobs have a limit on the opening rather than a target number of slats. Mattress warranties often state a maximum distance between slats. A pet or child barrier needs openings small enough that nothing can get through. Type that limit into the maximum gap box and the calculator works out the smallest slat count that keeps every gap at or below it. Click the button to apply it and the layout updates.

The math is simple. With flush ends, the number of slats must be at least (span + maximum gap) ÷ (slat width + maximum gap), rounded up. With equal end gaps it must be at least (span − maximum gap) ÷ (slat width + maximum gap), rounded up. One extra slat always makes every gap smaller, so you can add more for stiffness or looks.

Worked bed slat example

A queen bed frame has an 80-inch inside length. The slats are 3½ inches wide and the mattress maker allows no more than 3 inches between them. With equal outer gaps, (80 − 3) ÷ (3½ + 3) = 11.8, so you need 12 slats. Twelve slats take up 42 inches, leaving 38 inches across 13 gaps: about 2 15/16 inches each. Cut a spacer block to that size and you can install the whole set in a few minutes.

Queen and king beds also need a center support rail with legs under the slats, and wide slats should be screwed to it. Twin and full beds can often skip the center rail when the slats are thick enough, but follow the bed or mattress maker's instructions.

Slat walls and decorative panels

On a slat wall the gap is a design choice. Narrow gaps of about ½ to ¾ inch read as a solid textured surface; gaps of 1 to 1½ inches show more of the wall behind. Try a few slat counts and watch the preview. Before you commit, check where outlets, switches, and vents fall; it is often better to shift the whole layout slightly than to cut a slat around a device.

Fences and outdoor slats

Outdoor slats move with moisture. Freshly treated boards can shrink noticeably in width as they dry, which makes gaps grow. If the wood is wet, install with slightly smaller gaps than the final look you want. Where a fence or guard has to meet a code limit on openings, check the local rule and measure the gaps again after the wood has dried.

Mark from one end, not gap by gap

Open the list of slat marks to get each slat's position measured from the same starting edge. Marking cumulative positions keeps small rounding differences from piling up across many slats. Use a spacer block for speed and check against the marks every few slats.

For a general layout that is not about slats, such as hooks, balusters, or holes, the equal spacing calculator uses the same math. For shelves inside a cabinet, use the shelf spacing calculator.

Common questions

Slat Spacing Calculator FAQ

How far apart should bed slats be?

Many mattress makers ask for a gap of about 3 inches or less between slats, and some memory-foam mattresses ask for less. Check your mattress warranty, enter that number as the maximum gap, and the calculator gives the minimum number of slats.

How many slats do I need for a queen bed?

It depends on slat width and the allowed gap. With 3½-inch slats across an 80-inch queen frame and a 3-inch maximum gap, you need at least 12 slats, which leaves gaps of about 2 15/16 inches.

How do I calculate slat spacing?

Subtract the total width of all slats from the span, then divide by the number of gaps. With slats tight against both ends there is one fewer gap than slats; with equal space at both ends there is one more gap than slats.

What is the gap between slats on a slat wall?

Decorative slat walls often use gaps between ½ inch and 1½ inches. Pick the look you want, then adjust the slat count until the calculated gap is close to it.

Should the gap be measured edge to edge or center to center?

The main result is the clear gap between slat edges, which is what a spacer block measures. The on-center spacing is the gap plus one slat width and is useful when you mark centerlines.

More workshop math

Keep planning.