Enter your fence length and height to get the posts, rails, boards, and concrete to buy. Results update as you type.
How to use this calculator
- Enter the length of one straight run and the fence height, then pick Privacy (boards set tight together) or Picket (boards with a gap). The result updates as you type.
- Corners or a gate? Run the calculator once per side and add the materials, then subtract one post, and its concrete, for each corner two sides share. Every corner and both sides of a gate need a post. Measure the gate opening out of the side it sits in.
- Open “More options” to change the maximum post spacing (8 feet is a common upper limit for wood fences), the waste on boards, the units, or the prices. Tick “Closed loop” when a single run goes all the way around and ends at the post it started from; it then has one post per section.
- The cost uses editable sample prices, not live store prices. Enter the figures from your lumber yard in “More options” if you want a total you can use for planning.
The formula
posts = sections + 1 (open run), or posts = sections (closed loop)
rails = sections × rails per section
base boards = round up(length ÷ (board width + gap))
boards or pickets = round up(base boards × (1 + waste %))
concrete bags = bags per hole × number of posts
Boards are rounded twice, in this order: first the number needed to cover the length is rounded up to whole boards, then the waste percentage is added to that whole number and the total is rounded up again. In the 80-foot example, 174.5 becomes 175 base boards, and 175 × 1.10 = 192.5 becomes 193.
Rails default to three per section when the fence is 5 feet (1.5 meters) or taller, and two per section when it is shorter. Some fence styles use a different rail count; adjust the rail result if yours does.
Privacy boards are counted at 5.5 inches (140 mm) wide with no gap, the usual face width of a 1×6. Pickets are counted at 3.5 inches (89 mm) wide, the usual face width of a 1×4, with a 2.5 inch (64 mm) gap. Those are planning defaults, not a cutting list for every product.
Each post hole is modeled as a 10-inch (254 mm) diameter cylinder. Depth is one-third of the fence height, or 1.5 feet (0.46 m), whichever is greater, so a 6-foot fence is calculated at 2 feet deep. Bag count uses a typical yield of 0.375 cubic feet for a 50 lb bag of concrete mix, rounded up per hole. In frost-prone areas, holes often need to go below the frost line, which may take more concrete.
Worked example
Take an 80-foot run of 6-foot privacy fence with posts at most 8 feet apart. That is 10 sections, 11 posts, and 30 rails (three rails per section). At 5.5 inches per board and 10% waste, the board count is 193. Holes 2 feet deep and 10 inches across need 3 bags of 50 lb concrete each, or 33 bags in all. Change the sample prices to your local figures before you use the cost as a budget.
Frequently asked questions
What about corners and gates?
The calculator spaces posts evenly along one straight length, so enter each side separately, add the results, and subtract one post (and its concrete) for every corner two sides share. For example, a 13 × 11 ft garden fenced all the way around with posts at most 8 feet apart needs 8 posts, not the 6 you get by entering the 48-foot perimeter at once. Gates are not included: leave the gate opening out of the side it sits in and plan a post on each side of it.
What post spacing should I use?
Eight feet is a common maximum for wood fences, because rails are often sold in 8-foot lengths. The calculator never places posts farther apart than the spacing you enter; it divides the run into equal sections that are that long or shorter. Use 6 feet for a stiffer fence or in windy spots.
What does waste on boards mean?
It is extra boards or pickets for split, warped, or miscut pieces. 10% is a common allowance. The calculator rounds the base board count up first, adds the waste percentage, then rounds up again.
How deep should posts be set?
This calculator uses a common planning rule: about one-third of the fence height in the ground, with a minimum of 1.5 feet. Soil, wind, and frost can require a deeper hole. Confirm post length with your supplier; an 8-foot post is often used for a 6-foot fence so that two feet can sit in the ground.
Can I enter meters?
Yes. Switch Units to Meters. Length, height, and spacing are converted; the math does not change. Results are still given as whole posts, rails, boards or pickets, and bags.
What do the sample prices mean?
They are editable placeholders used only to estimate a materials total. They are not quotes, averages, or current store prices. Open “Edit sample prices” and replace them with numbers from your yard. If you leave the defaults, treat the dollar amount as an example only.
Results are planning estimates for a wood fence, not a cutting list, a structural design, or a permit review. Confirm quantities, post depth, and local requirements with your supplier or a professional. See all tools.