Deduct the gates from the run first, divide what's left by your post spacing and round up for sections, then add one post to close the run and one per gate. A 100 ft line with one 4 ft gate leaves a 96 ft run: 12 sections, 14 posts, 24 rails, 192 pickets at a 5.5″ picket with a ½″ gap, and about 14 bags of concrete.
Measuring the run
Measure the whole line the fence will follow, straight through the gate openings — gates included. That instruction is the opposite of tools that make you subtract gates yourself before typing anything, and it is deliberate: the deduction is part of the arithmetic, so it belongs inside the calculator where it happens in the right order and in the open. For a full perimeter, add the sides and enter the total, keeping in mind the counts below describe a single straight run; corners on a real perimeter each behave like an end, and can add a post the straight-run math does not know about. Measure in feet with decimals — 10 ft 6 in is 10.5 ft — and measure the line the fence will actually take, along the ground it will stand on.
Posts — spacing is a maximum, actual spacing is the truth
The run divides into sections at your spacing, rounded up, because a section longer than your spacing is the one thing the layout must not contain. That makes your entered spacing a maximum, and the actual spacing — the net run divided by the sections it produced — is often a little less. On a dividing run the two are equal: 96 ft in 12 sections is exactly 8.00 ft. On a non-dividing run they separate, and the actual figure is the one you will really dig: 100 ft with no gate at 8 ft spacing makes 13 sections, and those sections work out to 7.69 ft apart, not 8. Posts are then the sections plus one to close the run — every section needs a post at each end, and neighbouring sections share the post between them, which is the whole arithmetic of a fence line in one sentence.
Worked example — 100 ft, 8 ft spacing, one 4 ft gate, picket style
The calculator is pre-filled with exactly this case: 2 rails per section, 5.5 in pickets, a 0.5 in gap:
- Total gate width: 1 × 4 ft = 4 ft; net run: 100 − 4 = 96.00 ft
- Sections: ceil(96 ÷ 8) = 12 sections; actual spacing 96 ÷ 12 = 8.00 ft
- Posts: 12 + 1 + 1 gate = 14 posts
- Rails: 12 × 2 = 24 boards; rail length 96 × 2 = 192.00 linear ft
- Pickets: ceil((96 × 12) ÷ (5.5 + 0.5)) = ceil(192.0) = 192 pickets
- Concrete: 14 posts × 1 = 14 bags (50 lb, at the stated per-post estimate)
Each gate adds one extra post — a gate needs a post on both sides, and one side is the post your fence sections already end on.
Gates, rails, and pickets
A gate changes the count twice: its width comes off the run before any section is counted — an opening carries no rails and no pickets — and it adds one post, per the convention stated in the worked example. Rails are counted two ways because lumber is bought two ways: as boards (sections × rails per section) and as linear feet (net run × rails per section); the two figures describe the same wood. Two rails per section is the standard count for picket fences and rail fences at typical heights, which is why it is the default; a 6 ft privacy build commonly uses three, and the field accepts 1–4 so one number changes instead of the tool guessing from a height it never asked for. Pickets are counted on the whole net run at once — the run in inches divided by one picket's width-plus-gap module, rounded up once. Counting per section and rounding at every section would invent extra pickets at every post. A gap of 0 is a legitimate entry: it prices a solid, privacy-style run where pickets touch.
Concrete per post — an estimate, labelled as one
The concrete line estimates one 50 lb bag per post, gate posts included. That figure is built for a standard post hole — roughly 8–10 inches across and 24 inches deep, for a 4×4 post, where the post itself displaces part of the hole's volume. It understates whenever reality departs from that hole: deeper frost-line digging, wider holes, and 6×6 gate posts all take more. When the hole dimensions are the question, the Concrete Calculator figures bags from the volume of the holes you actually dig, and its answer governs. Treat this page's bag count as a planning estimate with its assumption printed beside it, never as a pour specification.
What the estimate leaves out
The counts above are the fence's frame and skin, not a full bill of materials. Gate kits and gate framing, hinges and latches, post caps, screws and nails, and gravel for drainage under posts are all real purchases this page does not count. Corners, slopes, and stepped or racked sections on uneven ground can add posts and material beyond a straight, level run. Quantities also assume the run as entered: a property line that jogs, or an obstacle the fence must route around, changes the line and therefore every figure on it. Confirm the final list with your supplier against your layout before ordering.