Home / Fence Calculator
Construction & Outdoor Calculators

Fence Calculator

Fence Calculator

Enter the fence length, height and post spacing to get the number of posts, rails, pickets, fence sections, concrete bags and gravel for the post holes.

Measure the whole fence line, gates included. The calculator takes the gate openings out of the run, splits the rest into equal sections no wider than your post spacing and adds one post per gate.

Fence materials
0

Posts and post length0
Rails (2x4)0
Pickets incl. waste0
Fence sections0
Concrete bags for the posts0
Gravel under the posts (6 in / 15.2 cm)0

Calculation details

Use this free fence calculator to estimate how many fence posts, rails and pickets you need, plus the concrete bags and gravel for the post holes, for wood privacy, picket and board fences with gates.

Enter the total fence length, height and post spacing, then the picket width, gap, gates and post size to get a full material list.

How to Calculate Fence Materials

Follow these four steps to turn a fence line into a shopping list, or let the calculator above do the math for you.


01

Measure the Fence Line

Measure the full length along the line where the fence will stand, including the gate openings. A 100 ft fence with no gates has a 100 ft run; with one 4 ft gate the fenced run is 96 ft.

02

Count the Posts

Divide the run by the post spacing and round up to get sections, then add 1 post, plus 1 for each gate. A 100 ft run at 8 ft spacing is ceil(100 ÷ 8) = 13 sections and 14 posts.

03

Add Rails and Pickets

Use about one rail for every 24 in of height: 3 rails for a 6 ft fence, so 13 × 3 = 39 rails. Pickets = length in inches ÷ (picket width + gap): 1,200 ÷ 5.5 = 218.2, so 219 pickets, or 241 with 10% extra.

04

Plan the Post Holes and Concrete

Dig each hole 3 times the post width and add 6 in of gravel. A 4x4 post in a 10.5 in hole set 24 in deep takes 1.03 ft³ of concrete, about 2.75 bags of 50 lb fast-setting mix per post.

FORMULA & EXPLANATION

Fence Formulas & Glossary

A fence is a row of equal sections. Posts sit at both ends of every section, rails span between posts and pickets cover the full length, so a few divisions give every quantity.

FENCE FORMULA

Sections and posts

Run = L − Gates × Gate width  |  Sections = ceil(Run ÷ S)  |  Posts = Sections + 1 + Gates

Rails

Rails per section = max(2, ceil(Height ÷ 24 in))  |  Rails = Sections × Rails per section

Pickets

Pickets = ceil(L ÷ (W + G))  |  To buy = ceil(Pickets × (1 + Waste %))

Post length and hole

Post length = Height + Depth  |  D = 3 × Post width  |  Hole depth = Depth + 6 in gravel

Concrete and gravel

Concrete per post = (π ÷ 4 × D² − Post width²) × Depth  |  Bags = ceil(Posts × Concrete per post ÷ Bag yield)  |  Gravel = π ÷ 4 × D² × 6 in per post

Quikrete yields (US): 50 lb fast-setting = 0.375 ft³, 60 lb = 0.45 ft³, 80 lb = 0.6 ft³; All-Purpose Gravel 0.5 ft³ per 50 lb bag. Actual US board sizes: 4x4 = 3-1/2 in, 6x6 = 5-1/2 in, 1x6 = 5-1/2 in, 1x4 = 3-1/2 in. 1 ft³ = 1,728 in³.


Hole size and depth follow the Quikrete post-setting guide; bag yields are the printed Quikrete values (50 lb fast-setting = 0.375 ft³, 60 lb = 0.45 ft³, 80 lb = 0.6 ft³). Local codes, frost depth, wind loads and HOA rules can require deeper or bigger footings, so check before you build.

L

Fence Length (L)

The total length of the fence line, gates included. The fenced run is L minus the gate openings, and it is what the posts and rails are based on.

S

Post Spacing (S)

The distance from the center of one post to the next. Wood fences usually use 6 to 8 ft; 8 ft matches the common 8 ft rail and fence panel length.

W

Picket Width (W) and Gap (G)

The actual width of one picket and the space between pickets. A 1x6 board is 5-1/2 in wide and a 1x4 is 3-1/2 in. A privacy fence uses no gap.

D

Post Hole (D)

The hole diameter, 3 times the post width: 10.5 in for a 4x4 and 16.5 in for a 6x6. Concrete fills the hole around the post above a 6 in gravel base.

Fence Calculator Examples

These worked examples come straight from the calculator above, with 10% extra pickets unless noted.

100 ft Privacy Fence

A 6 ft tall wood privacy fence, 100 ft long, with 1x6 pickets butted tight, 4x4 posts 8 ft apart set 24 in deep in 50 lb fast-setting concrete.


Given: Length 100 ft, height 6 ft, spacing 8 ft, pickets 5.5 in, gap 0, no gates, 4x4 posts, depth 24 in

Calculation:
Sections = ceil(100 ÷ 8) = 13; posts = 13 + 1 = 14
Rails = 13 × 3 = 39; pickets = ceil(1,200 ÷ 5.5) = 219 → 241 with 10%
Concrete = 14 × 1.03 ft³ = 14.46 ft³ ÷ 0.375 = 39 bags

Answer: 14 posts of 8 ft, 39 rails, 241 pickets, 39 bags of 50 lb concrete and 4.21 ft³ (9 bags) of gravel

60 ft Picket Fence with a Gate

A 4 ft front-yard picket fence, 60 ft long with one 4 ft gate, using 1x4 pickets (3.5 in) with 2.5 in gaps.


Given: Length 60 ft, height 4 ft, spacing 8 ft, pickets 3.5 in, gap 2.5 in, 1 gate of 4 ft, 4x4 posts, depth 24 in

Calculation:
Run = 60 − 4 = 56 ft; sections = 56 ÷ 8 = 7; posts = 7 + 1 + 1 = 9
Rails = 7 × 2 = 14; pickets = 720 ÷ (3.5 + 2.5) = 120 → 132 with 10%
Concrete = 9 × 1.03 ft³ = 9.29 ft³ ÷ 0.375 = 25 bags

Answer: 9 posts of 6 ft (buy 8 ft), 14 rails, 132 pickets (gate included) and 25 bags of 50 lb concrete

200 ft Backyard Fence, Two Gates

A 6 ft backyard fence, 200 ft long with two 4 ft gates, 1x6 pickets with 1/2 in gaps and 80 lb concrete bags.


Given: Length 200 ft, height 6 ft, spacing 8 ft, pickets 5.5 in, gap 0.5 in, 2 gates of 4 ft, 4x4 posts, depth 24 in, 80 lb bags

Calculation:
Run = 200 − 8 = 192 ft; sections = 24; posts = 24 + 1 + 2 = 27
Rails = 24 × 3 = 72; pickets = 2,400 ÷ 6 = 400 → 440 with 10%
Concrete = 27 × 1.03 ft³ = 27.88 ft³ ÷ 0.6 = 47 bags

Answer: 27 posts of 8 ft, 72 rails, 440 pickets, 47 bags of 80 lb concrete and 8.12 ft³ (17 bags) of gravel

Fence Calculator FAQs

Answers to common questions about fence posts, post spacing, pickets, rails, post hole depth and concrete per post.

How do you calculate fence materials?

Measure the fence line, subtract the gate openings and divide by the post spacing to get the sections (round up). Posts = sections + 1 + one per gate, rails = sections × rails per section and pickets = length ÷ (picket width + gap). A 100 ft, 6 ft tall privacy fence at 8 ft spacing needs 14 posts, 39 rails and 219 pickets, or 241 with 10% extra.

Divide the fence run by the post spacing, round up and add one post, then add one more for each gate. A 100 ft fence with posts 8 ft apart needs ceil(100 ÷ 8) + 1 = 14 posts, and a 150 ft fence needs ceil(150 ÷ 8) + 1 = 20. Add a post at any corner that does not land on a regular post.

Wood fence posts are usually set 6 to 8 ft apart, measured center to center. Eight feet is the most common spacing because rails and fence panels come in 8 ft lengths. Closer spacing makes a stiffer fence and is a good idea for tall fences or windy sites.

Divide the length in inches by the picket width plus the gap. For 100 ft (1,200 in) of 1x6 pickets (5.5 in) with no gap: 1,200 ÷ 5.5 = 218.2, so 219 pickets, or 241 with 10% extra. With 1x4 pickets (3.5 in) and no gap you need 343, and with 3.5 in pickets and 2.5 in gaps you need 200.

A common rule is one rail for every 24 in of fence height, with at least two: 2 rails for a 4 ft fence, 3 for a 6 ft fence and 4 for an 8 ft fence. Multiply by the number of sections: a 100 ft fence with 13 sections and 3 rails per section needs 39 rails.

Many builders set a 6 ft fence with 8 ft posts buried 2 ft deep, at least one third of the fence height. The Quikrete post-setting guide goes further: bury one third of the total post length and add 6 in of gravel below. In cold areas go below the frost line and follow your local code.

It depends on the hole. Quikrete sizes the hole at 3 times the post width, so a 4x4 (3.5 in) gets a 10.5 in hole. Set 24 in deep, the concrete around the post is 1.03 ft³: about 2.75 bags of 50 lb fast-setting mix (0.375 ft³ each) or 1.72 bags of 80 lb mix (0.6 ft³). 14 posts need 39 bags of 50 lb.

Quikrete recommends a hole 3 times the post width: 10.5 in wide for a 4x4 and 16.5 in for a 6x6. Make it as deep as the buried part of the post plus 6 in for a gravel base. For 24 in of post in the ground, dig 30 in deep.

Post length = fence height + depth in the ground. A 6 ft fence with posts 24 in deep needs 8 ft posts, and a 4 ft fence needs 6 ft, so buy 8 ft and cut. The calculator rounds up to the next common length: 8, 10, 12, 14 or 16 ft.

Take the gate openings out of the run and add one post per gate, because each gate needs its own post on both sides. A 60 ft fence with one 4 ft gate has a 56 ft run, 7 sections at 8 ft and 7 + 1 + 1 = 9 posts. The calculator still counts pickets over the full 60 ft so the gate can be clad too.

Mark the corners and gate locations, then measure along the fence line with a long tape or measuring wheel and add up every side, gates included. Confirm your property line first, and in the US call 811 a few days before digging so buried utility lines are marked.

Multiply each quantity by your local price and add them up: posts, rails, pickets, concrete bags, gravel, screws or nails, and gate hardware. For example, 14 posts, 39 rails, 241 pickets and 39 bags of concrete are the full list for a 100 ft, 6 ft privacy fence. Prices change by region and season, so check your local store.

Explore More Calculators

Get fast, precise, and beautifully designed solutions for all your personal, financial, and health calculations.

About the authors

CalcNova Editorial Team

CalcNova was created and is maintained collaboratively by two friends who want to make everyday calculations simpler and more accessible. We build practical online calculators and clear explanations to help people understand results and the methods behind them.

Our focus is on clear formulas, useful examples, and regularly maintaining our tools. Calculator results are intended for guidance; for important financial decisions, confirm figures with the relevant provider or a qualified professional.

Scroll to Top