
Quick answer
A fence calculator splits each run into sections at your post spacing, 8 ft on center at most, then counts posts as sections plus one per run, minus shared corners. Rails are sections times rails per section. Pickets are run inches divided by picket plus gap. Holes go a third of the post deep, at least 2 ft.
A fence order is a pile of small counts: posts, rails, pickets, and a hole for every post. Miss one count and you are making a supply run with the crew standing in the yard, and a short run of pickets is the one that always shows.
This fence calculator takes each run you measured and counts the whole job. Run lengths go in, and sections, posts, rails, pickets, the hole depth and a price at your rate per foot come out. It also works as a fence post calculator or a fence picket calculator when you only need one count, and it comes as a free Excel file and a printable worksheet.
1. Your fence runs
| Run | Length (ft) | How many |
|---|
One row per straight run, in feet. Two sides the same length: one row, how many = 2. Leave gates out or add them as their own run.
2. Posts, rails and pickets
8 ft on center is a common practice estimate for wood fence (an unnamed install sheet says no more than 8 ft). Panels set their own spacing: use the panel width.
Measure your picket. Leave 0 for panels or chain link.
Hole depth: a third of the post length, at least 2 ft. Go below your frost line; check local rules.
Starts at 0. Your call.
3. Your rate (optional)
Your numbers
Check the numbers above.
- Posts
- Sections (panels)
- Rails
- Pickets
- Hole depth (ft)
- Linear feet of fence
- Price at your rate
Example only: a made-up yard and a made-up rate, not typical prices.
Frost depth and local rules decide how deep posts go; the hole depth here is the install-sheet rule.
Download the free fence calculator
- Excel (.xlsx): the fence calculator. List each run in feet, pick 8 ft or 6 ft post spacing, type your picket width and gap, and the sections, posts, rails, pickets, hole depth and price fill in. The second tab holds the backyard fence below.
- Google Sheets: upload the .xlsx to Drive, open it there, and measure runs on your phone in the yard.
- Printable PDF: a blank fence worksheet, lines A to I, to fill in with a pencil at the site.
- Filled-in example (PDF): the made-up backyard fence below, every line worked.
Free to use. The calculator and the files need no email.
How do you work out the posts, rails and pickets for a fence?
Every count starts from the run, a straight stretch of fence between corners, ends or gates. Do the math one run at a time, then add the runs.
- Sections: run length / post spacing, rounded up. A run never ends on a partial section without a post.
- Posts: sections + 1 for each run. Where two runs meet at a corner they share one post, so take off one for each shared corner.
- Rails: all sections x the rails per section. Two rails suit a short fence, three a tall one.
- Pickets: run length in inches / (picket width + gap), rounded up, run by run. Add your own extra percent for culls and cut pieces.
- Price: total feet x your rate per foot.
The shared corner line is the one people skip. A closed yard with four corners has four posts that would otherwise be counted twice.
A worked example: a backyard fence with a back line and two sides
Take a back line of 96 ft and two side lines of 72 ft each, with posts 8 ft on center and two rails a section. The pickets are 5.5 in wide with a 0.5 in gap, the posts are 8 ft long, and the price is $38.00 a foot.
| Line | Math | Result |
|---|---|---|
| Sections | 96 / 8 = 12; 72 / 8 = 9, twice | 30 sections |
| Posts | 13 + 10 + 10 = 33, minus 2 shared corners | 31 posts |
| Rails | 30 x 2 | 60 rails |
| Pickets | 96 x 12 / 6 = 192; 72 x 12 / 6 = 144, twice | 480 pickets |
| Hole depth | 8 / 3 | 2.67 ft |
| Price | 240 ft x $38.00 | $9,120.00 |
Each side run needs 10 posts, but two of the corners are shared with the back line, and that is why 33 becomes 31. The worksheet below walks the same lines.
| Line | What to measure or work out | Example fence (made up) | Your fence |
|---|---|---|---|
| A | Fence length: each run x how many, added | 240 ft | |
| B | Post spacing on center (ft) | 8 ft | |
| C | Sections: each run / B, rounded up, then added | 30 | |
| D | Posts: each run’s sections + 1, added, minus shared corner posts | 31 posts | |
| E | Rails: C x rails per section | 60 rails | |
| F | Pickets: run inches / (picket + gap), rounded up, added | 480 pickets | |
| G | Hole depth: post length / 3, never under 2 ft | 2.67 ft | |
| H | Your rate per foot | $38.00 | |
| I | Fence price: A x H | $9,120.00 |
How far apart should fence posts be?
The 8 ft figure is a common practice estimate, not a code or an extension rule: a retailer-hosted wood fence install sheet (no maker named, re-opened Nov 14, 2026) says posts no more than 8 ft on center, which fits standard 8 ft rails. The calculator starts at 8 ft and offers 6 ft for a line that needs to be stiffer, such as a taller privacy run or the side next to a gate. Type your own number in the spacing box if your product calls for something else.
Closer posts mean more sections, more posts and more rails, so the spacing choice moves the whole order. Run the job both ways before you quote if you are unsure.
How deep do you dig the post holes?
The same install sheet says a good rule is to bury a third of each post. A wood treatment maker gives the same third and adds a floor: not less than 2 ft. So the calculator gives post length / 3, and never under 2 ft. An 8 ft post gets a 2.67 ft hole, and a short 5 ft post still gets 2 ft.
Frost line and local rules decide how deep the hole really goes in your area, so your own depth can be deeper than the calculator’s. Dig to the depth you use on the job.
How do chain link and vinyl fences change the count?
The same sections and posts count works for any fence. What changes is what fills the section.
- Vinyl and other panels: use the panel width as the post spacing. The calculator then counts one panel a section, and pickets stay at 0.
- Chain link: set the pickets to 0. The sections and posts are still the count, and the roll of fabric is your total run length from line A.
- Wood pickets: type the picket width and the gap you leave, and the calculator counts every one.
Gates are their own run. Leave them out of the totals, or add each gate as a run of its own, and price the gate and its hardware as separate lines.
How do you price the fence from this count?
The price on the worksheet is only total feet x your rate per foot, so the rate has to carry your labor, your margin and the materials you just counted. Build that rate from your own estimate: a fence estimate template lays out the lines, and a fence price list keeps the rate the same on every bid.
When the customer changes the layout after you quote, add a run or move a gate and write it up on a fence change order form. To total the runs from a site sketch first, use the linear feet calculator.
Fence jobs priced by the foot
Vaylor is a business app for service crews, from just you to 16 people. Your per-foot fence prices, post and rail items and add-ons live in a price book, and quotes go out from there. Join the waitlist today. Founding members save 40% or more. Launching February 2027. Try Vaylor Plus free for 30 days. No surprise charges.
Good fit if
- You want your price book to hold your fence rate per foot and your gate lines, with your margin on every line.
- You want quotes with photos and add-ons that your customer signs on their phone.
- You want invoices and the schedule map in the same place as your price book, and a spreadsheet export when the books need it.
Probably not a fit if
- You need software this season. Vaylor isn’t selling until February 2027.
- You only needed the post, rail and picket counts: the calculator and worksheet on this page are free.
Frequently asked questions
How many fence posts do I need for 100 feet?
At 8 ft on center, 100 ft is 13 sections, which takes 14 posts for one straight run. At 6 ft spacing it is 17 sections and 18 posts. Closed runs share their corner posts, so take one off for each shared corner.
How do I calculate how many pickets I need?
Convert the run to inches, then divide by the picket width plus the gap, rounding up. The example back line of 96 ft is 1,152 in, and 1,152 / 6 is 192 pickets. Do each run on its own and add them.
How far apart should fence posts be?
Eight feet on center is a common practice estimate for wood fence, not a code: a retailer-hosted install sheet says no more than 8 ft. A 6 ft spacing is the tighter option. Your fence product’s instructions come first if they say something different.
How deep should a fence post be?
A third of the post length is in the ground, and a wood treatment maker says not under 2 ft. For an 8 ft post that is 2.67 ft. Frost line and local rules decide how much deeper you go.
Does this work as a chain link or vinyl fence calculator?
Yes. For vinyl panels, type the panel width as the post spacing and set the pickets to 0. For chain link, set the pickets to 0 as well and use the sections and posts. The fabric length is your total run.
Sources
- Wood fence installation sheet hosted by Home Depot, maker not named in the text; cited only as a common practice estimate (posts no more than 8 ft on center; a third of each post below ground), re-opened Nov 14, 2026
- Viance (wood preservative maker), TreatedWood.com: Building a Fence (at least a third of the post in the ground, not less than 2 ft), opened Nov 11, 2026
- Vaylor’s filled-in example (a made-up business; every size, rate and price is made up and worked by the calculator’s engine, checked by hand Nov 11, 2026)
