Wood & Trim
Fence Calculator
Count bays, posts, rails and vertical boards for one ungated run or closed loop.
Enter your measurements
Results update as you type.
About this calculator
Count bays, posts, rails and vertical boards for one ungated run or closed loop. Enter your measurements and check the worked example below. Product quantities use the label information you supply.
How to measure
- Measure the actual usable surface or internal space, using the field labels for the selected mode.
- Keep openings and excluded areas separate so they are subtracted once.
- Recheck units and label coverage before ordering.
How to use this calculator
- Measure one ungated run and choose open run or closed loop.
- Enter the specified maximum bay spacing and rails per bay.
- Enter actual vertical-board face width and the planned gap.
- Read posts, full rail pieces and boards separately; deduplicate shared endpoints on your overall plan.
Formula
Bays = ceiling(run / maximum spacing); posts = bays + 1 for open runs, bays for closed loops
Rails = bays × rails per bay, with one full rail piece per bay per level
Open-run boards = ceiling((length + gap) / (board width + gap)); closed-loop boards = ceiling(length / pitch); apply extra once
Assumptions
- The model covers one ungated run or closed loop with even bays.
- Rails are counted as one full piece per bay per level; supported joints and offcut reuse are not designed.
- Board gaps occur between boards; extra material applies once to the board count. Shared endpoints need manual deduplication.
Common mistakes
- Applying the same allowance in both measurements and the extra-material field.
- Entering coverage or yield from a different product or measurement basis.
- Treating a quantity estimate as an installation or structural approval.
Worked example
Try it: press “Load example” above the form.
A 30 m open run with 2.5 m maximum bays has 12 bays and 13 posts. Two rails per bay need 24 rail pieces; 100 mm boards with no gap need 300 boards.
Limitations
Estimate each ungated run separately. Gate posts, hardware, corners, shared endpoints, horizontal-board layouts and rail joining are not included. Deduplicate shared posts on your plan. Wind, footing depth, spans and structural suitability require separate design.
Frequently asked questions
How are posts and rails counted?
The run is divided into whole evenly spaced bays. An open run has one more post than bays; a closed loop shares its start/end post. Rails are full pieces per bay per level, without a rail-joining design.
What does the worked example show?
A 30 m open run with 2.5 m maximum bays has 12 bays and 13 posts. Two rails per bay need 24 rail pieces; 100 mm boards with no gap need 300 boards.
Are gates, shared corners and supported joints included?
No. Estimate ungated runs separately, deduplicate shared endpoint posts on the full plan, and add gates and hardware separately. Rails are counted as full pieces per bay; joining and supports need a project design.
What does this fence quantity model exclude?
Estimate each ungated run separately. Gate posts, hardware, corners, shared endpoints, horizontal-board layouts and rail joining are not included. Deduplicate shared posts on your plan. Wind, footing depth, spans and structural suitability require separate design.
Sources
Sources explain the methods and any named product presets. Check your product label where coverage, yield or density differs.
- NIST: Revised Unit Conversion Factors
- Defined geometric and purchase-quantity model
Formulae on this page define the arithmetic model. Worked examples are illustrative, not product or installation recommendations.
Calculation documentation · Updated 2026-11-11 · Version 1.6.4. Estimates are planning aids. Confirm quantities, coverage and prices with your supplier before purchasing. Found an error? Report it.
Related calculators
All Wood & Trim calculatorsFence Post Calculator
Lay out fence posts at even spacing along an open run or a closed perimeter.
Open →Lumber Calculator
Convert finished piece counts into stock lumber to buy.
Open →Board Foot Calculator
Convert lumber dimensions into board feet and cost, per row and in total.
Open →Roof Pitch Calculator
Convert between rise/run, X:12 pitch, roof angle in degrees and percent grade.
Open →Rafter Length Calculator
Estimate common-rafter slope length from span, ridge, overhang and pitch.
Open →Deck Board Calculator
Estimate the number of deck boards from deck size, board width, gap and stock length.
Open →