Geometry and layout calculator
Equal Spacing Calculator
Lay out slats, balusters, pickets, panels, shelves, buttons, holes, or any repeated objects across a known length. I will calculate the gaps and every position from one fixed edge, because tiny errors should not be allowed to form a marching band.
Sage’s guided lesson
Equal spacing begins by counting the empty places, not the objects
Five slats can create four gaps, six gaps, or five center intervals depending on the layout. The arithmetic is easy after the picture is defined. Most spacing mistakes happen one sentence before the arithmetic begins.

The fencepost problem has entered the workshop
Five objects do not automatically mean five gaps
When the first and last objects touch the ends, the only gaps are between neighboring objects. That gives one fewer gap than objects. Five objects create four inside gaps.
When the two end gaps must match the inside gaps, there is a gap before the first object, between every pair, and after the final object. That gives one more gap than objects. Five objects create six total gaps.
Between only: gap count = object count − 1
Equal ends: gap count = object count + 1
Center intervals from first center to last center: object count − 1
Sketch one line, draw the objects, and point to every empty space before choosing a formula. A ten second sketch can prevent a ten board recut.
Remove the solid material before dividing the empty space
How to calculate equal gaps by hand
Multiply the width of one object by the number of objects. Subtract that occupied width from the total length. Divide the remaining empty length by the correct number of gaps.
Worked example: five 2 inch slats across 48 inches with equal end gaps
Occupied width = 5 × 2 = 10 in
Empty space = 48 − 10 = 38 in
Gap count = 5 + 1 = 6
Each gap = 38 ÷ 6 = 6.333333... in
Nearest 1/64 in display = 6 21/64 in
The repeating decimal is the exact mathematical spacing for the entered values. The ruler fraction is a practical display. Use the unrounded value to calculate every position, then round each final mark once.
I know this is off topic, but this reminds me of a joke I heard when teaching this to one of my interns, why did the layout marks stay calm? They were all in their place. Yeah, I do not see the connection either, but I think it is cute. Back to the math.


Do not let rounding walk across the project
Mark every object from one fixed datum
Suppose the exact pitch is 8.333333 inches, but the tape measure makes you call it 8 21/64 inches. If you step that rounded distance from one mark to the next, the tiny difference repeats at every interval. By the final object, the total error may be visible.
Instead, calculate each start position from the original edge:
Start 1 = edge gap
Start 2 = edge gap + 1 × pitch
Start 3 = edge gap + 2 × pitch
Start n = edge gap + (n − 1) × pitch
The calculator lists the start, center, and end of every object from the same edge. That lets you choose the most useful reference without carrying one mark’s rounding into the next.
Use the same physical edge, face, centerline, or baseline for all positions. If the reference changes halfway across, the arithmetic can be correct and the layout can still drift.
The repeated step has its own name
Center to center spacing equals object width plus the gap
For equal width objects, the distance from one object center to the next is the object width plus one inside gap. This repeating distance is often called pitch.
Using the five slat example
Object width = 2 in
Gap = 6.333333... in
Pitch = 2 + 6.333333... = 8.333333... in
Center marks are useful for drilling, spindle locations, shelf pins, buttons, lights, decorative elements, and any object that is placed around a centerline rather than against an edge.
A physical layout stick or story pole can preserve the positions without repeatedly reading a tape. Mark the calculated locations once on a stable strip, then transfer them to matching parts. The stick becomes a project specific reference.
The clear gap is the empty distance between objects. Pitch is the repeating center to center distance. Confusing the two moves every object by its own width.


Equal division was a tool problem long before it was a calculator problem
Dividers transferred repeated distances without reading numbers
Craftspeople, navigators, draftsmen, engineers, and surveyors used dividers to pick up a distance and step it repeatedly along a line or around a circle. The points could transfer a spacing directly from one workpiece or drawing to another.
Proportional dividers added a movable pivot, allowing one distance to be enlarged, reduced, or divided into a chosen relationship. Historic instruments included settings for equal parts, lines, circles, and polygon work.
Sectors used paired scales and the geometry of similar triangles. Open the hinged arms to a chosen angle, measure between matching numbers with dividers, and proportional distances appeared without written multiplication. It was a mechanical calculator whose display was the space between two metal points.
Before pencil carrying compasses became common, many instruments had two sharp points like dividers. One tool transferred distances; a later variation drew the arc.
Perfect arithmetic still meets imperfect material
Measure the real objects and verify the final opening
Lumber, tile, trim, cast parts, pickets, and decorative pieces may not all have identical width. If visual balance matters, measure several pieces or the entire batch. A 1/32 inch width variation repeated twenty times becomes 5/8 inch of total change.
- Check whether the stated width is nominal or actual.
- Account for posts, frames, trim, reveals, and required edge clearances.
- Use the straight line distance that the objects truly occupy, not a tape bowed over a curve.
- Dry lay the first, middle, and last objects before drilling or fastening everything.
- Check the final closure by adding all object widths and all gaps.
- For guards, railings, stairs, or child safety openings, verify the applicable local requirements rather than trusting a general spacing example.
Mathematically equal gaps may not always look equal when neighboring surfaces, shadows, tapered parts, or decorative edges change the visible negative space. In appearance critical work, calculate the layout first, then inspect it with the actual pieces.
Two objects can have perfectly equal center spacing while their visible gaps differ if the objects have different widths. Decide whether the design needs equal centers or equal clear openings.

Everything has found its place
The gaps are equal, the marks share one datum, and the last object is no longer a surprise.
You now know how to count gaps, remove occupied width, calculate pitch, mark from one reference, and check the real pieces before committing the entire project.
That earns cheese fries. I will space them evenly across the tray, including equal end gaps, because presentation matters.
Quick answers
Equal spacing questions
How do I calculate equal gaps including both ends?
Subtract the total object width from the available length, then divide by the number of objects plus one.
How do I calculate equal gaps only between objects?
Subtract the total object width from the available length, then divide by the number of objects minus one. Use at least two objects for this method.
Why are there more gaps than objects when both ends are equal?
There is one gap before each object and one extra gap after the final object. Five objects therefore create six gaps.
What is center to center spacing?
For equal width objects, it is the object width plus the inside gap. It is often called pitch.
Why should I mark every position from one edge?
It prevents rounding and marking errors from accumulating across the layout.
Does equal spacing guarantee code compliant baluster gaps?
No. Verify local requirements, actual widths, opening limits, posts, and installation tolerances.