How Many Fence Posts Do I Need?
Posts = fence length ÷ post spacing, rounded up, plus 1. The rounded-up part is the number of sections between posts, and a straight run always has one more post than sections. Millard Lumber puts posts about 6 to 8 ft apart, and the USDA NRCS Vermont wooden board fence specification, the City of Mansfield, Texas privacy fence standards and the Heber City, Utah wood fence specification all cap the spacing at 8 ft. The table is for a straight run with no gates or corners.
| Fence length | Posts at 6 ft spacing | Posts at 8 ft spacing |
|---|---|---|
| 20 ft | 5 (4 sections) | 4 (3 sections) |
| 40 ft | 8 (7 sections) | 6 (5 sections) |
| 50 ft | 10 (9 sections) | 8 (7 sections) |
| 60 ft | 11 (10 sections) | 9 (8 sections) |
| 100 ft | 18 (17 sections) | 14 (13 sections) |
| 150 ft | 26 (25 sections) | 20 (19 sections) |
| 200 ft | 35 (34 sections) | 26 (25 sections) |
| 300 ft | 51 (50 sections) | 39 (38 sections) |
Gates and corners change the count. A gate opening comes out of the run and needs its own pair of posts, a hinge post and a latch post. A corner post is shared by the two runs that meet, but the spacing restarts there, so a corner can add a section. The tool splits the run at every gate and corner, assumes the pieces are equal, and counts each one, so the result is a good order quantity, not a survey. Set Closed perimeter when the fence goes all the way round, because a closed loop has no end posts.
How to Calculate a Fence
- Measure the run. Add up every straight side the fence will cover, in feet, along the line the posts will take. Subtract each gate opening. A 100 ft run with one 4 ft gate leaves 96 ft of fence.
- Divide by the spacing. 96 ÷ 8 = 12 sections. If the answer has a fraction, round up, because a short last section still needs a post.
- Add the posts. A straight run has sections + 1 posts. Each gate adds two, and each corner shares one.
- Count the rails. Multiply the sections by the rails per section. The next sections give the rule.
- Count the boards. Divide the fenced length by the board width plus the gap, and add a few percent for cuts.
- Size the holes. Dig half the fence height deep and three post widths across, and divide the volume by the bag yield for the concrete.
The calculator above does every step and shows the sections, so you can check the count against a sketch of your own yard.
Fence Post Depth
Bury about a third of each post. Millard Lumber says to set wood fence posts with about 1/3 of their total length in the ground, and the QUIKRETE Fast-Setting Concrete Mix data sheet says the hole should be one-half of the above ground post height deep. Those are the same rule: a 6 ft fence needs a hole 36 inches deep, and the post is 9 ft long, with 3 ft in the ground and 6 ft showing. The table applies it to common heights, with a 4x4 post (3 1/2 inches square) in a hole three times as wide, as the QUIKRETE sheet advises.
| Fence height | Hole depth | Post length | Hole width (4x4) | Concrete per hole |
|---|---|---|---|---|
| 3 ft | 18 in | 4.5 ft | 10.5 in | 0.62 cu ft (1.7 bags) |
| 4 ft | 24 in | 6 ft | 10.5 in | 0.88 cu ft (2.4 bags) |
| 5 ft | 30 in | 7.5 ft | 10.5 in | 1.14 cu ft (3.0 bags) |
| 6 ft | 36 in | 9 ft | 10.5 in | 1.40 cu ft (3.7 bags) |
| 8 ft | 48 in | 12 ft | 10.5 in | 1.91 cu ft (5.1 bags) |
Local rules can ask for more or less. The City of Mansfield, Texas standard sets 24 inches for a 6 ft fence and 36 inches for an 8 ft fence, but for steel pipe posts, and the USDA NRCS Vermont specification sets at least 36 inches for line posts and sets gate, end and brace posts 46 inches on a board fence. Where the ground freezes, a post set above the frost line can heave, so confirm the frost depth and any permit with your building department. Type your own depth under Optional to override the rule.
Concrete for Fence Posts
The QUIKRETE data sheet gives three numbers for setting a post: a hole three times the post width, dry mix poured to about 3 to 4 inches below the top, and a yield of about 0.375 cubic foot from each 50 lb bag. The tool fills the round hole to 3.5 inches below the top, subtracts the square post, and divides by the yield. For a 4x4 in a 36 inch hole that is about 1.4 cubic feet, or 3.7 bags per post. The sheet’s own example, two 50 lb bags for a 4 inch post in a 10 inch hole 2 ft deep, comes out at about 2.1 bags by the same method.
The bag count for the whole fence is rounded up once, not per hole, so leftover mix from one hole counts toward the next. Heber City, Utah specifies a 12 inch diameter concrete base and at least 6 inches of concrete under the post for its cedar posts. Millard Lumber puts a large stone or two shovels of gravel in the bottom of each hole; the Gravel Calculator sizes gravel if you want to buy it for a long run.
Fence Rails
One rail for every 2 ft of height, rounded up, and at least two. The City of Mansfield, Texas standard asks for one stringer for every two feet of height, which makes three for a 6 ft fence and four for an 8 ft fence, and sets a minimum size of 1 1/2 by 3 1/2 inches, the dressed size of a 2x4. The Heber City, Utah specification calls for a top rail and a bottom rail on a cedar fence. The table gives the rail count per section and for 100 ft at 8 ft spacing. Split rail fences use the same math with no boards; choose the Split rail style, and type the rails per section if your design uses two or three.
| Fence height | Rails per section | Rails in 100 ft at 8 ft spacing |
|---|---|---|
| 3 ft | 2 | 26 |
| 4 ft | 2 | 26 |
| 5 ft | 3 | 39 |
| 6 ft | 3 | 39 |
| 8 ft | 4 | 52 |
Fence Board Calculator: How Many Boards
Boards = (length + gap) ÷ (board width + gap), rounded up. Count the boards and the gaps between them: n boards have n minus 1 gaps, so the length is n times the width plus n minus 1 times the gap, which rearranges to the formula. Use the dressed width, not the nominal one: a 1x6 is 5 1/2 inches wide. For a privacy fence, set the gap to 0 for boards butted tight, or to a small gap if you want room for the wood to swell. For a picket fence, set the gap you want between pickets. The table shows the boards in 100 ft of fence before any extra.
| Board | No gap | 1/2 in gap | 2 in gap | 3 in gap |
|---|---|---|---|---|
| 1x4 (3.5 in wide) | 343 | 301 | 219 | 186 |
| 1x6 (5.5 in wide) | 219 | 201 | 161 | 142 |
| 1x8 (7.25 in wide) | 166 | 155 | 130 | 118 |
Order a few percent over. The tool adds 5 percent by default for cuts, splits and warped stock, and you can change it under Optional. The heights, board widths and gaps that each style starts with are only starting values, so change them to match your design.
Picket Fence Calculator
Pickets = (length + gap) ÷ (picket width + gap), rounded up. Choose the Picket style in the tool and it starts from a 3 ft fence of 1x4 pickets, 3 1/2 inches wide, with a 3 inch gap, which are starting values you can change. Each picket and its gap use 6.5 inches, so a foot of fence takes about 1.85 pickets. The rest of the count works as it does for a privacy fence: posts from the spacing, rails from the height, and concrete from the hole. The table shows how the gap changes the picket count for 100 ft of fence with 1x4 pickets.
| Gap between pickets | Pickets per foot | Pickets in 100 ft |
|---|---|---|
| 2 in | 2.18 | 219 |
| 2.5 in | 2.00 | 201 |
| 3 in | 1.85 | 186 |
| 3.5 in | 1.71 | 172 |
For example, a 40 ft front-yard picket fence with one 3 ft gate, 1x4 pickets, a 3 inch gap and posts 8 ft apart: the fenced length is 37 ft, which splits into two pieces of 18.5 ft and takes 6 sections and 8 posts. The pickets come to 444 in ÷ 6.5 in, rounded up, which is 69 pickets, or 73 with 5 percent extra. A 3 ft fence takes 2 rails per section, so 12 rails. Even spacing of the pickets is a layout job: divide the leftover space so the first and last pickets sit evenly, and the gap you land on may be a little off the one you typed.
Fence Cost Calculator: How Much Does a Fence Cost?
Fence prices swing with the region, the wood or vinyl, the height and the labor, so this page does not quote a price per foot. The calculator works out the quantities, and you supply the prices from your lumber yard, your store or a written quote. Open Optional: fence cost from your prices under the calculator and type a price for a post, a rail, a board and a bag of concrete. It adds up the materials, and nothing is assumed, so any price you leave blank counts as nothing.
Materials cost = posts × post price + rails × rail price + boards × board price + bags × bag price. If a contractor quotes by the foot, type the quote per foot (or per metre) and the tool multiplies it by the fenced length, which leaves out the gate openings because gates are often priced separately. Ask what your quote includes, since installation, hardware, gates, old fence removal, permits and delivery can each be priced on their own line. The table lists the quantities for the worked example further down, a 6 ft privacy fence with 96 ft of fence after the gate, ready for your prices.
| Item | Quantity | Your price each | Line total |
|---|---|---|---|
| Posts | 14 | $____ | $____ |
| Rails | 36 | $____ | $____ |
| Boards (with 5 percent extra) | 221 | $____ | $____ |
| 50 lb bags of concrete | 53 | $____ | $____ |
Add the line totals for the materials cost, then add the gate hardware, screws or nails, post caps and stain or sealer that the counts do not include. To compare the do-it-yourself figure with a contractor, divide your materials cost by the 96 ft of fence to get a cost per foot of materials, and set it beside the quoted installed price per foot. Height, style and material move the answer most: a taller fence needs longer posts and more rails, and a privacy fence needs many more boards than a picket fence of the same length.
Lumber Sizes: Nominal vs Actual
Lumber is sold by a nominal name that is bigger than the board. Engineering Toolbox lists the dressed sizes below, and the Southern Pine Inspection Bureau confirms the 4x4, the 2x4 and the 1x6. Posts, rails and boards all use these, so the calculator’s size buttons use the actual width.
| Nominal | Actual size | Used for |
|---|---|---|
| 1x4 | 3/4 x 3 1/2 in | Pickets |
| 1x6 | 3/4 x 5 1/2 in | Privacy boards |
| 1x8 | 3/4 x 7 1/4 in | Privacy boards |
| 2x4 | 1 1/2 x 3 1/2 in | Rails |
| 4x4 | 3 1/2 x 3 1/2 in | Posts |
Worked Example
Say you are building a 6 ft privacy fence of 1x6 boards, 100 ft long with one 4 ft gate, posts 8 ft apart, 4x4 posts, boards butted tight.
- Fenced length: 100 − 4 = 96 ft.
- Sections: the gate splits the run into two pieces of 48 ft, and 48 ÷ 8 = 6, so 12 sections.
- Posts: each piece has 6 + 1 = 7 posts, so 14 posts, and two of them are the gate posts.
- Rails: 6 ft ÷ 2 = 3 per section, and 3 × 12 = 36 rails.
- Boards: 96 ft × 12 = 1,152 in, and 1,152 ÷ 5.5 = 209.5, so 210 boards, or 221 with 5 percent extra.
- Posts and holes: a 6 ft fence needs 9 ft posts in holes 36 in deep and 10.5 in wide.
- Concrete: 1.40 cu ft per hole ÷ 0.375 = 3.7 bags each, and 14 holes need 53 bags of 50 lb mix, about 2,650 lb.
That is more concrete than many people expect, which is why the tool shows the hole depth and width next to the bag count. If you plan to plant against the new fence, the Mulch Calculator works out the bed.
Common Mistakes
- Forgetting the extra post. A run of 12 sections has 13 posts, not 12. Counting sections as posts leaves the last section hanging.
- Leaving the gate in the board count. A 4 ft gate takes about 9 boards out of a privacy fence. The tool subtracts the opening before it counts boards and rails.
- Spacing posts more than 8 ft apart. Three public specifications stop at 8 ft for a wood fence. Longer spans sag and need heavier rails.
- Using nominal widths. A 1x6 board is 5 1/2 inches wide, not 6, so counting with 6 inches under-orders by about 8 percent.
- Setting posts too shallow. A post buried less than a third of its length leans and works loose. In freezing climates, check the frost depth too.
- Ordering exactly what the math says. Boards split and warp, so order a few percent extra, and buy posts a little long so you can trim the tops level.
- Mixing units. Spacing and height are in feet, board widths and gaps are in inches. Entering a 5.5 inch board as 5.5 ft is the classic slip, so check the unit labels beside each field.
Fence Calculator FAQ
How many fence posts do I need for 100 feet of fence?
With posts 8 ft apart, a straight 100 ft run takes 13 sections and 14 posts. At 6 ft spacing it takes 17 sections and 18 posts. The rule is the length divided by the spacing, rounded up, plus one. A gate removes its opening from the run and adds two posts of its own, so the worked example below, a 100 ft run with a 4 ft gate, also comes to 14.
Can I use this as a fence post calculator?
Yes. The posts figure comes first, followed by the post length, the hole depth and width, and the bags of concrete for the holes. Set the run, the gates, the corners and the spacing, and leave the style on Split rail if you only want posts and rails, since that setting turns the boards off.
How far apart should fence posts be?
Millard Lumber says to set fence posts about 6 to 8 ft apart, and three public wood-fence specifications (the USDA NRCS Vermont board fence specification, the City of Mansfield, Texas privacy fence standards and the Heber City, Utah wood fence specification) set 8 ft on center as the most. Closer posts make a stiffer fence, and wider spacing saves posts. The tool shows a warning above 8 ft on a boarded fence.
How deep should I dig the holes for a 6 ft fence?
Dig 36 inches, which is half the fence height, and use a 9 ft post. QUIKRETE's data sheet says the hole depth should be one-half of the above ground post height, and Millard Lumber says to bury about a third of a wood post's total length, which is the same thing. Where the ground freezes, check your local frost depth, because a shallower post can heave.
How many bags of concrete do I need per fence post?
For a 4x4 post in a hole three times as wide, about 3.7 bags of 50 lb mix at a 36 inch depth, filled to 3 to 4 inches below the top, using QUIKRETE's yield of 0.375 cubic foot per 50 lb bag. QUIKRETE's own example, two bags for a 4 inch post in a 10 inch hole 2 ft deep, is a smaller hole. The calculator multiplies by the number of posts and rounds up once.
How do I use a picket fence calculator?
Pick Picket, enter the run, then set the picket width and the gap between pickets. A 1x4 picket is 3.5 inches wide, so with a 3 inch gap each picket and gap uses 6.5 inches, or about 1.85 pickets per foot. A privacy fence of 1x6 boards butted together takes about 2.18 boards per foot. The tool adds an extra percentage for cuts and culls.
How many rails does a fence need?
One rail for every 2 ft of height, rounded up, and never fewer than two. That gives 3 rails for a 5 or 6 ft fence and 4 for an 8 ft fence. The City of Mansfield, Texas privacy fence standard asks for one stringer for every two feet of height, and the Heber City, Utah specification asks for at least a top and a bottom rail. Type your own number under Optional if your design differs.
How much does a fence cost?
It depends on the length, height, style, material and your region, so the honest answer is a method, not a number. Take the counts from the calculator, which for a 6 ft privacy fence with a 4 ft gate in 100 ft are 14 posts, 36 rails, 221 boards and 53 bags of concrete, and multiply each by the price at your supplier. Or multiply a contractor's quoted price per foot by the 96 ft of fence. The tool does both when you type the prices under Optional.
How do I estimate the cost per foot of a fence?
Add up the materials for the whole fence, then divide by the fenced length. In the worked example that is the total of 14 posts, 36 rails, 221 boards and 53 bags of concrete at your prices, divided by 96 ft. Add hardware, finishing and any labor, and compare the result with a written quote per foot. The calculator shows the installed figure when you type a quote per foot.
What size hole do I need for a 4x4 fence post?
A hole three times the post width, which is 10.5 inches across for a 4x4 post that measures 3 1/2 inches, and as deep as half the fence height above ground, so 36 inches for a 6 ft fence. That follows the QUIKRETE data sheet: a hole three times the post diameter and one-half of the above ground post height deep.
How do I work out the concrete for a fence post hole?
Find the volume of the round hole filled to about 3 to 4 inches below the top, subtract the volume of the post inside it, and divide by the yield of a bag. For a 4x4 post in a 10.5 inch hole 36 inches deep that is 1.40 cubic feet, or 3.7 bags of 50 lb mix at QUIKRETE's 0.375 cubic foot per bag. The calculator does this for every post and rounds the total up once.
Do gates and corners change the post count?
Yes. A gate opening is taken out of the run, so it needs no boards or rails, and it adds two posts, one on each side. A corner post is shared by the two runs that meet there, but each corner restarts the spacing, so corners can add a section. Enter the number of gates and corners, and choose Closed perimeter if the fence goes all the way around.
Sources & further reading
The concrete figures, a hole three times the post width, a hole depth of one-half of the above ground post height, dry mix poured to 3 to 4 inches from the top and a yield of 0.375 cubic foot per 50 lb bag, are from the QUIKRETE Fast-Setting Concrete Mix data sheet. Burying a third of the post and spacing posts 6 to 8 ft apart come from Millard Lumber’s Building Wood Fences. The 8 ft spacing limit, the post depths and the rail rules come from the USDA NRCS Vermont Construction Specification 050WB, Fence, Wooden Board, the City of Mansfield, Texas wood privacy fence construction standards and the Heber City, Utah Section 02832, Fences. Dressed lumber sizes are from Engineering Toolbox’s softwood lumber dimensions and the Southern Pine Inspection Bureau’s nominal vs. actual lumber sizes. Building codes, height limits, setbacks and frost depth differ by place, so check with your local building department. For how we source and check the numbers on every calculator, see our methodology page, and for the full topic see the complete guide to lawn and landscaping.