Fence calculator: posts, rails, pickets and concrete
Enter the fence length, pick a style and post spacing, and get a materials list you can hand to the lumber yard, with a 2026 cost range by material.
Post spacing
Material (for the cost line)
150 ft of privacy, 6 ft (solid board), 19 sections at 8 ft
22 posts · 328 pickets
Posts include 2 per gate. Post length 8 ft (6 ft above grade plus 2 ft buried, use 3 ft in frost country).
Materials list
- Posts (4×4, 8 ft): 22
- Rails (2×4, 8 ft): 57
- Pickets (1×6, 6 ft): 328
- Concrete (50 lb bags): 44
- Screws or nails: ~2,196
- Gate kits (hinges + latch): 1
Materials cost, 2026
$1,950 to $3,400
$12 to $20 per linear ft plus $150 to $400 per gate.
Materials only. Installed, expect roughly double: labor on a fence runs $10 to $30 per foot depending on soil and access.

How the counts work
A fence is a row of sections between posts. Divide your total length by the post spacing and round up, and that is the number of sections. Posts are sections plus one, because a fence with three sections has four posts. Each gate adds two more posts, since a gate needs its own pair of posts set deeper and heavier than line posts, even where it falls at a corner.
Rails run horizontally between posts and carry the pickets. A 4 foot fence gets two rails, a 6 foot fence three; anything taller than 6 feet with only two rails will warp within a couple of summers. Rails are cut to your post spacing, so at 8 foot spacing you buy 8 foot 2×4s, one per rail per section.
Pickets are the boards you see. The calculator converts the fence length to inches and divides by the picket width plus the gap between pickets. A 6 foot privacy fence uses 1×6 boards, which are 5.5 inches wide, butted tight, so it is 12 ÷ 5.5, about 2.2 pickets per foot. A picket fence uses the same board with a 2.5 inch gap, so 1.5 per foot. Horizontal slat fences flip the math: boards run the length of each section, stacked 12 high for a 6 foot fence with half-inch gaps, so you buy sections × 12 boards at the post spacing length.
| Style | Height | Rails per section | Boards per foot | Concrete per post |
|---|---|---|---|---|
| Privacy (solid board) | 6 ft | 3 | 2.2 pickets | 2 bags |
| Picket | 4 ft | 2 | 1.5 pickets | 1 bag |
| Horizontal slat | 6 ft | 0 (boards are the rails) | 12 boards per section | 2 bags |
| Split rail | 3.5 ft | 2 | none | none, tamped |
| Chain link | 4 ft | 1 top rail | fabric by the foot | 1 bag |
Post spacing, post length and concrete
Eight feet on center is the default because lumber comes in 8 foot lengths and it means fewer holes. Six feet is the right call for a 6 foot solid privacy fence in a windy spot, because a solid fence is a sail and the load on each post goes up with the span. Six feet also makes a picket fence look better proportioned. The tradeoff is a third more posts and holes, which is where the labor is.
Posts go a third of their above-ground height into the ground, minimum, and below the frost line where there is one. For a 6 foot fence that means a 2 foot hole and an 8 foot 4×4 in mild climates, a 3 foot hole and a 9 or 10 foot post in the upper Midwest and Northeast. The calculator lists post length as height plus 2 feet; add a foot in frost country. Use 6×6 posts for gate posts and for any privacy fence over 6 feet.
Concrete per post depends on the hole. A 10 inch hole 2 feet deep around a 4×4 takes about 1.5 cubic feet of concrete, which is two 50 pound bags of fast-setting mix. A picket fence post in a smaller hole gets away with one. Split rail posts are tamped in with gravel and soil, not concreted, because the rails need to flex. Buy the fast-setting mix and pour it dry into the hole around the plumbed post, then add water: it sets in 20 to 40 minutes and you can hang rails the same day.
What a fence costs in materials, 2026
Per linear foot, materials only, with the cost box on the calculator using the low and high of each range. Pressure-treated pine is the budget floor and what most privacy fences are built from. Cedar costs 50 to 70 percent more, looks better, and does not need staining to survive, though it greys without it. Vinyl costs about the same as cedar, needs zero maintenance, and looks like vinyl. Chain link is the cheapest thing that keeps a dog in.
- A gate kit (hinges, latch, and the extra posts and boards) adds $150 to $400 per gate, more for a double drive gate.
- Installed, a fence company charges roughly double the materials: labor runs $10 to $30 per foot depending on soil, slope and access for the auger.
- Screws cost more than nails but hold better in wet wood. Budget about $30 per 100 feet of privacy fence for coated exterior screws.
| Style | Pressure-treated pine | Cedar | Vinyl |
|---|---|---|---|
| Privacy, 6 ft | $12 to $20 | $18 to $30 | $20 to $35 |
| Picket, 4 ft | $8 to $14 | $12 to $22 | $15 to $25 |
| Horizontal slat, 6 ft | $15 to $25 | $22 to $40 | $25 to $40 |
| Split rail | $6 to $10 | $8 to $14 | $12 to $20 |
| Chain link, 4 ft | $6 to $12 (galvanized) |
Before you dig
Call 811 first. It is free, it is the law in every state, and the utility locators mark buried gas, power and cable within a few days. Hitting a gas line with a post hole digger is the fence story nobody wants to tell.
Check the property line and the setback. Most municipalities cap a front yard fence at 3 or 4 feet and a back yard fence at 6, and many require the fence to sit a few inches inside the line. A survey pin at each corner is worth finding before the first post goes in, because moving a fence is twice the work of building one.
Then decide which side faces out. Convention and most ordinances put the finished side toward the neighbor and the rails toward you. A shadowbox or board-on-board design puts pickets on both faces, uses about 70 percent more boards, and ends the argument.
See the fence in your actual yard
Upload a photo, pick the style, and preview the privacy fence, the plantings in front of it, and the whole space. 3 free designs, no credit card.
Design my backyardFrequently asked questions
How many fence posts do I need for 100 feet?⌄
At 8 foot spacing, 100 ÷ 8 rounds up to 13 sections, so 14 posts. At 6 foot spacing, 17 sections and 18 posts. Add two posts for each gate. Corners count as posts in that total, not extra, unless the corner falls mid-section, in which case you add one and shorten the sections on each side.
How many pickets are in a 6 foot privacy fence?⌄
About 2.2 per linear foot with standard 5.5 inch wide 1×6 boards butted tight, so a 100 foot fence takes 219 pickets. Board-on-board or shadowbox styles, where pickets overlap on both sides, use roughly 3.7 per foot. Add 5 percent for split or warped boards you will reject at the yard.
How many bags of concrete per fence post?⌄
Two 50 pound bags of fast-setting mix per 4×4 post for a 6 foot fence, in a 10 inch hole 2 feet deep. One bag for a 4 foot picket fence in a smaller hole. Three or four for a 6×6 gate post in a 3 foot hole. Split rail posts get no concrete; they are backfilled with gravel and tamped soil.
Should fence posts be 6 or 8 feet apart?⌄
Eight feet for most fences, because lumber is sold in 8 foot lengths and you dig fewer holes. Six feet for a solid 6 foot privacy fence in an exposed, windy location, for vinyl (most panels are 6 feet), and for picket fences where the closer rhythm looks better. Never more than 8 with 4×4 posts.
How much does a 6 foot privacy fence cost per foot in 2026?⌄
Materials, $12 to $20 per foot in pressure-treated pine, $18 to $30 in cedar, $20 to $35 in vinyl. Installed by a contractor, $25 to $45 per foot for pine and $35 to $60 for cedar or vinyl. A 150 foot yard with one gate lands around $2,500 in pine materials if you build it yourself, or $4,500 to $7,000 installed.