Anyone who has laid out a board-and-batten accent wall or wainscoting run knows the classic jobsite trap: you pick a tidy 16-inch spacer block, nail battens from left to right, and arrive at the far corner with an awkward 3-1/2-inch sliver that ruins the entire elevation. Worse, if you lay out purely by nominal lumber labels (1x3 or 1x4) instead of actual dressed US dimensions (2.5" or 3.5"), cumulative rounding error throws off your centerline marks by more than an inch across a 14-foot wall.
When we built the PlanCaliber Board & Batten Spacing Calculator, we wanted a deterministic TypeScript solver that behaves like a finish carpenter: solving strictly equal clear gaps down to the nearest 1/16", printing cumulative tape-measure layout marks from 0" so small spacer errors never compound, generating an 8-foot or 12-foot board cut list, and flagging NEC 314.20 electrical box-extender requirements before the first brad nail is shot.
1. Nominal vs. Actual US Trim Widths
In US lumberyards, a 1x3 pine or MDF trim board is never 3 inches wide. Every equal-gap solver must map nominal profiles to exact dressed widths in decimal inches:
export type BattenProfileKey = '1x2' | '1x3' | '1x4' | '1x6'; export const BATTEN_WIDTH_IN: Record<BattenProfileKey, number> = { '1x2': 1.5, '1x3': 2.5, '1x4': 3.5, '1x6': 5.5, }; For standard full-height accent walls (96" ceiling) with a 1x6 flat baseboard (5.5"), a 1x4 top rail (3.5"), and a 1x2 cap ledge (0.75" thick), the net vertical cut length of every batten is:
const netBattenHeightIn = wallHeightIn - baseboardHeightIn - (includeTopRail ? 3.5 : 0) - (includeTopRail && includeCapLedge ? 0.75 : 0); On an 8-foot (96") wall, netBattenHeightIn comes out to 86.25". That single check reveals an immediate purchasing detail: an 8-foot (96") board yields exactly 1 vertical batten per stick, whereas a 48" wainscot wall (netBattenHeightIn = 38.25") yields 2 vertical battens per 8-foot board (Math.floor(96 / 38.25) === 2) and 3 per 12-foot board (Math.floor(144 / 38.25) === 3).
2. The Fencepost Formula for Equal Clear Gaps
There are two valid installation conventions at the left and right wall corners:
- Corner battens included (
includeEndBattens = true, most common): A batten sits flush against both the left corner (x = 0") and right corner (x = L - W). If there areNtotal battens, there areB = N - 1equal clear bays between them. - Corner battens omitted (
includeEndBattens = false): Interior battens float inside open corner bays. If there areNbattens, there areB = N + 1equal clear bays.
Given total wall length L in inches, actual batten width W, and a target clear gap G_target (commonly 14" to 18"), we solve the integer bay count and exact clear gap without floating-point drift:
export function solveEqualSpacing( wallLengthIn: number, battenWidthIn: number, targetGapIn: number, includeEndBattens: boolean, overrideCount: number | null = null ) { let battenCount: number; if (overrideCount !== null && overrideCount >= 1) { battenCount = Math.round(overrideCount); } else if (includeEndBattens) { const bays = Math.max(1, Math.round((wallLengthIn - battenWidthIn) / (targetGapIn + battenWidthIn))); battenCount = bays + 1; } else { const bays = Math.max(2, Math.round(wallLengthIn / (targetGapIn + battenWidthIn))); battenCount = bays - 1; } const bayCount = includeEndBattens ? Math.max(1, battenCount - 1) : battenCount + 1; const clearGapIn = (wallLengthIn - battenCount * battenWidthIn) / bayCount; const onCenterIn = clearGapIn + battenWidthIn; return { battenCount, bayCount, clearGapIn, onCenterIn }; } Consider a 14'-6" (174") living room wall using 1x3 (2.5") battens with corner battens and a 16" target gap:
-
bays = Math.round((174 - 2.5) / (16 + 2.5)) = Math.round(9.27) = 9bays -
battenCount = 10vertical battens -
clearGapIn = (174 - 10 * 2.5) / 9 = 149 / 9 = 16.5556"(rounds to16-9/16") onCenterIn = 16.5556 + 2.5 = 19.0556"
If one of those battens collides with an existing wall receptacle or light switch, a single click to N - 1 (9 battens, 18-15/16" clear gap) or N + 1 (11 battens, 14-5/8" clear gap) immediately shifts every vertical rail clear of the electrical box while keeping symmetric corners.
3. Cumulative Tape-Measure Marks Rounded to 1/16 Inch
Finish carpenters avoid chaining a physical spacer block across 10 bays because a 1/32" error per bay accumulates to over 1/4" by the end of the wall. Instead, pull one tape measure from the left corner (0") and mark every batten's Left Edge and Centerline from the exact floating-point coordinate, rounding only at display time:
function gcd(a: number, b: number): number { let x = Math.abs(a); let y = Math.abs(b); while (y !== 0) { const t = x % y; x = y; y = t; } return x || 1; } export function toSixteenthFraction(inches: number): string { const roundedSixteenths = Math.round(inches * 16); const whole = Math.floor(roundedSixteenths / 16); const rem = roundedSixteenths % 16; if (rem === 0) return `${whole}"`; const d = gcd(rem, 16); return whole === 0 ? `${rem / d}/${16 / d}"` : `${whole}-${rem / d}/${16 / d}"`; } Because each mark is computed directly from i * onCenterIn (or clearGapIn + i * onCenterIn when corner battens are omitted), rounding error never exceeds 1/32" anywhere on the wall. You can preview the live scaled elevation SVG and printable tape-measure table inside our Board & Batten Spacing Calculator.
4. Board Cut Lists, Caulk Tubes, and Stud Alignment
Once battenCount and netBattenHeightIn are locked, calculating exact shopping quantities prevents mid-weekend hardware store runs:
- Stock boards: Divide
stockLengthFt * 12bynetBattenHeightInusingMath.floor(...)(you cannot splice two vertical offcuts seamlessly into one full-height batten), then apply your waste factor (10%standard,15%for knotty pine). - Paintable acrylic caulk: Every vertical batten has two vertical seams against the drywall, plus horizontal seams along the top rail and baseboard. Dividing total seam linear feet by
25 LFper10.1 oztube gives a realistic caulk count. - 16-inch OC stud check: Flagging which batten centerlines land within
+/- 0.75"of standard16"on-center stud bays tells the installer where nails hit solid framing versus where construction adhesive and opposing angled brads are needed.
5. The NEC 314.20 Electrical Box Extender Rule
One of the most overlooked code details on interior wall paneling and thick wood trim is NEC 314.20 (Flush-Mounted Installations). While boxes in non-combustible drywall may sit up to 1/4" behind the finished surface, in walls or ceilings constructed of wood or other combustible surface material, boxes must sit strictly flush with the finished surface or project therefrom.
If you apply 3/4" battens or MDF panel backing around an existing electrical outlet or switch, install a UL-listed box extender so the receptacle yoke seats flush with the combustible trim face rather than buried behind wood. If you are planning a full room remodel alongside your wall trim, pair the elevation takeoff with our Interior Paint & Wall Area Calculator, Drywall Sheet & Mud Calculator, and NEC 210.52 Electrical Outlet Spacing Calculator.
Disclaimer: Outputs are for preliminary space planning, finish-trim layout, and material estimating only. Always verify wall dimensions, stud locations, plumb/level tolerances, and local electrical/building code requirements on site prior to cutting or installation.
Try the Live Elevation & 2D/3D Studio
- Run exact
1/16"wall spacing and print a clean cut sheet: Board & Batten Spacing Calculator - Lay out the full room, furniture clearances, and scaled 2D/3D elevations in your browser: Open PlanCaliber 2D/3D Studio
- Browse all 30 US residential remodeling and building-code tools: PlanCaliber Calculator Suite