Fence Calculator – Posts, Rails, Pickets, and Concrete
Our free fence calculator tells you how many posts, rails, and pickets you need for a wood fence, how deep to set the posts, and how many bags of concrete to buy. Enter each side of the fence with its gates, pick the height, the post spacing, and the style, and you get a complete material list with gate hardware, fasteners, and cost.
How to Use the Fence Calculator
- Enter each side. Type the length of each side in feet and the number of gates on it. Tap “Add another side” for every straight run.
- Connect the sides. When the sides meet at corners, keep “Sides meet at shared corner posts” checked. The calculator then counts each corner post once.
- Set the height and spacing. Most wood fences are 4 or 6 feet high with posts 8 feet apart. Use 6 feet for windy spots or heavy boards.
- Pick the posts and the gate width. 4×4 posts are standard, 6×6 posts carry gates and tall fences better.
- Choose the style. A privacy fence has no gaps between the boards. A picket fence has a gap, usually 2 to 3 inches.
- Add prices. Enter the price per post, per rail, and per picket to see the material cost.
- Copy or print. Take the list to the lumberyard.
How the Fence Calculator Counts
For each side, the calculator works through these steps:
- Fence length without gates = side length − gates × gate width
- Sections = fence length ÷ post spacing, rounded up
- Posts = sections + 1 + one more per gate (a gate needs a post on both sides)
- Rails = sections × rails per section, plus a frame for each gate
- Pickets = side length ÷ (picket width + gap), rounded up
Connected sides share their corner posts, so the total drops by one for each corner.
Example: 100 Feet of Privacy Fence
A straight run of 100 feet, 6 feet high, with one 4 foot gate. Without the gate, there are 96 feet of fence, which is 12 sections of 8 feet. That makes 13 posts plus 1 for the gate, so 14 posts. A 6 foot fence gets 3 rails per section: 36 rails plus 3 for the gate frame, so 39 rails of 8 feet. With 5 1/2 inch boards and no gap, the 1,200 inches of fence and gate need 219 boards. Each post is set 24 inches deep, so you buy 8 foot posts, and the 14 holes take 25 bags of 80 lb concrete.
Example: Picket Fence With Two Sides
A 4 foot picket fence along two sides of a front yard, 50 feet and 30 feet, meeting at one corner, with a 4 foot gate on the long side. The long side has 46 feet of fence, which is 6 sections and 8 posts with the gate post. The short side has 4 sections and 5 posts. The shared corner post brings the total to 12 posts. A 4 foot fence uses 2 rails per section, so 22 rails with the gate frame. With 3 1/2 inch pickets and a 2 1/2 inch gap, you need 160 pickets, and 6 foot posts are enough.
How Deep Should Fence Posts Be?
A common rule is to bury one third to one half of the fence height, and at least 24 inches, plus about 6 inches of gravel at the bottom of the hole for drainage. The hole should be about three times as wide as the post. The calculator uses the lower end, one third, as a guide value. A similar rule appears in the setting instructions of concrete makers such as Quikrete:
| Fence height | Post in the ground | Hole depth with gravel | Post to buy |
|---|---|---|---|
| 3 ft | 24 in | 30 in | 6 ft |
| 4 ft | 24 in | 30 in | 6 ft |
| 6 ft | 24 in | 30 in | 8 ft |
| 8 ft | 32 in | 38 in | 12 ft |
In cold regions, set the posts below the frost line so frost heave cannot push them up. Your local building department knows the frost depth for your area. Gate posts carry more load, so many builders set them deeper or use 6×6 posts.
How Much Concrete per Fence Post?
The concrete fills the hole around the post, above the gravel. For a 4×4 post (3 1/2 inches actual size) in a 10 1/2 inch hole, 24 inches deep, that is about 1.03 cubic feet per post. The calculator uses the bag yields from the Quikrete data sheets:
| Bag | Yield | Bags per 4×4 post (24 in deep) |
|---|---|---|
| 80 lb Concrete Mix | 0.60 cu ft | about 1.7 |
| 50 lb Fast-Setting Concrete Mix | 0.375 cu ft | about 2.75 |
The calculator adds up the concrete for all posts before rounding, so you do not buy a half-empty bag for every hole. Fast-setting mix is poured dry into the hole and then soaked with water, which makes it popular for fence posts. Regular mix is mixed first and is cheaper per cubic foot.
Rails, Pickets, and Gates
- Rails: fences up to 4 feet high usually have 2 rails per section. Taller fences need 3 so the boards do not warp. With posts 8 feet apart, 8 foot 2×4 rails span one section.
- Pickets and boards: 1×6 boards are 5 1/2 inches wide, 1×4 boards 3 1/2 inches. Privacy fences butt the boards tight or overlap them in a shadowbox pattern, which needs more boards.
- Fasteners: two screws or nails per board at each rail. Use galvanized or stainless fasteners, because plain steel stains the wood and rusts.
- Gates: plan 2 hinges for low gates and 3 for gates over 5 feet, plus a latch. A diagonal brace keeps the gate from sagging.
Tips Before You Build
- Call 811 before you dig. The free service marks buried utility lines a few days before you start.
- Check the rules. Many towns limit fence height, often to 4 feet in front yards and 6 feet in back yards, and want a permit. HOAs may have their own rules.
- Find the property line. Build a few inches inside it, and talk to your neighbors before you start.
- Use ground-contact posts. Our guide on how to treat wood for ground contact explains which lumber lasts in the soil.
- Protect the wood. A fence lasts much longer with a finish. Compare the best exterior wood stain, see the best stain for cedar for cedar fences, and read can you paint pressure-treated wood for treated pine.
Privacy and Honest Limits
The fence calculator runs entirely in your browser. There is no sign-up, and nothing you enter is sent anywhere. It plans straight wood fences on level ground. Slopes, stepped panels, chain link, vinyl panels, and decorative tops need their own planning. Post depths and concrete amounts are guide values, and the frost depth and local code always come first.
More Free DIY Tools
All our tools are free, run in your browser, and need no account.
- Concrete Calculator: work out cubic yards and bags of concrete for slabs, footings, and posts.
- Board Foot Calculator: turn your cut list into board feet and lumber cost.
- Paint Calculator: find out how many gallons of paint your room needs.
- Tile Calculator: count the tiles, boxes, and grout for your floor or wall.
- Wallpaper Calculator: see how many rolls of wallpaper you need.
- Square Footage Calculator: add up rooms and odd shapes in square feet and square yards.
- Gravel Calculator: find the cubic yards, tons, and bags of gravel for your project.
- Mulch Calculator: work out how many bags or yards of mulch your beds need.
- Stair Calculator: plan risers, treads, and stringers for your stairs.
- Drywall Calculator: count the drywall sheets, screws, and joint compound for a room.
- Deck Calculator: count deck boards, joists, and screws for your deck.
- Sand Calculator: work out the cubic yards, tons, and bags of sand you need.
Frequently Asked Questions
How Do I Calculate How Many Fence Posts I Need?
Divide the fence length by the post spacing and round up to get the sections. Add one post, plus one more for each gate. For 96 feet of fence with 8 foot spacing, that is 12 sections and 13 posts.
How Many Bags of Concrete per Fence Post?
For a 4×4 post in a 10 1/2 inch hole set 24 inches deep, plan about 1.7 bags of 80 lb concrete or about 2.75 bags of 50 lb fast-setting mix per post.
How Deep Should a Fence Post Be?
Bury about one third of the fence height, at least 24 inches, plus 6 inches of gravel. In cold climates, go below the frost line.
How Far Apart Should Fence Posts Be?
Six to eight feet. Eight feet is the most common spacing for wood fences because rails come in 8 foot lengths. Use closer spacing in windy areas.
How Many Pickets Do I Need for a Fence?
Convert the fence length to inches and divide by the picket width plus the gap. 100 feet of 5 1/2 inch boards with no gap needs 219 boards.
How Many Rails Does a Fence Need?
Two rails per section for fences up to 4 feet, three for 6 foot fences. Each gate needs its own rails for the frame.
Is the Fence Calculator Free?
Yes. It is free, needs no account, works in feet or meters, and lets you copy or print the result.








