On this page
- How to calculate fence materials
- How to use the fence calculator
- How many fence posts do I need?
- How many rails do I need?
- How many pickets do I need?
- How deep should fence posts be set?
- How much concrete does a fence post need?
- How far apart should fence posts be?
- Gates and openings
- Fence types and how the count changes
- Fences on a slope
- Wood for the posts, rails and pickets
- Call 811 before you dig
- Property lines, permits and HOA rules
- How much does a fence cost?
- Common fence mistakes
- Before you build the fence
- Frequently asked questions
How to calculate fence materials
Start with the fence length. Posts = sections + 1 (plus one per gate), rails = sections × rails per section, and pickets = fence length in inches ÷ (picket width + gap).

150 ft of 6 ft privacy fence with 8 ft sections and one 4 ft gate: 19 sections, 21 posts, 57 rails and about 335 pickets of 5½ in with 5% spare, set in about 31 bags of 80 lb concrete.
How to use the fence calculator
This tool turns the length, height and gates of your fence into a shopping list. The "How we calculated this" panel shows each step, and the PDF report keeps the list for your lumber yard.
Step 1: Enter the fence length and gates
Type the total length of the fence line in feet, the number of gates and the gate width. It takes the gates out of the run before it counts the sections, then adds a post for each gate.
Step 2: Choose the height, spacing and style
Pick the height, a post spacing of 6 or 8 ft, the post size, the picket width and the gap. Choose board-on-board if the boards overlap in two layers, and 1/2 of the height if your soil or climate calls for deeper posts.
Step 3: Add your prices
Type the price of a post, a rail, a picket and a bag of concrete to see the cost. Leave the prices blank if you only want quantities.
How many fence posts do I need?
Posts = fence length ÷ post spacing, rounded up, plus 1. Omni Calculator gives the same rule, and says post spacing is usually 6 to 8 feet. Add one more post for each gate, since the opening splits the run and needs a post on each side.
| Fence length | Posts at 8 ft spacing | Posts at 6 ft spacing |
|---|---|---|
| 50 ft | 8 | 10 |
| 100 ft | 14 | 18 |
| 150 ft | 20 | 26 |
| 200 ft | 26 | 35 |
| 300 ft | 39 | 51 |
How many rails do I need?
Rails are the horizontal boards that the pickets attach to. Rails = rails per section × the number of sections. Our default is 2 rails for fences under 6 feet and 3 rails for 6 feet and taller, and you can change it.
How many pickets do I need?
Pickets = the run in inches ÷ (picket width + gap), rounded up. It adds 5% spare for cuts and bad boards. A privacy fence has no gap, and a picket fence has a gap of an inch or more.
| Picket (width) | No gap | ½ in gap | 1 in gap | 2½ in gap |
|---|---|---|---|---|
| 1×4 (3.5 in) | 28 | 24 | 22 | 16 |
| 1×6 (5.5 in) | 18 | 16 | 15 | 12 |
The table shows pickets per 8 ft section, before spare boards. Board-on-board and shadow-box fences overlap two layers of boards. CalcSummit puts them at about 1.5 times the boards of a butted privacy fence.
How deep should fence posts be set?
QUIKRETE's method for setting posts in concrete has four parts:
- Hole width: three times the post width.
- Hole depth: 1/3 to 1/2 of the post height above ground, plus 6 inches.
- Gravel: 6 inches in the bottom, compacted, for drainage and to protect the post from rot.
- Concrete: fill to 3 to 4 inches below ground level, then backfill with soil.
Post depth at one third (the minimum) and one half of the fence height, with 6 inches of gravel under it:
| Fence height | Buried at 1/3 | Buried at 1/2 | Hole depth | Post length to buy (1/3) |
|---|---|---|---|---|
| 4 ft | 16 in | 24 in | 22–30 in | 6 ft |
| 5 ft | 20 in | 30 in | 26–36 in | 8 ft |
| 6 ft | 24 in | 36 in | 30–42 in | 8 ft |
| 8 ft | 32 in | 48 in | 38–54 in | 12 ft |
Frost line and cold climates
Frost heaving can push posts up when wet ground freezes, so in cold climates posts often go below the frost line. Your building department knows the local depth. CalcSummit gives 42 inches as an example for the Midwest, which is deeper than the 1/3 rule gives for a 6 ft fence.
How much concrete does a fence post need?
A fence post hole holds the concrete around the post. For a hole three times as wide as the post, filled to 3½ inches below grade, the number of 80 lb bags per post is the one below. The yield is 0.60 cubic feet per bag, from the QUIKRETE data sheet.
| Fence height | 4×4 post, 1/3 deep | 6×6 post, 1/3 deep | 4×4 post, 1/2 deep | 6×6 post, 1/2 deep |
|---|---|---|---|---|
| 4 ft | 0.9 | 2.2 | 1.5 | 3.6 |
| 5 ft | 1.2 | 2.9 | 1.9 | 4.7 |
| 6 ft | 1.5 | 3.6 | 2.3 | 5.8 |
| 8 ft | 2.0 | 5.0 | 3.2 | 7.9 |
QUIKRETE says fast-setting concrete sets in 20 to 40 minutes and takes heavy loads after about 4 hours. Set posts in concrete that is rated for it, and use a post that is rot-resistant wood, rust-resistant metal or an appropriate synthetic material.
Frost line, utilities and property lines
In cold climates, posts often need to go below the frost line, and many towns limit fence height and set it back from the line. Call 811 before you dig to have buried utilities marked.
How far apart should fence posts be?
Post spacing is the distance between the centers of two posts. Most wood fences put them 6 to 8 feet apart. An 8 ft spacing matches standard 8 ft rails and needs fewer posts, and 6 ft sections are stiffer. Choose the spacing before you buy rails so that each section ends on a post.
Gates and openings
Subtract each gate's width from the fence length, then count the sections for the rest. A gate needs a post on each side, and the hinge post carries the weight of the gate.
Fence types and how the count changes
This tool counts a wood fence with posts, rails and pickets. Other types use different parts:
- Wood privacy fence: boards side by side with no gaps. Use the no-gap option.
- Picket fence: boards with gaps of an inch or more, and fewer pickets per section.
- Board-on-board: two layers of overlapping boards for full privacy, with about 1.5 times the boards.
- Split-rail fence: posts and rails only, with no pickets. Ignore the picket count and use the post and rail counts.
- Chain-link and vinyl fence: parts come in fixed sizes. Hoover Fence has separate calculators for chain link, vinyl, ornamental aluminum, wood and split rail, so follow the maker's post spacing.
Fences on a slope
On a slope you can follow the ground (racking) or build level sections that step down. Measure the run along the ground for racked sections, and expect to buy taller pickets, or longer posts, for stepped ones. Add more spare pickets on a slope.
Wood for the posts, rails and pickets
Pressure-treated pine, cedar and redwood are the usual woods for fences. Posts are in contact with the ground, so use treated wood or another rot-resistant post, as QUIKRETE advises, and fasten the pickets with exterior screws or nails.
Call 811 before you dig
811 is the free national before-you-dig service. Contact it a few business days before you begin, and the utilities mark the approximate location of buried lines with paint or flags. Then dig carefully around the marks.
Property lines, permits and HOA rules
Fence height, setback from the line and materials are set locally, and an HOA may add its own rules. Check with your building department before you buy. A fence on the line needs a survey, so check the plat and the lot size to acres calculator for how lots are recorded.
How much does a fence cost?
Fence cost is the sum of each part: posts × price + rails × price + pickets × price + concrete bags × price. For example, with prices of $18 a post, $8 a rail, $3 a picket and $6.50 a bag, the 150 ft fence above costs about $2,040, or $13.60 a foot, before gates, hardware and labor. Type your own prices in the fence calculator.
Common fence mistakes
- Forgetting the end post. Posts are sections + 1, not sections.
- Not subtracting gates. The gate opening has no pickets, but it needs two posts.
- Setting posts too shallow. Use 1/3 to 1/2 of the height above ground, plus gravel.
- Skipping the spare boards. Buy about 5% more pickets for cuts and bad boards.
- Digging before 811. Have the buried lines marked first.
Before you build the fence
Measure the fence line, subtract the gates and choose the spacing, then let the fence calculator turn it into posts, rails, pickets and concrete. Check the local rules and call 811, and download the PDF report for the lumber yard.
Need concrete for a slab or footings instead? Use the concrete calculator.
Concrete calculatorFrequently asked questions
How many fence posts do I need?
Divide the fence length by the post spacing, round up for the number of sections, then add 1 for the end post and 1 more for each gate. A 150 ft run with 8 ft sections and one gate takes 21 posts.
How deep should fence posts be?
QUIKRETE's guide: dig the hole to 1/3 to 1/2 of the post's height above ground, plus 6 inches for a gravel layer. A 6 ft fence needs posts buried at least 2 ft, in a 30 inch hole. Local frost depth and code can require more.
How wide should a fence post hole be?
Three times the width of the post, according to QUIKRETE. A 4×4 post (3.5 in actual) needs a hole about 10½ inches across.
How far apart should fence posts be?
Most wood fences put posts 6 to 8 feet apart, center to center. Omni Calculator gives the same range. 8 ft sections match standard 8 ft rails; 6 ft sections are stiffer in high wind.
How many bags of concrete per fence post?
For a 4×4 post in a 10½ inch hole set 24 inches deep, with concrete to 3½ inches below ground, roughly 1.5 bags of 80 lb concrete mix. The calculator works it out from your post size and fence height.
How many pickets do I need for an 8 ft section?
With 1×6 boards (5½ inches wide) and no gaps, 96 inches ÷ 5.5 = 17.5, so 18 pickets. With ½ inch gaps it takes 16, and with 2½ inch gaps 12.
How many rails does a fence section need?
Our default is 2 rails for fences under 6 ft tall and 3 rails for 6 ft and taller. Multiply the rails per section by the number of sections.
How many extra boards does board-on-board take?
CalcSummit puts board-on-board and shadow-box styles at about 1.5 times the boards of a standard butted privacy fence. The calculator has a board-on-board option that applies the 1.5 factor.
Do I need to call 811 before I dig fence post holes?
Yes. 811 is the free national before-you-dig service. Call a few business days before you dig so the utilities can mark buried lines with paint or flags, then dig carefully around the marks.
How accurate is the fence calculator?
It is exact for the length, height, spacing and gates you enter. Slopes, corners, local frost depth and the real width of your boards change what you buy, so confirm them and round up.
Sources
