Geometry and sections
Gate openings split each run into solid fence segments. For every positive segment, calculate sections = ceil(segment length ÷ maximum spacing), then add the section counts. Within each segment the sections are equally long, so the actual spacing is segment length ÷ sections and never exceeds the chosen maximum. Runs are entered as a connected sequence; unrelated fence lines should be calculated separately.
Run lengths include gate openings. Enter the solid segments in order so that their lengths plus the gate widths equal the run length within 0.01 ft. A zero segment at the beginning or end explicitly places a gate at an end or corner; internal segments must be positive. Touching or overlapping gates are unsupported.
The post count adds intermediate posts and unique physical endpoints, corners, and gate edges. Connected runs share one corner post; an end or corner coinciding with a gate edge is counted once. The finished fence length used for labor excludes openings. The calculator does not infer property boundaries or resolve intersecting lines.
Boards and rails
For each solid segment, the base board count is ceil((segment length × 12 + gap) ÷ (actual board width + gap)), with dimensions in inches in the ratio. Counts are summed across segments before the waste allowance is applied. This assumes vertically installed boards and does not optimize or reuse cutoffs.
For each section, stock rails are estimated as ceil(section length ÷ rail stock length) × rail rows. The selected waste percentage is applied to boards and rails only; purchase quantities round up. Posts are counted from layout points rather than from the material waste setting.
Illustrative 100 ft example
Inputs: one 100 ft solid run, 8 ft maximum spacing, 5.5 in actual board width, 0 in gap, three rail rows, 8 ft rail stock, and 10% waste. The model gives 13 sections; 219 base boards and 241 after waste; 39 base rails and 43 after waste; and 14 line posts. This example is not a recommended design for a particular site.
Example with a gate
A 20 ft run with an interior 4 ft opening and solid segments of 8 ft on each side has 16 ft of fence, two sections at an 8 ft maximum spacing, and four unique posts. With 5.5 in boards, zero gap, three rows of 8 ft rails and 10% waste, it needs 36 base boards (40 to buy) and six base rails (seven to buy). Gate lumber and hardware are separate. This is an arithmetic example, not an approved gate design.
Rail length warning
If any section exceeds the purchased rail length, the displayed rail quantity is not a reliable construction takeoff. Increase the stock length or reduce maximum post spacing. This model does not support a load-bearing rail splice between posts.
Costs and unknowns
Materials equal purchased quantities times their unit prices, plus a gate-material amount when openings exist. Installation labor equals solid fence length times the entered labor rate; DIY excludes labor. Enabled removal equals removal length times removal rate. Entered delivery, fasteners, concrete, permits and sales tax are added separately.
A blank amount is unknown and is never treated as zero. An explicit zero is accepted. A known subtotal contains only supplied amounts; a complete scoped estimate requires all applicable costs to be provided or explicitly set to zero. A labor-only estimate is kept separate from materials to avoid double-counting. Do not enter an all-inclusive installed rate as a labor-only rate.
No default lumber prices or local labor rates are asserted here. Any future reference price must identify its product or scope, geography, observation and verification dates, method, and source; stale or unverified values should not be used automatically.
What this model does not decide
It does not check easements, permits, HOA rules, utility locations, wind loads, soil, slopes, drainage, post depth, footing size, species, lumber grade, fasteners, or gate engineering. Confirm local requirements and construction details with the relevant authority and a qualified professional. Review the source register.