The rule is usually quoted as "one every twelve feet", which is the consequence rather than the rule.

The rule
No point measured horizontally along the wall line may be more than six feet from a receptacle.
Because a receptacle serves six feet in each direction, spacing them twelve feet apart satisfies it — and a receptacle is required within six feet of each end of a wall, not twelve.
The intent is that a lamp or an appliance with a standard six-foot cord can reach an outlet from anywhere along the wall without an extension cord.
What counts as wall space
Any wall segment two feet or more wide, measured along the floor line.
Fixed panels of sliding doors, and the space occupied by fixed room dividers such as railings and counters, count as wall space.
Doorways, fireplaces and similar openings do not.
The practical consequence: a two-foot section of wall between two doorways requires a receptacle, and it is one of the most commonly missed.
Floor receptacles
A receptacle in the floor counts toward the requirement if it is within 18 inches of the wall.
Beyond that it does not, which matters in a room with a large open area served from the middle.
The other spaces with their own rules
Countertops, where the spacing is much tighter — no point more than 24 inches from a receptacle, and any counter 12 inches or wider requires one.
Islands and peninsulas, whose requirements have changed across recent Code editions in both quantity and permitted location.
Bathrooms, requiring at least one receptacle within three feet of the outside edge of each basin, GFCI protected, on a dedicated 20 amp circuit.
Hallways ten feet or longer, requiring at least one.
Outdoors, requiring receptacles at the front and back of a dwelling, GFCI protected and in a weather-resistant enclosure with an in-use cover.
Garages and basements, each with their own minimum.
Laundry areas, with a dedicated circuit.
Foyers over a certain area.
Why an older house has so few
The spacing requirements have tightened repeatedly. A house wired in the 1950s may have two receptacles in a bedroom and none outdoors.
Existing installations are not required to be brought current simply because the Code changed. They are when the room is rewired or substantially altered — which is why a renovation adds receptacles that the homeowner did not ask for and the inspector requires.
Extension cords are the symptom
The rule exists because extension cords under rugs, behind furniture and daisy-chained together are a recognised fire cause.
A room where the household relies on them permanently is a room short of receptacles, and adding one is inexpensive compared with rewiring anything.
Adding a receptacle to an existing room
Usually straightforward: extend from an existing box on the same circuit, provided the circuit is not already heavily loaded and the box has capacity for the additional conductors.
Two constraints to check: box fill, since an existing box may not legally accommodate more conductors, and AFCI protection, since extending a circuit in a living area generally brings the current requirement with it.
Both are ordinary and both are reasons the job is not simply a matter of splicing in.
Tamper-resistant receptacles
Current editions require tamper-resistant receptacles in dwellings — devices with internal shutters that open only when both slots are engaged simultaneously.
They cost very slightly more than standard ones and they are what any new or replacement receptacle in a house should be. Replacing an old receptacle with a non-TR device is a step backwards for a saving measured in cents.
Height and location
The Code does not specify a mounting height for general receptacles, and accessibility guidance and common practice put them roughly 15 to 18 inches to centre above the floor.
What the Code does address is that a receptacle installed to satisfy the spacing requirement must be readily accessible — so one permanently behind a built-in appliance or a fixed cabinet does not count toward the requirement, even though it exists.
