Skip to content

Materials · Fence

Fence calculator: posts, pickets, rails and concrete

Enter the length of each side of your fence, the style and the gates. The calculator counts posts, pickets or panels, rails, post length and bags of concrete per post, with corners and the post itself taken into account.

A 100 ft, 6 ft tall wood privacy fence with one 4 ft gate and posts 8 ft apart needs 14 posts, 40 rails (3 per section) and 231 boards 5 1/2 in wide, which is 210 plus 10% waste. Set in 10 in holes 24 in deep, the 14 posts take 35 bags of 50 lb concrete.

Sections = length ÷ post spacing, rounded up. Posts = sections + 1, plus 1 for each gate. Boards = fenced length ÷ board width. Every side is counted on its own, so corners get their posts.

Fence material calculator

This free online fence calculator works as a material estimator for a wooden fence you build yourself, or for checking a supplier's material list line by line. Pick the number of sides and type each length in feet, or feet and inches such as 52' 6". Choose privacy, picket, board-on-board or pre-built panels, then the height, post spacing and gates. The hole settings at the bottom drive the post length and the concrete. Use the measured width of your boards, not the name on the tag, because a 1x6 picket is 5 1/2 in wide.

  • Default run: 100 ft, one 48 in gate, privacy boards 5 1/2 in wide, 8 ft spacing. Result: 14 posts, 12 sections, 40 rails, 231 boards with 10% waste, 8 ft posts and 35 bags of 50 lb concrete (0.48 cu yd).
  • Backyard with two corners: sides of 100, 50 and 50 ft, open at the house. Each side is split into its own sections (26 in all), so the yard needs 28 posts and 471 boards, not the 27 posts a single 200 ft run would suggest.
  • Closed loop: a 60 × 40 ft enclosure that returns to its start has no free end post, so it needs 26 posts with one gate.
  • Picket fence: 100 ft, 4 ft high, 3 1/2 in pickets with a 2 1/2 in gap, 2 rails and a 36 in gate gives 215 pickets, 15 posts and 29 rails.
  • Board-on-board: the same 100 ft run with 5 1/2 in boards lapped 1 1/2 in on each edge needs 317 boards across both layers.

Pickets and rails carry the waste allowance. Posts, panels and concrete are exact counts, because you buy them one by one. Gate frames, hinges, latches, post caps and trim boards are not counted. To total several lengths of trim or rail, the linear feet calculator adds them up.

How the fence calculator counts each material

Every count is plain geometry you can check with a pencil. Here is the default 100 ft privacy fence worked through line by line.

Fence material formulas, worked for 100 ft with one 4 ft gate

MaterialHow it is counted100 ft example
Fenced lengthside length minus gate openings1,200 − 48 = 1,152 in (96 ft)
Sectionsfenced length ÷ post spacing, rounded up96 ÷ 8 = 12
Postssections + 1 (open run) + 1 per gate12 + 1 + 1 = 14
Railssections × rails per section, + waste12 × 3 = 36, × 1.10 = 40
Privacy boardsfenced length ÷ board width, + waste1,152 ÷ 5.5 = 209.5 → 210, × 1.10 = 231
Post lengthfence height + hole depth72 + 24 = 96 in (8 ft)
Concrete per posthole volume − post volume1.09 − 0.17 = 0.92 cu ft
50 lb bagstotal concrete ÷ 0.375 cu ft14 × 0.92 = 12.89 ÷ 0.375 → 35

Round up at every step that ends in something you buy. Waste is applied to boards and rails only, never to the fence length.

Two counting rules matter more than any other. First, a fence always has one more post than sections on a run that starts and ends free, which is why 12 sections take 13 line posts. Second, a gate splits a run into two pieces, so each gate adds one post: the posts on both sides of the opening are the gate posts. Ignoring the gate, or dividing the whole fence by the spacing in one go when it turns corners, is how most material lists come up short.

How many pickets do I need? Pickets per 8 ft section

Picket count depends on three things: the fenced length, the actual board width and the gap or overlap. An 8 ft section measured post center to post center is 96 in, so a privacy section of 1x6 boards butted tight takes 96 ÷ 5.5 = 17.5, rounded up to 18 boards. The table gives the count for one section and for 100 ft, so you can scale to your fence.

Pickets per 8 ft section and per 100 ft

Board and spacingPer 8 ft sectionPer 100 ftPer 100 ft + 10%
Privacy, 1x4 (3 1/2 in)28343378
Privacy, 1x6 (5 1/2 in)18219241
Privacy, 1x8 (7 1/4 in)14166183
Picket 3 1/2 in, 1 1/2 in gap20241266
Picket 3 1/2 in, 2 1/2 in gap17201222
Picket 5 1/2 in, 2 1/2 in gap13151167
Board-on-board 3 1/2 in, 1 in lap38480528
Board-on-board 5 1/2 in, 1 1/2 in lap24300330
Board-on-board 7 1/4 in, 2 in lap18229252

Gate openings not deducted. Picket rows use (length + gap) ÷ (width + gap); board-on-board uses (length − width) ÷ (width − lap) + 1. All rounded up.

Spacing pickets evenly between two posts

When pickets sit between the posts, start from the clear opening, not the post spacing. Posts 8 ft on center with 4x4 posts leave 96 − 3 1/2 = 92 1/2 in. Pick a target gap, then: number of pickets = (opening − gap) ÷ (picket width + gap), rounded to a whole number, and the real gap = (opening − pickets × width) ÷ (pickets + 1).

  • 3 1/2 in pickets, 2 1/2 in target: (92 1/2 − 2 1/2) ÷ 6 = 15 pickets, and (92 1/2 − 15 × 3 1/2) ÷ 16 = 2 1/2 in gaps, exactly on target.
  • 5 1/2 in pickets, 2 1/2 in target: (92 1/2 − 2 1/2) ÷ 8 = 11.25, so 11 pickets with gaps of (92 1/2 − 60.5) ÷ 12 = 2 2/3 in, about 2 11/16 in.
  • Cut a spacer block to the real gap and set every picket against it, so small errors do not add up along the section.

Questions about buying pickets by the bundle, cedar versus pine and how many boards a whole yard takes are covered in how many fence boards, pickets and panels you need.

Fence post spacing and how many posts you need

Wood fence posts (some call them fence poles) are usually set 6 to 8 ft apart on center. Eight feet suits rails cut from 8 ft or 16 ft boards and pre-built 8 ft panels, and wastes the least lumber. Six feet gives a stiffer fence and is common for tall fences, windy sites and heavy board-on-board. Panels set the spacing for you: posts go one panel width apart.

Posts for one straight run, no gates

Run length6 ft spacing7 ft spacing8 ft spacing
25 ft655
50 ft1098
75 ft141211
100 ft181614
150 ft262320
200 ft353026
300 ft514439

Posts = length ÷ spacing, rounded up, + 1. Add 1 post per gate, and count each side separately when the fence turns a corner.

Corners, ends, gates and closed loops

  • End posts sit at each free end of a run. A fence that dies into the house or an existing fence still needs a post or a wall bracket there.
  • Corner posts are shared by two sides, but each side is divided into sections on its own. That is why the 100 + 50 + 50 ft yard above needs 28 posts: the two 50 ft sides take 7 sections each, where one 200 ft run would take 25 sections.
  • Gate posts frame each opening. They carry the gate's weight, so many builders use a 6x6 or set them deeper in more concrete.
  • Closed loops such as a garden or dog run end where they started, so there is no extra end post: the 60 × 40 ft loop needs 26 posts with a gate.

Spacing, post depth and height questions are answered at length in fence post spacing, depth and height.

Fence post depth, hole size and post length

A common trade rule of thumb is to bury about one third of the post's height above ground, and never less than 24 in. So a 6 ft fence wants holes about 24 in deep and a post 8 ft long. Where the ground freezes, set the bottom of the hole below the local frost depth so frost heave cannot lift the post; your building department publishes that depth.

Post depth and post length by fence height (rule of thumb)

Fence heightOne third of heightHole depth usedPost lengthStock post
3 ft12 in24 in5 ft8 ft
4 ft16 in24 in6 ft8 ft
5 ft20 in24 in7 ft8 ft
6 ft24 in24 in8 ft8 ft
7 ft28 in28 in9 ft 4 in10 ft
8 ft32 in32 in10 ft 8 in12 ft

Trade rule of thumb, not a code figure. Deeper is never wrong: frost depth, sandy soil, gate posts and windy sites all call for more.

  • Digging: a manual post hole digger handles a few holes; a power auger saves a day on a long fence. Hole diameter: about 3 times the post width, so 10 to 12 in for a 4x4 and 14 to 16 in for a 6x6. Bell the bottom slightly wider than the top so the footing resists lifting.
  • Gravel base: 3 to 6 in of gravel under the post lets water drain away from the end grain. Enter it in the calculator and it comes off the concrete. The gravel calculator sizes a larger order.
  • Post length: fence height plus hole depth. Posts are stocked in even lengths, so a 6 ft fence on 30 in holes needs 8 ft 6 in, which means buying 10 ft posts.
  • Treated posts for in-ground use should be rated for ground contact, which is marked on the end tag.

How much concrete per fence post

Concrete per post is the volume of the hole minus the volume of the post, because the post takes up space the concrete never fills. The hole is a cylinder: π × (diameter ÷ 2)² × depth. A 4x4 is 3 1/2 × 3 1/2 in, so in a 10 in hole 24 in deep the post removes 0.17 cu ft of the 1.09 cu ft hole. Post concrete, often called cement on the job, is sold in bags by weight in pounds (lbs). Bag yields are printed on the bag: an 80 lb bag of pre-mix makes about 0.60 cu ft, a 60 lb bag 0.45, a 50 lb bag 0.375 and a 40 lb bag 0.30.

Concrete per fence post, net of the post

Post and holeCu ft80 lb bags50 lb bags80 lb per 10 posts50 lb per 10 posts
4x4, 10 in hole, 24 in deep0.92231625
4x4, 10 in hole, 30 in deep1.15242031
4x4, 12 in hole, 30 in deep1.75353047
4x4, 12 in hole, 36 in deep2.10463657
4x6, 12 in hole, 36 in deep1.96463353
6x6, 14 in hole, 36 in deep2.58574369
6x6, 16 in hole, 42 in deep4.1571270111

Bags per post are rounded up for one hole mixed on its own. Mixing across several holes uses the pooled count, which is lower.

Why the per-post and total counts differ

In the default fence each post needs 0.92 cu ft, which is 2.5 bags of 50 lb. If you set each post with whole bags, that is 3 bags × 14 = 42 bags. Opening bags as you go from hole to hole uses the pooled figure of 35 bags. The calculator prints both.

Fast-setting post mix is poured dry into the hole and soaked with water, and its maker often has you stop a few inches below grade and finish with soil. For holes that are not for a fence, or to work in cubic yards, use the post hole concrete calculator, which takes a soil cap and any post shape. Bag counts for slabs and other pours are in the bags of concrete calculator.

Rails, panels and gates

Rails (also called stringers) are the horizontal 2x4s that the pickets are fastened to. Each section needs one rail per row, cut to the post spacing, so 8 ft spacing uses 8 ft 2x4s, or 16 ft 2x4s that span two sections and are joined on a post. A common rule is one rail for roughly every 2 ft of height, with a minimum of two.

Rails per section by fence height (100 ft at 8 ft spacing = 13 sections)

Fence heightRails per sectionRails for 100 ftPlacement
3 to 4 ft226top and bottom
5 ft2 or 326 to 393 for wide boards
6 ft339top, middle, bottom
7 to 8 ft452about every 24 in

Common practice, not a code rule. Rail counts before waste.

Pre-built fence panels

With panels, sections equal panels. Wood panels are usually 6 or 8 ft wide; vinyl and PVC panels are often about 6 or 8 ft too, but check the panel's rail length, because posts must be spaced to the panel, not the other way round. The default 100 ft fence with a 4 ft gate takes 12 panels of 8 ft and 14 posts.

Gates

Enter each gate's opening from post face to post face. A walk gate is typically 36 to 48 in, and a drive gate is 10 to 12 ft, often as a double gate. The calculator removes the openings from the longest side, adds one post per gate and leaves the gate itself out of the board count, because a gate is built or bought as a unit.

Privacy, picket, board-on-board and shadow box fences

  • Privacy (stockade): boards butted edge to edge, usually 6 ft high. Boards shrink as they dry, so gaps of about 1/4 in open up within a season; that is why board-on-board exists.
  • Picket: spaced boards, usually 3 to 4 ft high, often with dog-ear or pointed tops. Gaps of 1 1/2 to 3 in are common.
  • Board-on-board: two layers, the front boards covering the gaps between the back boards with an overlap on each edge. No see-through gaps even after shrinkage, but close to 40% more boards than privacy.
  • Shadow box: boards alternate on opposite sides of the rails with a gap between neighbors, so the fence looks the same from both sides. Count it as board-on-board.
  • Horizontal fence: boards run across the posts instead of up, with no rails. Count boards as rows: height ÷ (board width + gap), times the number of sections.

For board-on-board the arithmetic changes. Each new board advances by the board width minus the overlap, so boards = (length − width) ÷ (width − overlap) + 1. An 8 ft section of 5 1/2 in boards lapped 1 1/2 in on each edge takes (96 − 5.5) ÷ 4 + 1 = 24 boards, compared with 18 for plain privacy. Keep the overlap under half the board width, or the front boards touch.

Cedar, redwood and pressure-treated pine fence boards are counted the same way; only the actual width changes. Measure one board from the bundle before you rely on the label.

Measuring a fence line, including slopes

  • Mark the line first. Know where the property line is before you dig, and call 811 a few days ahead so buried utilities are marked.
  • Measure each side on its own along the line the posts will sit on, corner to corner, and note every gate opening.
  • Measure on the ground, not the plan. On a slope the length along the ground is a little longer than the flat distance, by about 1% at a 1 in 7 slope.
  • For an enclosed yard the fence length is the perimeter, less any side formed by the house. A one acre square lot is about 209 ft on a side, so it takes about 835 ft of fence to surround it.

Racked or stepped fence on a slope

A racked fence follows the ground: rails run parallel to the slope and the boards stay plumb, so the board count barely changes. A stepped fence keeps every section level and drops it at each post, so each downhill post stands taller by the drop per section, and the gaps under the steps need filling. If the ground falls 2 ft over four 8 ft sections, each step drops 6 in, so the posts on the low side of each step need an extra 6 in of length above ground. Choose the stock post length from the tallest post, not the average.

Fence height limits and permits

The model building code for houses does not require a building permit for a low fence. In the 2021 International Residential Code, Section R105.2 lists work exempt from permit, and item 2 under Building reads: "Fences not over 7 feet (2134 mm) high." Many jurisdictions amend that line, some to 6 ft, and zoning rules set the height you may build separately.

  • Zoning codes commonly allow taller fences in back yards than in front yards, and limit height near corners and driveways for visibility.
  • Homeowner associations may limit style, height and material on top of local zoning.
  • A swimming pool barrier has its own rules for height, gaps and gates, which this calculator does not check.
  • The calculator warns above 7 ft. Check the local rule before you buy posts long enough for a tall fence.

Fence lumber sizes, nails and screws

Fence lumber is sold by nominal size and is smaller in hand. These are the dry dressed sizes from the softwood lumber standard. Many fence pickets are milled thinner, about 5/8 in, so the width is the number to measure. Full tables for every size are in the lumber actual size chart.

Actual sizes and dimensions of common fence lumber

PieceActual size (dry)Used for
Picket or board, 1x43/4 × 3 1/2 inpicket fence
Picket or board, 1x63/4 × 5 1/2 inprivacy, board-on-board
Picket or board, 1x83/4 × 7 1/4 inwide-board privacy
Rail, 2x41 1/2 × 3 1/2 inall wood fences
Post, 4x43 1/2 × 3 1/2 inline posts
Post, 6x65 1/2 × 5 1/2 ingate posts, tall fences

How many nails or screws

Use two fasteners per board at each rail. For the default fence that is 231 boards × 3 rails × 2 = 1,386 fasteners, plus a few per rail end. Rule of thumb for size: a fastener should be about two and a half to three times as long as the board is thick, so 2 in (6d) to 2 1/2 in (8d) ring-shank nails or 2 in exterior screws for 5/8 to 3/4 in pickets. Use hot-dip galvanized or stainless steel fasteners with treated lumber, cedar and redwood, which corrode plain steel and stain around it.

Other wood counts: the board foot calculator turns a fence cut list into board feet, and the baluster spacing calculator is the right tool for deck and stair railings, which follow guard rules a yard fence does not.

Fence calculator FAQ

How many pickets are in an 8 ft privacy fence section?

About 18 boards 5 1/2 in wide, if they are butted tight across a 96 in section measured post center to post center: 96 ÷ 5.5 = 17.5, rounded up to 18. With 3 1/2 in boards it is 28, and with 7 1/4 in boards 14. If the boards sit between the posts instead of across them, measure the clear opening, about 92 1/2 in with 4x4 posts, and divide that. Board-on-board with a 1 1/2 in lap takes 24 boards per section. Add about 10% for splits, knots and cuts when you order for a whole fence rather than one section.

How do I space pickets so the gaps come out even?

Work from the clear opening between posts and solve for the gap. Pickets = (opening − gap) ÷ (picket width + gap), rounded to a whole number; then the real gap = (opening − pickets × width) ÷ (pickets + 1). For a 92 1/2 in opening and 3 1/2 in pickets with a 2 1/2 in target gap, that is 15 pickets and gaps of exactly 2 1/2 in. With 5 1/2 in pickets it is 11 pickets and gaps of about 2 11/16 in. Rip a spacer block to the real gap and use it for every picket, so the last gap matches the first.

How many fence boards do I need?

Divide the fenced length in inches by the board width plus any gap, round up and add about 10%. Buying by the bundle, cedar versus pine and whole-yard examples are in how many fence boards, pickets and panels you need.

How far apart should fence posts be?

Usually 6 to 8 ft on center for wood fences, matched to the rail or panel length, with 6 ft for tall or windy fences. Depth, height and spacing rules in detail are in fence post spacing, depth and height.

How deep should a fence post be?

At least 24 in, and about one third of the post's height above ground, so roughly 24 in for a 6 ft fence and 32 in for an 8 ft fence. That is a trade rule of thumb, not a code figure. Where the ground freezes, the hole should reach below the local frost depth so frost heave cannot jack the post up, which can mean 36 in or more in cold regions. Gate posts and corner posts take more load, so set them deeper or in a wider hole. Your post length is the fence height plus the hole depth, so deeper holes also mean longer posts.

How many bags of concrete do I need per fence post?

For a 4x4 post in a 10 in hole 24 in deep, about 0.92 cu ft once the post is subtracted, which is 2.5 bags of 50 lb or 1.6 bags of 80 lb. In a 12 in hole 30 in deep it rises to about 1.75 cu ft, or 3 bags of 80 lb. Round up per hole if you mix one hole at a time; across many posts the pooled total is lower. Bag yields come from the bag label: 80 lb makes about 0.60 cu ft and 50 lb about 0.375 cu ft. The calculator prints both the per-post and the total count.

Should I subtract the post when I calculate concrete?

Yes. The post fills part of the hole, so the concrete is the hole volume minus the post volume. A 4x4 post is 3 1/2 in square, and in a 10 in hole 24 in deep it takes up 0.17 cu ft of the 1.09 cu ft hole, about 16%. Over the 14 posts of a 100 ft fence that is roughly 6 bags of 50 lb you would otherwise overbuy. Larger posts in small holes matter even more: a 6x6 removes 0.42 cu ft per 24 in of depth. Any gravel at the bottom of the hole also comes off the concrete, which the calculator handles with its gravel input.

How many rails does a wood fence need?

Two rails for fences up to about 4 ft, three for a 6 ft fence and four for 7 to 8 ft fences, which works out to about one rail for every 2 ft of height. Each section gets one rail per row, cut to the post spacing, so a 100 ft fence at 8 ft spacing has 13 sections and needs 39 rails at three per section before waste. A 6 ft board fence on only two rails tends to cup and warp between them, and the calculator warns about it. Place the top and bottom rails a few inches in from the ends of the boards so the board ends stay flat.

How do corners and gates change the post count?

Each side of the fence is divided into sections on its own, and each gate adds one post. A straight 200 ft run at 8 ft spacing with one 4 ft gate needs 27 posts, but a yard of 100, 50 and 50 ft sides with one gate needs 28, because each 50 ft side ends at a corner and cannot share a partial section with the next side. A closed loop needs one post fewer than an open run of the same sections, since it ends where it starts. Enter up to four sides in the calculator to count corners correctly.

How much extra fence material should I buy?

About 10% extra on pickets and rails is usual, and 5% is enough for straight runs of good stock. The extra covers split boards, knots, cut-offs at gates and corners, and boards that are badly bowed. Do not add waste to the fence length itself, or the post count goes up for no reason. Posts, panels and concrete bags are exact counts, but one spare post covers a cracked one or a hole that hits a rock. The calculator applies the waste setting to boards and rails only.

Do I need a permit to build a fence?

Often not for a low fence, but check locally. The 2021 International Residential Code exempts "Fences not over 7 feet (2134 mm) high" from a building permit in Section R105.2, and many towns adopt that line, while some lower it to 6 ft. Zoning is separate: most towns set height limits by location, commonly lower in front yards, and may require a zoning permit or a survey of the property line even when no building permit is needed. Pool barriers and homeowner association rules add their own limits.

What size are fence pickets actually?

A 1x6 fence board is about 5 1/2 in wide and a 1x4 about 3 1/2 in. Dressed 1x lumber is 3/4 in thick, but many fence pickets are milled to about 5/8 in, and rough-sawn cedar can run a little wider. Pickets are commonly sold in 4, 5, 6 and 8 ft lengths with flat, dog-ear or gothic tops. Because the count is length divided by width, using 6 in instead of 5 1/2 in undercounts a 100 ft fence by about 19 boards. Measure a board from the bundle and type that width into the calculator.

How do I calculate a board-on-board fence?

Boards = (fenced length − board width) ÷ (board width − overlap) + 1, rounded up, counting both layers together. For an 8 ft section of 5 1/2 in boards with a 1 1/2 in overlap on each edge that is 90.5 ÷ 4 + 1 = 24 boards; for 100 ft with a 4 ft gate it is 288 boards, or 317 with 10% waste. The back layer is spaced with gaps narrower than the boards, and the front layer covers each gap. Keep the overlap under half the board width. Shadow box fences are counted the same way.

How long should fence posts be?

Fence height plus hole depth. A 6 ft fence on 24 in holes needs 8 ft posts, a 6 ft fence on 30 in holes needs 8 ft 6 in, which means buying 10 ft posts, and an 8 ft fence on 36 in holes needs 11 ft, so 12 ft posts. Posts are stocked in even lengths, so round up to the next one. Leave a little extra if the post will be trimmed to height after the concrete sets, or if the ground slopes and the downhill posts of a stepped fence stand taller. The calculator prints both the exact length and the stock length.

What size nails or screws should I use for fence pickets?

For 5/8 to 3/4 in pickets, 2 in (6d) to 2 1/2 in (8d) ring-shank nails or 2 in exterior screws are the usual choice, a rule of thumb that keeps the fastener about two and a half to three times the board thickness. Use hot-dip galvanized or stainless steel, because treated lumber, cedar and redwood corrode plain steel and leave dark streaks. Put two fasteners per board at each rail. The default 100 ft fence with three rails needs about 1,386 fasteners for the boards alone, plus a few at each rail end.

How do I figure a fence on a slope?

Measure the length along the ground, then decide between racked and stepped. A racked fence follows the slope with plumb boards, so materials stay close to a flat fence. A stepped fence keeps each section level and drops it at the posts, so the downhill posts must be longer by the drop per section, and the triangular gaps under each step need filling or longer boards. For a 2 ft fall across four 8 ft sections, each step drops 6 in. Order post lengths for the tallest post on each step.

How many feet of fence do I need for an acre?

About 835 ft for a square acre. An acre is 43,560 sq ft, so a square acre is about 208.7 ft on each side, and four sides make about 835 ft. A half acre square takes about 590 ft and a quarter acre about 417 ft. Real lots are rarely square: a long, narrow acre needs more fence than a square one, so measure the actual sides. Subtract any side formed by a building, then enter the sides in the calculator to count posts, rails and boards for that length.

Sources: 2021 IRC Section R105.2, work exempt from permit (county reprint) · PS 20-20 American Softwood Lumber Standard, Table 3 (dressed sizes). Bag yields from manufacturer bag labels. Post depth, rail and spacing figures are labelled trade rules of thumb.

Quantities only. Post depth, frost depth, fence height and setbacks are set by your local building and zoning rules; check them before you dig. See the disclaimer.