Enter fence length, post spacing, and picket dimensions to calculate posts, rails, pickets, and material cost.
How to Use the Fence Calculator
Enter the total fence length, how far apart posts will sit, and the picket width and gap you're planning. Add per-unit prices for posts, rails, and pickets to see a total material cost alongside the parts count.
A wood fence is really three separate parts lists layered on top of each other — posts set at fixed intervals, horizontal rails spanning between them, and vertical pickets nailed across the rails — and each one uses a different piece of the same length measurement.
Posts and Rails
posts = ceil(fence length ÷ post spacing) + 1
rails = (posts − 1) × rails per section
Eight feet on-center is standard spacing for most residential wood fence posts; taller or heavier fence styles sometimes tighten that to six feet to keep the rails from sagging. The extra "+1" post accounts for the run's far end — a fence with four 8-foot sections needs five posts, not four.
Picket Count
picket count = ceil((fence length in inches) ÷ (picket width + gap))
Pickets get counted by on-center spacing rather than raw width, the same principle the baluster and deck board calculators on this site use — a picket occupies its own width plus whatever gap sits next to it, and that combined figure determines how many fit along the run.
Every price field defaults to zero. Lumber and vinyl fencing pricing swings too much by region and supplier for a built-in number to mean anything — enter your own quotes.