Fence Calculator: Posts, Rails, Pickets and Concrete for Post Holes
By FindMySum · Last reviewed
A fence calculator turns a fence line into a shopping list: how many posts, rails and pickets to buy, and how many bags of concrete to set the posts. The counting is simple but easy to get wrong by one, and the concrete is where most people under-buy. This article explains each count, the frost-depth question that matters most in Canada and the northern US, and a worked example with the calculator's defaults.
Sections and posts
A straight fence is a row of sections, each spanning from one post to the next. With a maximum spacing between posts, the number of sections is the fenced length divided by the spacing, rounded up. Because the fence starts and ends with a post, there is always one more post than there are sections.
Gates change the count. A gate opening needs a post on each side, and the calculator subtracts the gate widths from the fence length and adds one post per gate. That's exact for gates set in a straight run; corners of L- or U-shaped fences need their own post, so work each run separately if the runs don't divide evenly by the spacing.
Rails and pickets
Rails run horizontally between posts. Two rails suit fences up to about 1.2 m (4 ft); privacy fences 1.5 to 1.8 m (5 to 6 ft) high normally get three, top, middle and bottom. The calculator multiplies the sections by the rails per section.
Pickets are counted over the fenced length: length ÷ (picket width + gap), rounded up. Use the actual width of the board, not its nominal size: a 1×6 is 5½ in (140 mm) wide. For a privacy fence, set the gap to zero. Gates are left out because their boards are usually cut to fit or come with the gate.
Setting posts below the frost line
In cold climates, wet soil that freezes expands and can lift a shallow post a little each winter, a process called frost heave. The fix is to set the bottom of the post below the depth the ground freezes. Fence posts aren't foundations, but the same physics applies, and the National Building Code of Canada's foundation rules show how seriously it is taken: Table 9.12.2.2 requires unheated foundations in clay and other frost-susceptible soils to reach the depth of frost penetration. That depth varies a great deal, from about 1.2 m in milder parts of the country to more than 2 m on the Prairies and in the North. In the US, local codes publish a frost depth for each county.
The calculator starts at 1,200 mm (about 4 ft) and lets you set any depth. Ask your municipality for the local value, and remember that the post's total length is the fence height plus the hole depth.
Concrete per hole
Each hole is a cylinder with a square post standing in it, so the concrete is the cylinder minus the post:
concrete = (π × (hole diameter ÷ 2)² − post width²) × depth.
A good hole is about three times the post width across. The calculator multiplies by the number of posts and divides by the bag yield printed on the manufacturer's data sheets: about 0.014 m³ for a 30 kg bag of Sakrete Concrete Mix, the usual size in Canada, and 0.60 ft³ for an 80 lb bag of Quikrete Concrete Mix. Fast-setting post mixes yield less per bag, so check yours.
Worked example: the calculator's defaults
The calculator opens with a 30 m fence, 1.8 m high, with one 1.2 m gate, posts at most 2.4 m apart, three rails per section, 140 mm pickets with 10 mm gaps, and 89 mm (4×4) posts in 250 mm holes 1,200 mm deep.
- Fenced length: 30 − 1.2 = 28.8 m, which is exactly 12 sections of 2.4 m.
- Posts: 12 + 1 + 1 gate = 14 posts, each 3.0 m long (1.8 m above ground plus 1.2 m below).
- Rails: 12 × 3 = 36 rails.
- Pickets: 28.8 ÷ 0.150 = 192 pickets.
- Concrete: (π × 0.125² − 0.089²) × 1.2 = 0.0494 m³ per hole, × 14 = 0.692 m³, or 50 bags of 30 kg.
At the default prices of $25 a post, $8 a rail, $4 a picket and $9 a bag, the materials come to $1,856 before fasteners, gate hardware and tax.
Before you dig
Call your provincial or state one-call service to locate buried gas, power and communications lines; it is free and required in most places. Check the municipal fence by-law for height limits, setbacks and pool-enclosure rules, and talk to your neighbour if the fence is on or near a property line.
More questions
Should fence posts be set in concrete or gravel?
Both work. Concrete gives the stiffest post and is the usual choice for gate posts and tall privacy fences. Compacted gravel drains better around wood posts and makes replacement easier, and some builders use gravel for line posts and concrete only at gates and corners. Either way, put a few inches of gravel at the bottom of the hole so water drains away from the end grain.
What kind of wood should I use for fence posts?
Posts in contact with the ground should be rated for ground contact: pressure-treated lumber labelled for in-ground use (UC4A or higher in the AWPA system, or the equivalent CSA O80 use category in Canada), or naturally durable heartwood such as cedar. Above-ground treated lumber rots quickly when buried.
How do I handle a fence on a slope?
You can either step the fence, with level sections that drop at each post, or rack it, with rails that follow the slope. Measure the length along the ground for the calculator; on steep ground, stepped sections need slightly longer posts on the downhill side to keep the height.
How do corners change the post count?
Each change of direction needs a post at the corner. If you enter the total length of an L-shaped or U-shaped fence, the calculator may count one post short per corner when the runs don't divide evenly by the spacing. For accuracy, work out each straight run separately and add the posts, subtracting one for each shared corner post.
How long should I wait before hanging rails and pickets?
Regular concrete mixes need a day or two to set enough to carry rails, and fast-setting post mixes are usually ready for building in about four hours. Follow the curing time on the bag, and brace posts plumb while the concrete sets.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.