Fence sections
—spaces between postsHome improvement tools
Fencing calculator
Planning a new fence can be easier when you know how much material you need before you start. This fencing calculator estimates the basic materials for a straight fence run using a few simple measurements. Whether you are planning a backyard privacy fence, replacing an old fence, or working on a DIY project, this fencing calculator gives you a quick starting estimate.
Built for simple, straight fence runs with no gates or corners.
A visual guide

Step 01 · Measurements
Tell us about your fence
Step 02 · Your estimate
Your fence materials
Rounded up so the full fence length is covered.
Fence posts
—one post at each endPickets
—based on total fence lengthRails
—across all fence sectionsHow we calculated this
A simple starting point
How to use the fencing calculator
- 01Use the visual guide.
The fence diagram beside the input card shows where Fence length, Post spacing, Picket width, Picket gap, and Rails per section are measured.
- 02Enter fence length and post spacing.
In the first row, enter the total straight fence run in feet and the center-to-center distance between posts. If your layout has corners or gates, calculate each straight run separately.
- 03Enter picket details and rails.
In the next row, enter the width of each picket and the gap between boards in inches. Then enter the number of rails installed between each pair of posts.
- 04Click Calculate fence.
The results card shows your estimated sections, posts, pickets, rails, fence length, and effective picket coverage. Open “How we calculated this” to review the formulas.
Plan with confidence
How does the fencing calculator work?
Our fencing calculator uses five basic inputs: fence length, post spacing, picket width, picket gap, and the number of rails per section. Enter your measurements in feet and inches, then select Calculate fence to see the estimated number of fence sections, posts, pickets, and rails.
For example, if your fence is 120 feet long and your posts are spaced 8 feet apart, the calculator determines how many sections are needed and adds one additional post for the end of the fence run. You can also specify the width of your pickets and the gap between them to calculate the number of pickets needed.
The math, made plain
How to calculate fence materials
A fence section is the distance between two adjacent posts. Because the last section may be shorter than your chosen spacing, the number of sections is always rounded up. A straight run then needs one more post than sections.
CEILING(Fence Length ÷ Post Spacing)Sections + 1Picket Width + Picket GapCEILING((Fence Length × 12) ÷ Effective Picket Width)Sections × Rails per SectionExample: a 100-foot fence
With posts every 8 feet, 6-inch pickets with no gap, and 2 rails per section:
Sections = CEILING(100 ÷ 8) = 13
Posts = 13 + 1 = 14
Pickets = CEILING((100 × 12) ÷ 6) = 200
Rails = 13 × 2 = 26Final estimate: 13 sections · 14 posts · 200 pickets · 26 railsFor spaced board designs
Picket fencing calculator
A picket fencing calculator is particularly useful when the fence design includes spaces between individual boards. Even a small change in the picket gap can affect the total number of boards required.
The calculator combines the picket width and gap to determine how much horizontal space each picket covers. It then divides the total fence length by this effective coverage and rounds the result up to the next whole picket.
For wood fence projects
Wood fencing calculator
If you are building a wooden fence, this wood fencing calculator can help estimate the primary components before purchasing materials. It calculates the number of posts based on your selected post spacing, while rails are calculated from the number of sections and rails installed in each section.
The estimate is designed for a straightforward fence without gates or corners. More complex fence layouts may require additional calculations.
A clear starting point
Choosing the best fencing calculator
The best fencing calculator is one that is easy to use and clearly explains how each result is calculated. Instead of simply providing a number, this tool shows the formulas behind the estimate so you can check the results yourself.
This fencing calculator is intended as a basic material estimate for straight fence runs. Actual material requirements can vary depending on fence design, installation methods, local requirements, cuts, and other project-specific factors.
Questions, answered
Fencing calculator FAQ
How many fence posts do I need?
For a straight fence run, calculate the number of sections by dividing fence length by post spacing and rounding up. Then add one: Posts = Sections + 1. For example, 100 feet with posts every 8 feet needs 13 sections and 14 posts.
How many pickets do I need for a fence?
Convert the total fence length to inches, then divide by the picket width plus the gap between pickets. Round the result up. This uses the total length directly, so a shorter final section is not over-counted.
Should I use 2 or 3 rails per section?
Two rails are a common starting point for many basic fence designs, while three rails can add support for taller or heavier fences. Use the number in your plans and check local requirements for your project.
Does this calculator include gates or corners?
No. It is designed for a simple straight fence run with no gates, corners, or direction changes. Calculate each straight run separately when your layout is more complex.
Can I use this as a picket fencing calculator?
Yes. Enter the width of each picket and the gap between boards to estimate how many pickets are needed for your picket fence design.
Is this a wood fencing calculator?
Yes. This tool estimates the basic posts, pickets, and rails commonly used in a straightforward wood fence project. It does not calculate pricing, concrete, labor, gates, or waste.