Fence Calculator — posts, rails and pickets
Posts, rails, pickets and fasteners for a wood fence, cut from the dressed sizes PS 20 sets and honest about which of the other numbers are only convention.
Posts, rails, pickets and fasteners for a wood fence, cut from the actual dressed sizes — and honest about which of these numbers a standard sets and which are only habit.
| Sections and posts | — |
|---|---|
| Last section | — |
| Picket module | — |
| Pickets | — |
| Rails | — |
| Rail stock and cut plan | — |
| Fasteners | — |
| Concrete for the posts | — |
“Two rails under five feet, three above” is not published anywhere. It is repeated on every fence page on the internet and it comes from nothing. What does exist: Universal Forest Products' own installation sheet, which says three rails for a 6 ft fence and four for an 8 ft fence, and two for “shorter fences” without ever defining shorter. Some municipalities legislate a rail count against height and opacity, and they do not agree with each other or with the five‑foot rule. There is no model‑code provision at all, and there is a reason for that: IRC R105.2 exempts fences not over 7 ft from needing a permit, so the residential code never gets as far as specifying how they are framed. That is why the rail count above is a field you fill in rather than a number this page asserts.
A 1×6 is not six inches, and it is not always 5½ either. The American Softwood Lumber Standard, PS 20‑25, Table 3, dresses a nominal 1×6 to 5½ in when it is graded dry — but to 5⅝ in when it is graded green, and §6.2.5 gives redwood, western red cedar and northern white cedar their own green width of 5⅞ in. Fence boards are very often both cedar and green. On a 100 ft butted privacy run that is 1,200 in of face: at 5½ you need 219 pickets, at 5⅝ you need 214. Five pickets is not a rounding error when it is the difference between finishing and driving back to the yard. Read the grade stamp, or measure one.
Post spacing is a lumber decision dressed up as a structural one. Eight feet on centre is everywhere because rails are sold in 8 and 16 ft lengths, so 8 ft spacing wastes nothing. The published sources say the same thing without the structural story: the USDA NRCS conservation practice specification for board fence caps posts at 8 ft on centre, and the municipalities that legislate spacing land on 8 ft too. None of that is a national standard and none of it is a wind calculation — a taller or a more solid fence catches more wind, and nothing in these documents accounts for it. Treat 8 ft as the default that suits the material, and go tighter if your fence is tall, solid, or exposed.
A rail is not as long as the spacing, and stock is not exactly its length. Rails land between the posts, so at 8 ft on centre with a 4×4 the rail is 8 ft less 3½ in, and the cut plan above is worked on that figure rather than on the spacing. In the other direction, PS 20‑25 §5.3.2 requires lumber up to 2 in nominal thickness to be double‑end‑trimmed to not less than its nominal length and not more than 3 in over — so a 16 ft rail is somewhere between 16 ft‑0 and 16 ft‑3. That slack is real, and it is never enough to get one more full rail out of a stick, which is why this page plans cuts on the nominal length and not on the hopeful one.
Seven feet is the line that matters. IRC R105.2 exempts fences not over 7 ft high from requiring a building permit. Above that, you need one. The same section is explicit that being exempt from a permit does not exempt the work from complying with the code, and none of this touches your local zoning, which is a separate rulebook and is usually the one that cares about height at the street. Pool barriers are a different matter again and are not what this page is for.
What the gate assumption is. Each gate opening is taken out of the fence run and adds one post, on the basis that a gate needs a post on each side and one of those is a line post you were building anyway. A gate leaf is not counted in the picket total: gates are usually bought as a unit or built with their own bracing, and counting their pickets in with the fence quietly inflates the order. If you are building the leaves, add their width back in as extra run.
Every lumber dimension — NIST Voluntary Product Standard PS 20‑25,
American Softwood Lumber Standard (January 2025), Table 3: nominal 1×4 dresses dry to
3½ in and green to 3⅞ in; nominal 1×6 dresses dry to 5½ in and
green to 5⅝ in; nominal 2 in thickness dresses dry to 1½ in; a 4×4
dresses dry to 3½ in square, and a 6×6 to 5½ in square under the timber rule
regardless of moisture content. §6.2.5 and Table 5 give redwood, western red cedar and
northern white cedar a green nominal‑6 width of 5⅞ in. §5.3.2 sets the
double‑end‑trim tolerance of +0 to +3 in on length. The standard states the inch
values are the units of record.
Rails per fence height — Universal Forest Products fence installation instructions: three
rails for a 6 ft fence, four for 8 ft, and nothing at all for shorter fences — the instructions do not say. Post spacing
— USDA NRCS Conservation Practice Specification, Fence (Code 382), Illinois corral and lot
fence specifications: space posts no more than 8 ft apart. Permit threshold —
International Residential Code R105.2, work exempt from permit: fences not over 7 ft (2134 mm)
high, unchanged from the 2021 to the 2024 edition.
Deliberately not asserted: a fastener count per picket. The only published fastening requirement found
is the NRCS one for a horizontal board nailed to a post in agricultural fence — two fasteners at
each intersection — which is not the same joint as a vertical picket on a rail. The field is
therefore yours, prefilled with that figure and labelled as borrowed. Stock lengths of 8 to 20 ft
in two‑foot steps are a yard convention: PS 20 standardises only that lengths come in
one‑ or two‑foot multiples and leaves the list to each grading agency.