Fence Calculator: Posts, Rails and Pickets
Estimate the posts, sections, rails and pickets for a fence from its length, post spacing, gates and picket size.
How the calculation works
fenced length = total length − gates × gate width sections = fenced length ÷ post spacing, rounded up posts = sections + 1 + gates rails = sections × rails per section pickets = fenced length (in) ÷ (picket width + gap) × (1 + extra), rounded up Every gate opening needs a post on each side, which splits the line in two and adds one post in total.
Worked example
A 100 ft fence with one 4 ft gate has 96 ft of fence. At 8 ft between posts that is 12 sections, so 14 posts (12 + 1 + 1 gate) and 24 rails with 2 per section.
With 5½ in pickets and a ½ in gap, each picket takes 6 in: 96 × 12 ÷ 6 = 192 pickets, and 5 % extra makes 202 pickets. Without the gate the same line needs 14 posts and 210 pickets.
Assumptions and limits
- The fence is a straight line. For corners, calculate each straight run separately and subtract one post for every shared corner.
- Each gate opening needs a post on each side, so every gate adds one post in total.
- Post spacing, rails per section and picket size are inputs you choose from your product and design; the tool does not recommend them.
- Gate hardware, post caps, concrete for the post holes, fasteners and trim are not included. Slopes can change the lengths you need.
- Check local rules for height, permits and property lines before you build.
Frequently asked questions
How far apart should the posts be?
It depends on the panels or rails you use and the fence style, so this tool does not pick a spacing for you. Use the spacing in your product's instructions, and check local rules, which can also limit fence height and require permits.
How do I handle corners?
Calculate each straight run on its own and add the results. A corner post shared by two runs is counted twice, so subtract one post for every shared corner.
What is not included?
Gate hardware, post caps, concrete or gravel for the post holes, fasteners and any trim. Slopes, steps in the fence and uneven ground can change the lengths you need.
What picket width should I enter?
Enter the real width of the board you will buy. A board sold as "1×6" is usually narrower than 6 inches, often about 5½ in, but it varies, so measure one.
Before I dig?
Know where your property lines and buried utilities are. In the U.S. you can call 811 before digging to have public utilities marked.
Sources
- Geometry: posts = sections + 1 + gates; pickets = fenced length (in) ÷ (picket width + gap)
- Spacing, rails and picket width: entered by the user from the product they plan to buy (the tool does not assume a style or brand)
Guides that help
More calculators
-
Gravel and Stone Calculator
Estimate how many cubic yards and how many tons of gravel, crushed stone or sand you need for an area and a depth, with typical weights by material.
-
Concrete Slab Calculator
Estimate the concrete for a rectangular slab in cubic yards and in 40, 50, 60, 80 or 90 lb bags, with a waste allowance.
-
Paint Calculator
Work out how much paint a room needs from its size, doors, windows, number of coats and the coverage printed on the can.