Fence Calculator
Estimate posts, sections, vertical pickets or boards, and horizontal rail quantities for one continuous straight fence run.
Instant estimate · No sign-up · Your measurements stay in your browser
Project details
Enter your measurements
Enter your project measurements. Planning defaults are identified where used. After your first calculation, edits update the estimate automatically.
Project estimate
Results
Enter your measurements, then select Calculate.
How to use this calculator
Use this focused fence material calculator for one continuous straight run of vertical pickets or boards. Enter the net run after excluding gate openings, then supply the spacing, actual board dimensions, gap, and rail count appropriate for your fence system and project.
- Measure the continuous straight fence run. If it includes a gate opening, subtract that opening and estimate the gate separately.
- Enter the maximum post spacing applicable to your fence system or project; the calculator uses it to divide the run into whole sections.
- Enter the actual installed face width of the vertical picket or board and your planned gap between adjacent pickets.
- Enter the number of horizontal rails planned for each section, then adjust the optional picket extra allowance.
Formula and methodology
Sections = straight fence run ÷ maximum post spacing, rounded up. Posts = sections + 1 for one continuous straight run with a post at each end. Average section length = run ÷ sections. Because N pickets create N − 1 internal gaps, pickets = (run + gap) ÷ (actual picket face width + gap), rounded up. Estimated picket purchase quantity adds the selected extra percentage and rounds up. Rail pieces/runs = sections × rails per section. Installed rail length = run × rails per section.
Important: This calculator estimates material quantities only. It does not determine structural design, post depth, footing size, wind loads, property lines, permits, code compliance, or installation safety.
How accurate is this estimate?
Fence length, section count, picket coverage, and rail quantities are calculated from the measurements and project values entered. Actual material quantities may vary because of fence style, board dimensions, cuts, gates, terrain, installation layout, damaged material, manufacturer requirements, and site conditions. The selected extra percentage is a user-controlled planning allowance, not a structural requirement.
Worked example
Example calculation only — the dimensions and spacing below demonstrate the math and are not construction recommendations.
For a 100 ft net straight run, an entered maximum spacing of 8 ft gives ceil(100 ÷ 8) = 13 sections and 14 posts under the stated straight-run assumption. Average section length is about 7.69 ft. Converting the run to 1,200 in, entered 5.5 in picket faces and a 0.25 in gap give ceil((1,200 + 0.25) ÷ (5.5 + 0.25)) = 209 pickets. A selected 10% extra gives ceil(209 × 1.10) = 230 estimated purchase pickets. Three entered rails per section give 39 rail pieces/runs and 300 linear ft of installed rail length.
Before you buy
- Maximum post spacing, rail count, and board dimensions depend on the fence system, manufacturer, material, height, site, wind exposure, soil, local requirements, and installation method.
- The calculator estimates one straight run only. It excludes gates, corners, direction changes, slopes, stepped layouts, post holes, concrete, hardware, and fasteners.
- Verify actual board dimensions and supplier stock lengths before purchasing; nominal dimensions, cuts, splices, and damaged material can change the order.
- If you already know the applicable post-hole dimensions for your project, use the Concrete Calculator to estimate that concrete volume separately. The Concrete Calculator does not determine appropriate hole dimensions.
Frequently asked questions
How many fence posts do I need?
For the one continuous straight run modeled here, the calculator divides the net run into whole sections using your entered maximum spacing, then adds one post for the other end. Gates, corners, and direction changes are excluded and may require a different layout.
How does post spacing affect the estimate?
A shorter entered maximum spacing can create more calculated sections and posts. If the run does not divide evenly, the calculated average section length is shorter than the entered maximum. Verify the spacing applicable to your fence system and local requirements.
How many fence pickets or boards do I need?
The calculator divides the net run by the installed module formed by actual picket face width plus the planned gap, while accounting for one fewer internal gap than boards. It rounds the base count up, then applies and rounds up the selected extra allowance.
Does the calculator include gates?
No. Exclude gate openings from the straight fence run and estimate gate framing, posts, hinges, hardware, and other gate materials separately.
Does it calculate concrete for fence posts?
No. After you determine the appropriate post-hole dimensions for your own system and project, the Concrete Calculator can estimate the corresponding rectangular volume separately. Neither calculator chooses footing or hole dimensions.
Does this determine post depth or building-code requirements?
No. It does not determine post depth, footing size, structural suitability, wind loading, permits, property-line requirements, or code compliance. Verify applicable manufacturer, project, professional, and local requirements.
Should I buy extra fence boards?
The editable extra percentage is a planning choice for factors such as cuts, damage, and small measurement differences. Set it to the allowance appropriate for your project, including zero if desired.