Fence calculator
Enter the total length of fence you are building and how it will be laid out. The calculator counts posts, rails and pickets for a wood picket or privacy fence, with a few spare pickets for splits and bad boards.
Tools for building a fence
As an Amazon Associate I earn from qualifying purchases. Links open Amazon search results; we don't pick or test specific products.
How the estimate works
Gate openings are taken off the total length, because gates are bought or built separately. The remaining fence is split into sections no longer than your post spacing. Each run needs one more post than it has sections, so the calculator counts one post per section plus one to finish the run, then adds one post for each corner and one for each gate, so both sides of every gate have a post. Rails are the number of sections times the rails per section. Pickets are the fence length in inches divided by the picket width plus the gap, rounded up, with a few spares added.
How to use this calculator
- Measure the fence line with a long tape or measuring wheel and enter the total length in feet, including gate openings.
- Choose a post spacing. 8 feet is common; 6 feet is stronger in windy areas or for tall privacy fences.
- Enter the number of corners along the fence line, and the number and width of gates.
- Enter the actual picket width (a nominal 1 x 6 is about 5.5 inches) and the gap you want between pickets. Use 0 for a solid privacy fence.
Worked example
A 100 ft privacy fence with one 4 ft gate leaves 96 ft of fence. At 8 ft spacing that is 12 sections, so 12 + 1 to finish the run + 1 for the gate = 14 posts. With 3 rails per section you need 36 rails. With 5.5 inch pickets and no gap, 96 ft is 1,152 inches, which takes 210 pickets; with 5% spare, buy 221 pickets.
Common mistakes to avoid
- Not checking property lines and permits. Many towns limit fence height and require a permit or a setback from the line.
- Skipping the utility locate. Call 811 in the US a few days before digging post holes.
- Using the nominal picket width. A "6 inch" picket is usually about 5.5 inches wide, which adds up over a long fence.
- Setting posts too shallow. A common rule is to bury about a third of the post's above-ground height, and deeper where the ground freezes.
Frequently asked questions
How many fence posts do I need for 100 feet?
At 8 foot spacing, a straight 100 foot run has 13 sections and needs 14 posts, plus extra posts for each gate and corner.
How far apart should fence posts be?
Most wood fences use 6 to 8 feet between posts. Closer spacing makes a sturdier fence, especially for tall privacy fences in windy areas.
How many pickets are in a foot of fence?
With 5.5 inch pickets and no gap, about 2.2 pickets per foot. With a 2 inch gap, about 1.6 per foot.
How deep should fence posts be set?
A common rule is one third of the post height above ground, and at least below the frost line in cold areas. Check your local code.
Related calculators
- Concrete calculator: Bags of premixed concrete, useful for setting posts.
- Gravel calculator: Gravel for drainage under posts or a path along the fence.
- Paint calculator: Stain or paint for the finished fence.
Last reviewed November 30, 2026. Found a mistake? Let us know.