Outlet Spacing Calculator Formula

Understand the math behind the outlet spacing calculator. Each variable explained with a worked example.

Formulas Used

Outlets Needed

outlets_needed = max_spacing > 0 ? ceil(wall_length / max_spacing) + num_doors : 0

Actual Spacing

actual_spacing = max_spacing > 0 && (ceil(wall_length / max_spacing) + num_doors) > 0 ? wall_length / (ceil(wall_length / max_spacing) + num_doors) : 0

Variables

VariableDescriptionDefault
wall_lengthTotal Wall Length(ft)40
max_spacingMax Spacing(ft)12
num_doorsNumber of Doorways2

How It Works

NEC Outlet Spacing (210.52)

The NEC requires that no point along a wall be more than 6 feet from an outlet. This effectively means outlets every 12 feet along unbroken walls. Each wall section separated by a door counts independently. Kitchens and bathrooms have additional requirements.

Worked Example

40 ft of total wall length with 2 doorways, 12 ft max spacing.

wall_length = 40max_spacing = 12num_doors = 2
  1. 01Base outlets = ceil(40 / 12) = 4
  2. 02Add 1 per doorway = 4 + 2 = 6 outlets
  3. 03Actual spacing = 40 / 6 = 6.7 ft apart

Ready to run the numbers?

Open Outlet Spacing Calculator