๐Ÿ‡บ๐Ÿ‡ธ USC
Home & Construction
๐Ÿšง

Fence Calculator

Estimate posts, rails, pickets & concrete for your fence

โœ…

Last updated October 2026

Method: Standard fence-layout geometry: posts from length and spacing for one straight run, rails from sections, and pickets from length divided by picket pitch (board width plus gap). Concrete is your bags per post times the post count; the guidance uses Quikrete's published bag yield.

Included: Post count, sections, rails, pickets, 50 lb concrete bags, and a shopping list with a built-in 10% waste allowance.

Not included: Gates and gate hardware, fasteners, post caps, stain or paint, slope and curve adjustments, and exact local pricing. Results are estimates, not a quote.

๐Ÿšง Fence details

ft

Add up all the runs of fence (skip gate openings). The count assumes one straight run; add a post for each corner and gate.

ft
in
in

Use 0 for a tight, no-gap privacy fence.

Concrete (optional)

A 50 lb bag of Quikrete Fast-Setting mix yields about 0.375 cu ft, and Quikrete says two bags set a 3 in post in a 9 in hole 30 in deep. A 4x4 in a 9 in hole 24 in deep takes about 1.9 bags; wider or deeper holes take more.

Results update as you type.

๐Ÿšง Fence posts needed

20posts
19 sections, one straight run
Rails
38
Pickets
314
Concrete bags (50 lb)
40

๐Ÿ›’ Shopping list (with ~10% extra)

MaterialExactBuy (+10%)
Posts2022
Rails3842
Pickets314346
Concrete bags (50 lb)4044
Note: Estimate only. Measure your actual layout and buy about 10% extra to cover cuts, terrain, damaged boards and corners. Corner, end and gate posts need their own posts, extra concrete and hardware.

Fence calculator: estimate posts, rails & pickets

A fence calculator estimates the posts, rails, pickets and concrete you need from your fence length, post spacing and picket size. For a 150 ft fence with posts every 8 ft, you need 20 posts, 19 sections, 38 rails (2 each) and about 314 standard 1x6 pickets. Enter your numbers below for an instant materials list.

It works for wood privacy and picket fences, vinyl, and rail-only styles like split-rail or ranch fencing (just switch the picket estimate off). Enter your numbers and the results update as you type: the post count up top, with sections, rails, pickets and concrete bags below.

Building a fence usually pulls in a few other estimates: use the Concrete Calculator for large gate or end-post footings in cubic yards, the Paint Calculator to size stain or sealer for the finished surface, and if a roof line ties into the project the Roofing Calculator or Roof Pitch Calculator. This page counts fence posts, rails and pickets; reach for those when the material is concrete, finish or roofing instead.

A worked example: a 150 ft backyard fence

Say you are fencing a backyard with 150 feet of fence, posts every 8 feet, 2 rails per section, and standard 5.5 inch dog-ear pickets with a 0.25 inch gap. Here is how the math falls out:

  • Posts: 150 / 8 = 18.75, round up to 19, plus 1 = 20 posts.
  • Sections: 20 − 1 = 19 sections.
  • Rails: 19 sections x 2 rails = 38 rails.
  • Pickets: picket pitch = 5.5 + 0.25 = 5.75 inches; (150 x 12) / 5.75 = 1,800 / 5.75 = 313, round up to 314 pickets.
  • Concrete: at 2 bags per hole, 20 posts x 2 = 40 bags of 50 lb fast-setting concrete.

Add the recommended 10% buffer and your shopping list rounds up to about 22 posts, 42 rails, 346 pickets and 44 bags. That cushion covers warped boards, cuts at corners, and the inevitable post you set wrong the first time.

Worked example: fence material list for a 200 ft fence, step by step

Here is every step for a longer run: a 200 ft fence, posts every 8 ft, 3 rails per section, 1x6 pickets (5.5 in) with a 0.25 in gap, and 2 bags per post, with the raw count and the buy-quantity after a 10% waste buffer.

Step Formula Exact count Buy (+10%)
Postsceil(200 ÷ 8) + 12629
Sections26 − 125n/a
Rails (3/section)25 × 37583
Picketsceil((200 × 12) ÷ 5.75)418460
Concrete (2 bags/post)26 × 25258

Picket pitch here is 5.5 + 0.25 = 5.75 inches, and 200 ft is 2,400 inches, so 2,400 ÷ 5.75 = 417.4, rounded up to 418 boards. The buffer column is what you actually order.

The formulas this calculator uses

Every result comes from simple, standard fence geometry:

Posts = ceil(length ÷ post spacing) + 1 Sections = posts − 1 Rails = sections × rails per section Pickets = ceil((length × 12) ÷ (picket width + gap)) Concrete bags = posts × bags per post

The picket formula converts your fence length from feet to inches (the × 12) and divides by the picket pitch: the board's actual width plus the gap you leave between boards. That pitch is the key number: a wider gap means fewer pickets, while a tight, no-gap privacy fence needs the most.

How many fence posts and rails do I need by length?

The table below runs the post, section, rail and concrete math for common fence lengths at 6 ft and 8 ft post spacing. Rails assume 2 per section and concrete assumes 2 bags per post; add corner, end and gate posts on top.

Fence length Spacing Posts Sections Rails (2/sec) Concrete bags
50 ft6 ft1091820
50 ft8 ft871416
100 ft6 ft18173436
100 ft8 ft14132628
150 ft6 ft26255052
150 ft8 ft20193840
200 ft6 ft35346870
200 ft8 ft26255052
250 ft6 ft43428486
250 ft8 ft33326466
300 ft6 ft5150100102
300 ft8 ft39387678

Notice that going from 8 ft to 6 ft spacing on a 200 ft fence jumps the post count from 26 to 35, about 35% more posts, holes and concrete for a stiffer fence.

How to measure and use the calculator

You only need a tape measure (or a measuring wheel for long runs) and a few choices. Work through the fields in order:

  1. Total fence length: walk the perimeter and add up every straight run in feet. Leave out gate openings; you will handle those separately.
  2. Post spacing: the center-to-center distance between posts. Eight feet lets one 8 ft rail span each section; drop to 6 ft for a stiffer fence or windy sites.
  3. Rails per section: a common rule of thumb is 2 for fences up to about 5 ft and 3 for 6 ft and taller or heavy privacy panels.
  4. Picket width & gap: measure the actual board width (a "1x6" is really 5.5 inches) and pick your gap. Use 0 for a solid privacy fence, or a quarter inch for a classic picket look. Turn the picket estimate off entirely for rail-only fences.
  5. Concrete per post: a 4x4 in a 9 in hole 24 in deep takes about 1.9 bags of 50 lb fast-setting mix (0.375 cu ft each); a 10 in hole 30 in deep takes about 3.1. Bump it up for big or gate posts.

The results update as you type. Read the post count at the top, then use the shopping-list table; it already adds 10% for waste so you can order straight from it.

Who this calculator is for

This tool is built for anyone turning a fence plan into a parts list. That includes:

  • DIY homeowners pricing out a weekend fence project before heading to the store.
  • First-time fence builders who want a sanity check on post and picket counts.
  • Property owners getting a rough material estimate to compare against a contractor's quote.
  • Landscapers and handymen doing a quick takeoff for a customer.
  • Anyone replacing a fence who needs to match the existing post spacing and picket style.

Key fence terms explained

  • Post: the vertical member set in the ground (usually in concrete) that carries the fence. Line posts run along straight sections; corner, end and gate posts take extra load.
  • Section (or bay): the span of fence between two adjacent posts. Sections always equal posts minus one.
  • Rail (or stringer): the horizontal member that spans a section and holds the pickets. Most fences use 2 or 3 per section.
  • Picket (or fence board): the vertical boards that form the fence face. Their width plus the gap sets how many you need.
  • Picket pitch: the repeating distance one picket occupies: board width plus the gap. Smaller pitch, more pickets.
  • On center (OC): a measurement taken from the center of one post to the center of the next, which is how post spacing is normally specified.
  • Waste factor: the extra material (often about 10%) you buy to cover cuts, damage and mistakes.
  • Cubic yard: the unit bagged concrete is often compared against; for fence posts you usually buy by the 50 lb bag rather than the yard, but large gate footings may be measured in cubic feet.

Three quick scenarios

The same length can need very different materials depending on style. Using a 100 ft fence with 8 ft spacing:

  • Privacy fence (no gap, 5.5 in boards): 14 posts, 13 sections, 26 rails (2 each), and (100 x 12) / 5.5 = ~219 pickets. The tight spacing maximizes the picket count.
  • Spaced picket fence (5.5 in boards, 2.5 in gap): same 14 posts and 26 rails, but pitch is 8 inches, so (100 x 12) / 8 = 150 pickets, about a third fewer boards for the airy, traditional look.
  • Split-rail / ranch fence: 14 posts and 26 to 39 rails (2 or 3 per section), and zero pickets; turn the picket estimate off. The cost lives almost entirely in posts and rails.

How many pickets do I need per foot of fence?

Picket count depends only on the fence length and the picket pitch (board width plus gap). This quick-reference table gives the exact board count for the most common picket setups across four fence lengths.

Picket setup (pitch) 50 ft 100 ft 150 ft 200 ft
1x6 privacy, 0 gap (5.5")110219328437
1x6 + 1/4" gap (5.75")105209314418
1x6 spaced, 2.5" gap (8")75150225300
1x4 privacy, 0 gap (3.5")172343515686
1x4 + 1/4" gap (3.75")160320480640

All counts are rounded up to whole boards and exclude the 10% waste buffer; add that on top before buying. A no-gap 1x4 privacy fence needs more than twice the boards of a spaced 1x6 fence of the same length.

What changes the result the most

Tweak the inputs and you will see a few levers dominate:

  • Fence length: the biggest driver of everything; posts, rails and pickets all scale with it.
  • Post spacing: tighter spacing means more posts, more sections and more rails (and more digging and concrete).
  • Picket gap: the single largest lever on picket count. A no-gap 1x6 privacy fence needs 219 boards per 100 ft, 46% more than 1x6 pickets with a 2.5 in gap (150).
  • Rails per section: going from 2 to 3 rails raises rail count by half.
  • Picket width: wider boards cover the run with fewer pieces.

Setting posts: depth, frost line & concrete

The post count is only half the job; how you set those posts decides whether the fence stays straight. Quikrete's post-setting instructions call for a hole about three times the post width and a depth of one-third of the overall post length: an 8 ft post goes about 32 inches deep and stands about 5 ft 4 in tall, so a 6 ft fence needs 9 ft posts set 3 ft deep. Just as important is the frost depth, the depth to which the ground freezes in winter. It varies by location, and your building department publishes the local figure; if a post bottom sits above it, freezing and thawing soil can heave the post up and out of plumb over a few seasons.

For the footing itself, the bag count follows from the hole size. A 50 lb bag of fast-setting mix yields about 0.375 cu ft. A 4x4 (3.5 in) line post in a 9 in hole 24 in deep needs about 0.71 cu ft, or 1.9 bags; in a 10 in hole 30 in deep it needs about 1.15 cu ft, or 3.1 bags. Quikrete's own example is two bags for a 3 in post in a 9 in hole 30 in deep. Corner, end and especially gate posts carry more load, so they usually get a wider, deeper hole and more bags. The calculator multiplies your chosen bags-per-post by the total post count, so set that figure to match your most common hole, then add a few bags by hand for the heavy-duty posts. If you are pouring large gate footings or a continuous mow strip, switch over to the Concrete Calculator to work in cubic yards instead of bags.

Choosing a fence material

The same geometry drives the count no matter what the fence is made of, but the material decides cost, lifespan and how much maintenance you sign up for:

  • Pressure-treated pine: the usual choice for posts that go in the ground (use lumber rated for ground contact). Easy to work, but it can warp and weathers without a finish.
  • Cedar & redwood: the USDA Forest Products Laboratory's Wood Handbook rates western redcedar heartwood as very resistant to decay and old-growth redwood heartwood as highly resistant, but heartwood from second-growth redwood only low to moderately resistant, so check what you are buying; both usually cost more than treated pine.
  • Vinyl (PVC): sold as panels and posts that fit together, with no painting; the picket math still applies if you buy boards rather than prebuilt panels.
  • Composite: wood-plastic boards that mimic timber without the upkeep; popular where a deck and fence are built to match.
  • Metal (aluminum, steel, chain-link): rail-and-panel systems where you count posts and panels rather than pickets; turn the picket estimate off and plan around the panel width sold locally.

Whatever you pick, the post-and-rail counts from this calculator carry over directly; only the picket portion changes if you switch to pre-built panels. If you also plan to finish a wood fence, the Paint Calculator estimates how much stain or paint the surface area will need.

Estimating fence cost from the material list

This tool counts materials rather than dollars, because prices swing by region, season and supplier, but the count is exactly what you need to build a budget. Take the post, rail, picket and concrete totals (with the 10% waste buffer already added), multiply each by your local unit price, and sum them. Add a line item for fasteners and hardware (screws, brackets, post caps, gate hinges and latches), which the calculator does not count.

Two more cost factors are easy to overlook. First, labor: if you hire out the install, get written quotes, because labor is priced separately from the materials and varies by region and site. Second, gates: each gate needs its own pair of beefy posts, extra concrete, and hinge-and-latch hardware, so budget every gate as a small project of its own. Using the material list as your line-item base keeps you from the classic mistake of pricing only the pickets and forgetting the posts, concrete and hardware that quietly make up a big share of the bill.

Building on a slope

Few yards are perfectly flat, and a slope changes both the look and the count. There are two common approaches. A stepped (or stair-stepped) fence keeps each panel level and drops down in steps from post to post, leaving triangular gaps at the bottom; it is simple to build with pre-made panels. A racked (or raked) fence follows the grade, with the rails parallel to the slope and the pickets staying vertical, giving a continuous bottom line with no gaps. Racking generally needs the pickets and rails cut to fit, so plan for a little extra material and waste on a steep run. Either way, measure the fence length along the ground rather than as a flat horizontal distance, and add to your waste buffer for the extra cuts a slope demands.

Permits, property lines & good-neighbor rules

Before any boards are bought, confirm two things off the calculator. First, where your property line actually is: a survey or the plat for your lot is the only reliable answer, and building even a few inches over the line can mean tearing the fence out later. Second, local rules: the model International Residential Code exempts fences up to 7 feet high from a building permit (R105.2), but zoning codes and homeowners' associations commonly cap fence height, set front-yard and corner-visibility limits, and some require a fence permit anyway. Some areas also have a "good-neighbor" or finished-side-out rule for which way the smooth face points. These rules do not change the math here, but they can change your height (and therefore your rails per section and picket length), so settle them first.

Practical tips for an accurate count

  • Always order about 10% extra pickets and rails. Boards warp and split, and you will cut some at corners and ends.
  • Add a post at every corner and direction change, and a dedicated post on each side of every gate; these are not captured by the straight-run length.
  • Mark post locations on the ground with stakes and string before buying, so the math matches reality.
  • Use the actual board width, not the nominal name: a "1x6" picket is 5.5 inches, and that half-inch difference adds up over a long fence.
  • Check local rules: setback, height and permit requirements vary by city and HOA, and your property line may not be where you think.
  • Plan for slope: stepped or racked fences on a hill use slightly more material than a flat run.

Limitations and assumptions

This is a planning estimate, not a precise takeoff. Keep these in mind:

  • It assumes straight, level runs and does not adjust for slopes, curves or obstacles.
  • It does not include gates or gate hardware; leave gate openings out of the length and plan those separately.
  • It does not count fasteners, post caps, brackets, stain or paint, which you buy in addition.
  • Concrete is a rough per-post figure; actual bags depend on hole size, post size and soil.
  • It does not provide pricing, because material costs vary by region, season and supplier.

Related materials & calculators

A fence project rarely stands alone. Once you have your post count, you may also need to estimate:

  • Concrete for larger gate or end-post footings: use the Concrete Calculator for cubic yards.
  • Square footage of the area being enclosed, handy for landscaping the yard inside the fence (Square Footage Calculator).
  • Gravel for a base under a gate or along the fence line: the Gravel Calculator gives tons or cubic yards.
  • Mulch for the beds you plant against the new fence.
  • Cubic yards for any bulk material delivery, via the Cubic Yard Calculator.
  • Paint or stain coverage for finishing the fence, via the Paint Calculator.
  • Deck materials if a deck or gate landing ties into the fence line, via the Deck Calculator.

Sources

โš ๏ธ Common mistakes & edge cases

Forgetting the +1 post

Each straight run needs one more post than it has sections: the post that closes the final span. Skip it and you will be one post short on every run. The calculator adds it automatically.

Ignoring corners and gates

The length-based math only counts straight runs. Every corner, direction change and gate needs its own post (gates need two). Add these manually and budget extra concrete for them.

Using nominal board widths

A "1x6" picket is actually 5.5 inches wide, and a "1x4" is 3.5 inches. Using the nominal name instead of the real width throws off the picket count, especially on long fences.

Buying the exact count with no buffer

Warped, split and damaged boards are normal, and corners create offcuts. Ordering the exact number almost guarantees a second trip, so add about 10% extra.

Note: This calculator gives an estimate based on standard geometry, not a quote. Measure your actual layout, mark post locations, and confirm local height, setback and permit rules before you build.

❓ Frequently asked questions

How many fence posts do I need?

Divide the total fence length by your post spacing, round up, then add one for the final post. For a 150 ft fence with posts every 8 ft: 150 / 8 = 18.75, rounded up to 19, plus 1 = 20 posts. The +1 accounts for the post that closes the last section. Add an extra post wherever the fence changes direction (corners) or a gate begins or ends.

What is the formula for fence materials?

Posts = ceil(length / post spacing) + 1. Sections = posts minus 1. Rails = sections x rails per section. Pickets = (length x 12) / (picket width + gap), rounded up; the length is converted to inches and divided by the space each picket occupies including its gap. Concrete bags = posts x bags per hole.

How far apart should fence posts be?

For wood picket and privacy fences, 6 to 8 feet on center is the usual range. Eight feet lets a single 8-foot 2x4 rail span each section; 6-foot spacing gives a stiffer fence that is better in high wind or for tall privacy panels. Vinyl and other prebuilt panels set the spacing by the panel width, so follow the manufacturer. Wider spacing uses fewer posts, but rails can sag, so it is mostly used for light rail or wire fencing.

How many rails per section do I need?

A common rule of thumb is 2 rails for fences up to about 5 ft tall and 3 rails for 6 ft and taller, or for heavy privacy panels that need extra support. Ranch and split-rail fences use 2 or 3 rails by design. More rails mean a stiffer fence and less picket sag, at the cost of more lumber.

How do I calculate the number of pickets?

Convert the fence length to inches (length x 12), then divide by the picket pitch (the picket's width plus the gap you want between boards). A 5.5 inch picket with a 0.25 inch gap has a pitch of 5.75 inches. For a 150 ft (1,800 inch) fence: 1,800 / 5.75 = 313, rounded up to 314 pickets. Set the gap to 0 for a tight privacy fence.

How many bags of concrete per fence post?

It depends on the hole. Quikrete's data sheet says a 50 lb bag of its Fast-Setting Concrete Mix yields about 0.375 cu ft and that two bags set a 3 in square post in a 9 in hole 30 in deep. For a 4x4 post (3.5 in actual), a 9 in hole 24 in deep holds about 0.71 cu ft of concrete, about 1.9 bags, while a 10 in hole 30 in deep holds about 1.15 cu ft, about 3.1 bags. Gate and corner posts usually get bigger holes. The calculator multiplies your bags-per-post setting by the total post count.

Should I buy extra fence material?

Yes. Order roughly 10% more pickets and rails than the exact count. Boards warp, split or arrive damaged, terrain forces extra cuts, and corners and gates need additional lumber and hardware. Buying a little extra up front is cheaper than a second trip and a possible color or batch mismatch later.

Does this calculator include the gate?

No. Leave gate openings out of your total length, then add posts and hardware for each gate separately; a 4 ft walk gate and a wider drive gate both need their own sturdy, well-set posts. Gate posts usually get extra concrete because they carry the swinging weight of the gate.

What picket width should I use?

Wood pickets are usually nominal 1x4 or 1x6 boards, which the American Softwood Lumber Standard (PS 20) dresses to 3-1/2 and 5-1/2 inches wide; a 1x8 is 7-1/4 inches and covers ground faster with fewer pieces. Use the actual measured width, not the nominal name, for an accurate picket count.

How accurate is this fence estimate?

It is a solid planning estimate based on standard geometry, but real yards are not perfectly straight or level. Slopes, curves, obstacles, corners and gates all change the count. Always measure your actual layout, mark post locations on the ground, and add a waste buffer before buying.

How deep should fence posts be set?

Quikrete's post-setting instructions call for a hole depth of one-third of the overall post length and a hole width of about three times the post width: an 8 ft post goes about 32 inches deep and stands about 5 ft 4 in tall, and a 6 ft fence needs 9 ft posts set 3 ft deep. In cold climates, also set the post below the local frost depth, which your building department publishes, so freezing soil does not heave the post. Corner and gate posts carry more load and deserve deeper, wider holes.

How do I calculate fence materials on a slope?

Measure the fence length along the ground, not as a flat horizontal distance, and feed that into the calculator. A stepped fence keeps each panel level and drops in steps, leaving triangular gaps at the bottom; a racked fence follows the grade with the rails parallel to the slope and pickets kept vertical. Racking needs custom cuts, so add a bit more to your waste buffer on steep runs.

Do I need a permit to build a fence?

Under the model International Residential Code, fences not over 7 feet high are exempt from a building permit (Section R105.2), but that exemption does not override zoning, which is where most fence rules live: height limits, setbacks, corner visibility and pool-barrier rules. Your city may also amend the exemption, and a homeowners' association can add its own rules. Confirm your exact property line with a survey and check local height, setback and permit rules before you build.

How many fence posts do I need for 200 feet?

At the standard 8 ft spacing, a 200 ft fence needs ceil(200 / 8) + 1 = 26 posts, giving 25 sections and 50 rails at 2 per section. Drop to 6 ft spacing for a stiffer fence and it rises to 35 posts and 34 sections, about 35% more posts, holes and concrete. Add extra posts for every corner and gate on top of these straight-run figures.

How many pickets do I need for a 100 ft fence?

It depends on the picket pitch (board width plus gap). For a 100 ft (1,200 inch) fence: standard 1x6 boards (5.5 in) with a 1/4 in gap have a 5.75 in pitch, so 1,200 / 5.75 = 209 pickets. A no-gap 1x6 privacy fence needs 219, a spaced 1x6 with a 2.5 in gap needs 150, and narrower 1x4 boards with a 1/4 in gap need 320. Add about 10% for waste before buying.

๐Ÿ’ก Good to know

Match post spacing to your rail length

With 8 ft post spacing, one 8 ft 2x4 rail spans a section with no offcut, which is why the calculator defaults to 8 ft. Choose your spacing to match the rail stock you can buy locally and you will cut far less lumber.

The gap drives the picket budget

A no-gap 1x6 privacy fence needs 46% more pickets than 1x6 pickets spaced 2.5 inches apart (219 vs 150 per 100 ft). Decide your look first (tight privacy, a small quarter-inch gap, or airy spaced pickets), because it moves the board count more than anything else.

Set posts deeper than you think

Quikrete's instructions call for burying one-third of the overall post length, and in cold climates the post should also reach below your local frost depth so the fence does not heave in winter. Deeper, well-set posts in concrete are what keep a fence straight for decades.

Related Calculators