Home › Calculators › Even Spacing Calculator

Even Spacing Calculator

Space anything evenly along a wall, rail or board: pickets, posts, slats, shelves, hooks or picture frames. Enter the total length, the width of one item and either how many items or the largest gap you want, and get the equal gap, on-center spacing and a mark for every item.

Last updated:

Units

Wall, rail or board length, inside edge to inside edge

Picket, post, frame or shelf bracket width; 0 for hooks

Layout
I know the

The tool finds the fewest items that keep every gap at or below this

Enter your values to see the result.
Advertisement
Advertisement

How to use the Even Spacing Calculator

  1. Pick your units: inches (shown with fractions) or centimeters/millimeters.
  2. Enter the total length of the space and the width of one item. Use 0 for hooks, nails or other thin items.
  3. Choose a layout: gaps at both ends (pickets between posts, frames on a wall), first and last item at the ends (posts along a run), or centered in equal sections (hooks, lights).
  4. Enter the number of items, or switch to Maximum gap to let the calculator choose how many you need.
  5. Press Calculate spacing and mark the centers or left edges from the table, or cut a spacer block to the gap size.

Even spacing formulas

Let L be the total length, n the number of items and w the width of one item. The free space is L − n × w; how it is shared depends on the layout.

LayoutNumber of gapsGapTypical use
Equal gaps at both endsn + 1(L − n·w) ÷ (n + 1)Pickets or balusters between posts, frames on a wall, shelves in a cabinet
First and last item at the endsn − 1(L − n·w) ÷ (n − 1)Fence posts along a run, joists, studs, columns
Centered in equal sectionsn − 1 full + 2 halfL ÷ n − wHooks, knobs, pendant lights, recessed lights

On-center spacing is w + gap (or L ÷ n for equal sections). The left edge of item k is the end gap plus (k − 1) × on-center, and its center is that plus w ÷ 2.

Worked example: pickets between two posts

A fence section is 92½″ between posts and the pickets are 3½″ wide. You want gaps no wider than 2½″. Each picket plus gap takes at most 6″, so you need at least (92.5 − 2.5) ÷ 6 = 15 pickets. With 15 pickets the gap is (92.5 − 15 × 3.5) ÷ 16 = 2.5″ exactly, and the on-center spacing is 6″.

Tips for accurate spacing

  • Cut a spacer block to the exact gap and use it between items; it is faster and more consistent than measuring each gap.
  • Measure every mark from the same end using the table, so small errors do not add up.
  • Check the real width of lumber: a 1×4 is about 3½″ wide and a 2×2 about 1½″.
  • Railings have rules: for stair and deck guards most US codes do not let a 4″ sphere pass through; use the baluster spacing calculator for those.
  • For pictures, measure to the frame centers and then adjust each hook for the hanging hardware.

Frequently asked questions

How do I calculate equal spacing between items?

Subtract the total width of the items from the total length, then divide by the number of gaps. With a gap at both ends there is one more gap than items: gap = (length − items × width) ÷ (items + 1). If the first and last items sit right at the ends, there is one fewer gap than items: gap = (length − items × width) ÷ (items − 1).

What is on-center spacing?

On-center (O.C.) spacing is the distance from the center of one item to the center of the next. It equals the item width plus the gap. Builders use it because it is easier to measure and mark repeatedly than the gaps themselves.

How do I space pictures evenly on a wall?

Measure the wall width and the width of each frame, choose Equal gaps at both ends and enter the number of frames. The result gives the gap between frames and the distance from the left end of the wall to each frame's center, which is where you measure for the hook (adjusting for the hanging wire or bracket).

How many pickets do I need for a fence section?

Use Maximum gap: enter the distance between posts, the picket width and the largest gap you want, for example 2½ inches. The calculator returns the fewest pickets that keep every gap at or below that size, plus the exact equal gap to cut a spacer block to.

What does Centered in equal sections mean?

The space is split into equal sections and one item is centered in each. The gaps between items are equal and each end gets half a gap. It is the usual way to place hooks on a rack, pendant lights over an island or lights along a ceiling.

Why do my marks not add up exactly to the length?

Inch results are rounded to the nearest 1/16 inch for easy reading with a tape measure, so small rounding can add up over many items. The exact decimal is shown in brackets; marking every item from the same starting point, rather than from the previous mark, avoids accumulating error.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Baluster Spacing CalculatorNumber of balusters and exact gap and on-center spacing for a railing under the 4-inch rule.Picture Hanging Height CalculatorExact nail height for a frame at 57 in eye level or above furniture, plus gallery spacing.Fence CalculatorWork out fence posts, rails, pickets and concrete bags for any fence length.Plant Spacing CalculatorHow many plants fit an area at a given spacing, in a square, triangular or row pattern.Square Footage CalculatorTotal sq ft and m² for rooms of any shape, with cost estimate.Concrete CalculatorEstimate concrete volume, bags and cost.Paint CalculatorHow much paint for a room, minus doors and windows, in gallons or liters.Tile CalculatorHow many tiles and boxes you need for a floor or wall, with waste.Flooring CalculatorWork out flooring area, boxes needed and cost with waste allowance.Drywall CalculatorCount drywall sheets, screws, joint compound and tape for walls and ceilings.Brick CalculatorEstimate bricks, mortar volume and mortar bags for a wall, minus openings.Deck CalculatorDeck boards, joists, posts, screws and total cost from your deck size.Wallpaper CalculatorWork out how many rolls of wallpaper you need, with pattern repeat and waste.Stair CalculatorFind riser height, tread run, stringer length and angle, with IRC code checks.Board Foot CalculatorAdd up board feet and lumber cost for any list of boards, nominal or actual size.Insulation CalculatorFind the R-value to add for your climate zone and how many batts or blown-in bags to buy.Rain Gutter CalculatorSize gutters and downspouts from roof area, roof pitch and local rainfall intensity.Moving Cost CalculatorCompare DIY truck, full-service movers and container costs, with truck size and packing estimates.Concrete Block CalculatorCount concrete blocks (CMU) for a wall, minus doors and windows, plus mortar bags.Roof Pitch CalculatorConvert rise and run or an angle to roof pitch x/12, degrees, slope % and rafter multiplier.TV Size CalculatorFind a TV or monitor's width, height and area from its diagonal and compare two screens.TV Viewing Distance CalculatorBest seating distance for your TV size and resolution (SMPTE, THX, 4K), or the best TV size.Price per Square Foot CalculatorFind price per sq ft or m², total price or area, and compare several homes by value.House Flipping CalculatorFix-and-flip profit, ROI and 70% rule max offer from purchase, rehab, holding and sale costs.Stud CalculatorCount wall studs and plates from wall length, spacing, corners and openings.Carpet CalculatorCarpet for your rooms in sq ft and sq yd from a 12 or 15 ft roll, with padding and cost.Baseboard CalculatorLinear feet of baseboard and number of pieces for your rooms, minus doorways.Grout CalculatorGrout in kg, lb and bags from tile size, joint width, depth and area.Asphalt CalculatorTons of asphalt from area and thickness at 145 lb/ft³, with volume and cost.Sand CalculatorSand in cubic yards, m³, tons and bags for any area and depth.Siding CalculatorSiding squares, panels and J-channel from walls and gables minus doors and windows.Concrete Steps CalculatorConcrete volume and bags for poured steps from step count, rise, run, width and landing.Caulk CalculatorCaulk volume and number of 10.1 oz cartridges or squeeze tubes from joint length and size.Ceiling Fan Size CalculatorCeiling fan blade span, downrod length and minimum airflow (CFM) for any room.Concrete Mix Ratio CalculatorCement bags, sand, gravel and water for any concrete mix ratio (1:2:3, 1:2:4, M15, M20).Curtain Size CalculatorCurtain length, panel width and number of panels from your window size and fullness.Deck Stain CalculatorGallons of deck stain or sealer for the floor, railing and stairs, by coats and wood condition.Dehumidifier Size CalculatorPints-per-day dehumidifier capacity for your room size and dampness, old and new ratings.Dumpster Size CalculatorEstimate cubic yards and tons of debris and pick the right 10–40 yard roll-off dumpster.Heat Pump Savings CalculatorCompare your gas, propane, oil or electric heating cost with a heat pump and see the payback.Kitchen Remodel Cost CalculatorEstimate a kitchen remodel by size, finish level and scope with an itemized cost breakdown.Metal Roofing CalculatorPanel count and cut lengths, screws, ridge cap and trim for a metal roof.Moving Truck Size CalculatorCount your furniture and boxes to get cubic feet and the right moving truck, 10 to 26 ft.Projector Throw Distance CalculatorThrow distance, screen size and image height from your projector's throw ratio.Roof Replacement Cost CalculatorEstimate the cost of a new roof from footprint, pitch, material and tear-off layers.Rug Size CalculatorFind the right rug size for a living room, bedroom or dining room, with a placement preview.Solar Panel Output CalculatorDaily, monthly and yearly kWh from your solar panels, and what that power is worth.Space Heater Cost CalculatorCost to run a space heater per hour, day, month and season, high vs low vs eco.Storage Unit Size CalculatorList your furniture and boxes to find the right storage unit, 5x5 to 10x30, with fill %.Event Table CalculatorHow many tables and chairs for a wedding or party, with head table, linens and floor space.Attic Ventilation CalculatorFind the attic net free vent area (1/150 or 1/300) and how many ridge, soffit and box vents.Concrete Weight CalculatorWeight of a concrete slab, block or cylinder in lb, kg and tons, with hauling loads.Deck Railing CalculatorPosts, rails, balusters, post caps and hardware for your deck railing runs.Drywall Mud CalculatorJoint compound buckets, tape rolls and drywall screws from square feet or sheets and finish level.HVAC Replacement Cost CalculatorEstimate the installed cost and tonnage of a new AC, furnace, heat pump or mini-split.Linear Cut OptimizerFit cut lengths onto boards, pipe or bar stock with saw kerf: cutting plan, waste and board count.Clay Shrinkage CalculatorFired size from wet size, throw size for a target, or shrinkage % from a test tile.SEER Savings CalculatorAnnual savings and payback from upgrading to a higher SEER or SEER2 air conditioner.Self-Leveling Concrete CalculatorBags of self-leveling underlayment, mixing water and primer from floor area and depth.Septic Tank Size CalculatorRecommended septic tank gallons and drain field size from bedrooms and occupants.Spiral Staircase CalculatorPlan a spiral stair: treads, riser height, tread angle, walkline depth and headroom checks.Spray Foam CalculatorBoard feet of open or closed-cell spray foam, kits needed, R-value and cost from area and depth.Stair Carpet CalculatorCarpet for stairs in square and linear yards, or stair runner length, from steps and landings.Stucco CalculatorStucco volume, bags of mix, lath sheets and sand from wall area, coats and thickness.Thinset CalculatorBags of thinset mortar from tile area and trowel notch size, with back-buttering allowance.Wainscoting CalculatorBox layout, panels, rails, stiles, beadboard sheets and cap trim linear feet for any room.Water Softener Size CalculatorDaily grains and the right water softener capacity from hardness, iron and household size.Epoxy Resin CalculatorEpoxy volume for river tables, countertops, floors and coasters, with resin:hardener split.
See all 99 Home & Construction Calculators →