Home › Methodology

How our numbers are worked out

Every formula, default value and rounding rule used by the CalculateFence calculators is written out on this page. Nothing is hidden in the code. If a number on this site looks wrong to you, this page is where you check our working.

Last reviewed 3 September 2026 · Next review 3 March 2027

The formulas

Worked examples use the calculator's default project: a 150 ft run, 6 ft tall, 8 ft post spacing, wood privacy style, one gate.

Posts

sections = ceil(length ÷ spacing) posts = sections + 1 + gates

Each section needs a post at one end, and the run needs one more post to close it. Every gate adds one further post, because a gate opening is framed by a post on each side. Worked: ceil(150 ÷ 8) = 19 sections. 19 + 1 + 1 = 21 posts.

Rails

rails per section = 2 if height ≤ 4 ft 3 if height 4–8 ft 4 if height > 8 ft rails = sections × rails per section

The convention is roughly one rail per 24 inches of height. A third rail is added above 4 ft because an unsupported span of boards will bow. Worked: 19 × 3 = 57 rails.

Boards, pickets, panels and mesh

privacy boards = ceil(length × 12 ÷ 5.5) pickets = ceil(length × 12 ÷ (3.5 + 2.5)) vinyl panels = sections chain-link = ceil(length ÷ 50)

A nominal 1×6 board measures 5.5 in across the face, and a nominal 1×4 picket measures 3.5 in — nominal lumber sizes are larger than actual sizes. Privacy boards butt together with no gap. Pickets are spaced at 2.5 in, which is a common decorative gap rather than a rule. Vinyl arrives as one prefabricated panel per section. Chain-link fabric is sold in 50 ft rolls. Worked: 150 × 12 ÷ 5.5 = 327.3, rounded up to 328 boards.

Post holes and concrete

hole depth = max(24 in, height × 12 ÷ 3) bags per post = 2 if hole depth < 30 in 3 if hole depth ≥ 30 in concrete bags = posts × bags per post

One third of the post's length goes underground, with a 24 in floor. Bag counts assume a 4×4 post centred in a 10 in diameter hole and 50 lb bags of post-setting concrete. Worked: 6 × 12 ÷ 3 = 24 in, so 2 bags per post. 21 × 2 = 42 bags.

Default values and when to change them

DefaultValueWhy this valueChange it when
Post spacing8 ftStandard residential spacing for wood fences to 6 ft; matches an 8 ft rail with no wasteHigh wind, fences over 6 ft, or heavier panels — drop to 6 ft
Board face width5.5 inActual width of nominal 1×6 lumberYou are buying a different board size
Picket width3.5 inActual width of nominal 1×4 lumberYou are buying a different picket size
Picket gap2.5 inCommon decorative spacing; convention, not codeYou want a tighter or wider look
Hole depth⅓ of height, min 24 inStandard rule of thumb for post stabilityFrost line is deeper than the hole — see below
Hole diameter10 inRoughly three times the width of a 4×4 post6×6 gate posts, or soft soil
Concrete bag50 lbMost common post-setting bag size in US storesYou buy 60 lb or 80 lb bags — recalculate by weight
Waste allowance10%Covers offcuts, warped boards and corner cutsSloped or irregular runs — go to 15%
Frost line overrides our hole depth. In cold regions, posts must be set below the depth at which ground freezes, or they will lift out over successive winters. That depth varies from a few inches in the far south to well over 40 inches in the northern states, and it is set by local building code — not by us. Our ⅓-of-height rule does not account for it. Check your municipal building department before you dig.

Rounding rules

QuantityRuleReason
SectionsAlways rounded upA partial section still needs its posts and rails
Boards and picketsAlways rounded upYou cannot buy part of a board
Order quantityExact count × 1.1, rounded upThe 10% waste allowance shown beside each result
Unit conversion1 ft = 0.3048 m exactlySwitching units converts your entered values, it does not re-round them

Rounding up at every stage means our counts lean slightly generous. That is deliberate — a second trip to the lumber yard costs more than one spare board.

What the calculator deliberately does not do

Knowing a tool's limits matters as much as knowing its formulas.

Where these numbers come from, and how confident we are

Being straight about this matters more than sounding authoritative.

FigureBasisConfidence
Nominal vs actual lumber sizesStandardised across US lumber suppliersHigh — these are fixed dimensions
Posts, rails, boards formulasArithmetic; no judgement involvedHigh
8 ft post spacingWidespread residential conventionHigh as a default, but not a code requirement
⅓ height hole depthCommon trade rule of thumbMedium — frost line and soil override it
Bags of concrete per postDerived from hole volume at a 10 in diameterMedium — varies with bag size and hole width
2.5 in picket gapAesthetic conventionLow — entirely a matter of preference
Found an error? These formulas are published precisely so they can be challenged. If a number here disagrees with your local code, your supplier or your own experience, we would rather hear it than not. Corrections are logged below.

Change log

DateChange
2026-09-03Corrected the worked example on the calculator page: it omitted the extra post required by a gate, understating posts by 1 and concrete by 2 bags. The calculator itself was always correct.
2026-09-02Methodology page published alongside the fence material calculator.

Related

Fence CalculatorPosts, rails, boards and concrete