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

Fence Calculator

Estimate posts, rails, pickets & concrete for your fence

๐Ÿšง Fence details

ft

Add up all the runs of fence (skip gate openings).

ft
Estimate pickets (privacy/picket fence)

Turn off for rail-only fences (split-rail, ranch, wire).

in
in

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

Concrete (optional)

A typical wood-fence post hole takes about 1-2 fast-setting 50-lb bags.

โœ…

Last updated June 2026

Method: Standard fence-layout geometry - posts from length and spacing, rails from sections, and pickets from length divided by picket pitch (board width plus gap). Concrete is estimated per post hole.

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 calculator: estimate posts, rails & pickets

Planning a fence comes down to four numbers: how many posts, how many rails, how many pickets, and how much concrete. Get those right and the trip to the lumberyard is painless; get them wrong and you are either driving back for more boards or stacking leftovers in the garage. This fence calculator turns your fence length, post spacing and picket size into a clean materials list - including a ready-to-shop count with a 10% waste buffer built in.

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, hit Calculate materials, and you get the post count up top with sections, rails, pickets and concrete bags below.

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.

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 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 is standard because rails come in 8 ft lengths; drop to 6 ft for a stiffer fence or windy sites.
  3. Rails per section: 2 for fences up to about 5 ft, 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: one to two 50 lb bags suits most 4x4 wood posts; bump it up for big or gate posts.

Hit Calculate materials and 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-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-39 rails (2-3 per section), and zero pickets - turn the picket estimate off. The cost lives almost entirely in posts and rails.

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 privacy fence can need 30-40% more boards than a spaced picket fence of the same length.
  • 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. A widely used rule of thumb is to bury about one-third of the post's above-ground height: a 6 ft fence usually wants posts set roughly 2 ft deep, which is why pressure-treated 4x4s are commonly sold in 8 ft lengths. Just as important is the frost line - the depth to which the ground freezes in winter. In cold climates that can be 36-48 inches; if a post bottom sits above it, freezing and thawing soil can heave the post up and out of plumb over a few seasons. Set the footing below your local frost depth wherever winters are hard.

For the footing itself, a typical line post in a 9-10 inch diameter hole, 24-30 inches deep, takes about one to two 50 lb bags of fast-setting concrete. Corner, end and especially gate posts carry far more load, so they usually get a wider, deeper hole and three to four bags each. 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 budget default for posts, rails and pickets. Inexpensive and easy to work, but it can warp and needs stain or sealer every few years to last.
  • Cedar & redwood: naturally rot- and insect-resistant, dimensionally stable, and attractive. They cost more than treated pine but hold up well with minimal finishing.
  • Vinyl (PVC): sold as panels and posts that snap together. High upfront cost, near-zero maintenance, and no painting - the picket math still applies if you buy boards rather than pre-built 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. A rough wood-fence material budget might look like posts at a few dollars each, rails similar, pickets at a dollar or two apiece, and a couple of dollars per bag of concrete - plus a line item for fasteners and hardware (screws, brackets, post caps, gate hinges and latches) that the calculator does not count.

Two more cost factors are easy to overlook. First, labor: if you hire out the install, labor often equals or exceeds the material cost, so a contractor quote of two to three times your material total is not unusual. 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 - 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: many cities and homeowners' associations cap fence height (often around 6 ft in back yards and 3-4 ft in front), require a permit for taller fences, and set back rules for corners near a street for visibility. Some areas also have a "good-neighbor" or finished-side-out convention 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 - 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.
  • 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 - always 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 - 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?

Six to eight feet on center is standard for most wood and vinyl fences; 8 ft is the most common because pre-cut rails are sold in 8 ft lengths. Closer spacing (6 ft) gives a stiffer, stronger fence and is better in high wind or for tall privacy panels. Wider spacing uses fewer posts but the rails can sag, so it is usually limited to light rail or wire fencing.

How many rails per section do I need?

Use 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 often use 2-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?

A typical 4x4 wood post in a 9-10 inch wide, 2 ft deep hole takes about one to two 50 lb bags of fast-setting concrete. Bigger 6x6 posts, gate posts and corner posts often need 3-4 bags because the holes are wider and deeper. 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?

Standard wood pickets are nominal 1x4 (3.5 inch actual) or 1x6 (5.5 inch actual) boards; dog-ear and flat-top fence boards are most often 5.5 inches. Wider 1x8 boards (7.25 inch) cover 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?

A common rule is to bury about one-third of the post's above-ground height, so a 6 ft fence usually needs posts set roughly 2 ft deep. In cold climates, set the post footing below the local frost line - often 36 to 48 inches - so freezing and thawing soil does not heave the post out of plumb. Corner and gate posts should go deeper and wider than line posts because they carry more load.

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?

It depends on your city and any homeowners' association. Many areas allow short fences without a permit but require one above a certain height (often around 6 feet), and most cap height and set rules for corners near a street. Always confirm your exact property line with a survey and check local height, setback and permit rules before you build.

๐Ÿ’ก Good to know

Rails come in 8 ft lengths for a reason

Standard pre-cut rails are sold at 8 feet, which is why 8 ft post spacing is the default - it lets a single rail span a section with no waste. 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 solid privacy fence with no gap can need 30-40% more pickets than a spaced picket fence of the same length. Decide your look first - tight privacy, small quarter-inch gap, or airy spaced pickets - because it moves the board count more than anything else.

Set posts deeper than you think

A common rule is to bury about one-third of the post length, and at least below your local frost line so the fence does not heave in winter. Deeper, well-set posts in concrete are what keep a fence straight for decades.

Related Calculators