Skip to main content
Fence Calculator
Free fence calculators, no signup

Fence Calculator: Posts, Pickets, Panels, Concrete and Cost

Enter your fence length, height, material and layout to estimate posts, post spacing, rails, pickets, panels, concrete, gates, waste and cost. Every result shows its formula.

Fence calculator

Enter your specs. Every result updates live and shows its formula.

ft
Advanced settings
Local prices (optional)

Enter your own local unit prices to see a cost estimate. Leave blank to skip cost.

Saved quotes

No saved quotes yet.

Enter your fence length to see the full material and cost breakdown.

What can this calculator estimate?

One input set drives every count, so the numbers stay consistent from posts to concrete.

  • Posts

    Line, corner, end and gate posts, counted from your sections and layout.

  • Rails

    Rails per section times the number of sections, from the two, three or four rail rule by height.

  • Pickets

    Board count from picket width, gap and run length. Board-on-board counts its overlap.

  • Panels

    Full and cut panels from your panel width, so a 96 foot run with 8 foot panels is 12 panels, not 13.

  • Concrete

    50, 60 and 80 lb bag counts from your hole size and total post count.

  • Gates

    Gate openings are deducted from the fence run, and each gate adds two gate posts.

  • Waste

    A waste percentage you control, applied to pickets and panels only.

  • Cost

    Material and labor estimate from your own prices, shown by the linear foot and total.

How the fence calculator works

Nine steps from fence length to a costed bill of materials. The same process the tool runs, in plain terms.

  1. 01

    Enter fence dimensions

    Total length and height of the fence run.

  2. 02

    Choose fence type

    Material and style, for example cedar privacy or vinyl panel.

  3. 03

    Set post spacing

    Typically 8 ft for wood and vinyl, 10 ft for chain link.

  4. 04

    Account for gates and openings

    Gate widths are deducted from the run and add two posts each.

  5. 05

    Calculate sections

    Sections are the number of post-to-post spans in the run.

  6. 06

    Calculate rails, pickets or panels

    Infill counts follow from the section count and your board or panel widths.

  7. 07

    Estimate concrete

    Bag counts come from the hole diameter, depth and post count.

  8. 08

    Apply waste

    A percentage you choose, most often 10 percent, applied to infill.

  9. 09

    Estimate cost

    Enter your own unit prices to turn the bill of materials into a budget.

Fence calculations, worked out

Real scenarios with the numbers this calculator produces. The same formulas are shown next to every result in the tool.

  • 100 foot privacy fence, 6 ft tall

    Length 100 ft
    Height 6 ft
    Post spacing 8 ft
    Waste 10%

    13 sections, 14 posts (12 line, 2 corner), 39 rails at 3 per section, 221 wooden pickets at 5.5 in width and 0.5 in gap, about 15.3 ft³ of concrete (26 bags at 80 lb).

    Sections come from 100 divided by 8, rounded up. Each section needs three rails at this height, and the picket count is the run in inches over a 6 in pitch, then plus 10% waste.

  • 50 foot picket fence, 4 ft tall

    Length 50 ft
    Height 4 ft
    Post spacing 8 ft
    Picket pitch 7 in
    Waste 10%

    7 sections, 8 posts, 14 rails at 2 per section, 95 pickets at a 7 in pitch (3.5 in board plus 3.5 in gap), about 8.7 ft³ of concrete (15 bags at 80 lb).

    At 4 ft the rail rule gives two rails per section. Picket pitch is the 3.5 in board plus the 3.5 in gap, so the 50 ft run of 600 inches needs about 86 boards before waste.

  • 150 foot chain-link fence

    Length 150 ft
    Post spacing 10 ft
    Posts 16
    Concrete 17.5 ft³

    15 sections, 16 posts (14 line, 2 corner), 15 rail lengths at 1 per section, about 17.5 ft³ of concrete (30 bags at 80 lb).

    Chain link runs its 10 ft post spacing, so 150 feet splits into 15 spans and 16 posts. Standard chain link has no pickets or panels, so the infill is the fabric itself. See the chain-link calculator.

  • 100 foot fence with a 4 ft gate

    Length 100 ft
    Gate width 4 ft
    Post spacing 8 ft
    Waste 10%

    Effective run of 96 ft, 12 sections, 15 posts (11 line, 2 corner, 2 gate posts), 36 rails, 212 pickets, about 16.4 ft³ of concrete (28 bags at 80 lb).

    The gate deducts 4 ft from the run, leaving 96 ft of fence. The gate adds two posts but those posts also serve as the endposts of the adjacent sections, and the rails and pickets only cover the fenced part, not the opening.

  • A fence run on a 10% slope

    Flat run 100 ft
    Slope 10%
    Slope-adjusted run 100.5 ft

    14 posts, 39 rails, 221 pickets, identical to the flat 100 ft case: the calculator shows the longer on-the-ground length (100.5 ft), and counts stay based on the flat run.

    The tool reports the actual on-the-ground length of the run, which is slightly longer than the horizontal distance. Post counts, rails and pickets follow the flat run, so the only change you see is the slope-adjusted length. For left-of-right posts on a steep slope, see the fence slope calculator.

How many fence posts do I need?

The count comes from your sections, then gets adjusted for the parts of the run that need dedicated posts.

Sections are the post-to-post spans in the run. Add one for the post at each end of every section, and you have the posts along the run.

Real projects add posts beyond the line. Every corner needs its own post, every dead end needs an end post, and every gate opening needs two heavier gate posts.

Partial sections still need their posts: if 90 ft of fence is spaced at 8 ft, that is 11.25 sections, and the calculator rounds up to 12 because the leftover 2 ft still needs a post at its end.

Irregular layouts and slopes change the job, not the math. Lay out your actual corners and gate positions first, then count sections along each straight run between them.

The post count formula

  • sections = max(ceil(effective run / post spacing), 1)
  • posts along run = sections + 1
  • line posts = (sections + 1) - named posts
  • total = line posts + corners + ends + 2 x gates

If you would rather count by hand, measure your layout, fix the post spacing, and add one post to the section count.

How many pickets do I need?

Picket count is board width plus gap, repeated across the run, then rounded up and padded for waste.

Each picket takes up its board width plus the gap beside it. That sum is the pitch, and the picket count is the run length divided by the pitch.

Fence height does not change the number of pickets, only the length of each board. Buy boards at the height you need, not extra pieces.

Waste covers cuts, breaks and the occasional board that splits. Ten percent is the common buffer for wood pickets.

Board-on-board privacy fences overlap neighboring pickets by about an inch, so the pitch shrinks to roughly board width minus that overlap, and you need more boards per foot than a gapped fence.

The picket count formula

  • pitch = picket width + gap (inches)
  • boards = ceil(run length in inches / pitch)
  • total = ceil(boards x (1 + waste %))
  • board-on-board: pitch = picket width - 1 inch overlap

A 100 ft run with 5.5 in boards and 0.5 in gaps has a 6 in pitch, so 1200 inches / 6 = 200 boards, plus 10% waste gives 221.

Tip: picket fences with wide gaps use the same pitch rule with a bigger gap.

How much concrete do I need?

Concrete volume is a cylinder per post hole, multiplied by the total post count.

Each post hole is a cylinder. Its volume is pi times the square of the hole radius times the depth. Multiply that by the number of posts and you have the total concrete volume.

The calculator then divides by the yield of a standard bag: 0.375 ft³ for 50 lb, 0.45 ft³ for 60 lb and 0.6 ft³ for 80 lb bags, and rounds up.

There is no single "correct" number of bags for a fence. It depends on the post size, hole depth, soil, fence height, local frost depth and any code requirements. The figures here are a planning estimate, not a universal quantity.

Gate and corner posts carry more load, so they usually want bigger holes and more concrete than intermediate line posts.

The concrete volume formula

  • per-hole volume = pi x (hole diameter / 2)^2 x depth
  • total volume = per-hole volume x total posts
  • bags = ceil(total volume / bag yield)

Real requirements vary with soil, frost depth and local code. Verify with a licensed contractor or your local building department before you dig.

How much does a fence cost?

A fence budget has more line items than the panels themselves. Plan for all of them.

The biggest items are the fence material itself, the posts and rails, the concrete, and the gates with their hardware. Labor and removal of an old fence often rival the material cost on installed jobs.

Permits, disposal fees and local price differences round out the total. Prices vary enough by region and season that a fixed national price list would be fiction, which is why this calculator asks for your own unit prices.

A quick comparison of common materials, in relative terms rather than dollar figures:

Fence typeMaintenancePrivacyRelative cost
Wood privacyStain or seal every few yearsHigh$$
Chain linkLow, occasional tensioningLow$
VinylWash only, no paintingHigh$$$
AluminumLow, inspect coatingLow$$$
CompositeLow, periodic cleaningHigh$$$$
Split railStain or leave to weatherLow$$

Choose your fence type

Short, practical notes on the common types, where they fit, and which calculator goes with each.

  • Wood

    The classic residential fence. Takes stain or paint, can be any height, and is easy to repair one board at a time.

    Use:
    Privacy, boundaries, general residential use
    Pro:
    Lowest upfront material cost and easiest to customise
    Con:
    Needs staining or sealing every few years
    Wood fence calculator
  • Privacy

    Tall, solid wood fencing with no gaps. The most common backyard fence in many regions.

    Use:
    Backyard privacy, pool screening, noise
    Pro:
    Full visual screening when built correctly
    Con:
    More material per foot than open styles, and more wind load
    Privacy fence calculator
  • Picket

    Short, spaced boards on rails. Decorative rather than private.

    Use:
    Front yards, pet boundaries, curb definition
    Pro:
    Friendly look and visible through, so it stays inviting
    Con:
    No privacy and limited security by itself
    Picket fence calculator
  • Chain Link

    Galvanised steel mesh on round posts. Utilitarian and durable.

    Use:
    Large runs, security, backyards on a budget
    Pro:
    Economical and quick to install over long runs
    Con:
    No privacy, and it can look industrial
    Chain link fence calculator
  • Vinyl

    PVC panels on vinyl posts. Mimics wood without the painting.

    Use:
    Low-maintenance residential privacy
    Pro:
    No painting or staining, holds color for years
    Con:
    Higher upfront material cost
    Vinyl fence calculator
  • Aluminum

    Ornamental metal panels. Stronger than vinyl, more elegant than chain link.

    Use:
    Front yards, pools, decorative boundaries
    Pro:
    Durable, rust-free and low maintenance
    Con:
    No visual privacy, higher cost per foot
    Aluminum fence calculator
  • Composite

    Wood-and-plastic blend boards. Heavier and more rigid than vinyl.

    Use:
    Privacy fencing that lasts without refinishing
    Pro:
    Wood look with very low maintenance
    Con:
    The most expensive option of the common types
    Composite fence calculator
  • Split Rail

    Long rails between chunky posts. Rustic, open, and fast to build.

    Use:
    Acreage, large properties, decorative borders
    Pro:
    Covers long runs cheaply
    Con:
    No security or privacy
    Split rail fence calculator
  • Farm / Livestock

    Woven wire, barbed wire or high-tensile fence for containing animals.

    Use:
    Pastures, paddocks, boundaries for animals
    Pro:
    Built for containment over long distances
    Con:
    Needs gates and bracing designed for large open runs
    Cattle Fence Calculator
  • Pool

    Safety fencing required around pools. Code heights and gaps are strict.

    Use:
    Pool safety compliance
    Pro:
    Meets child-safety barrier rules when specced right
    Con:
    Local code rules on gaps, height and gates apply everywhere
    Pool fence calculator
  • Garden

    Light fences to keep animals out of beds. Often short, sometimes electric.

    Use:
    Vegetable patches, flower beds, compost areas
    Pro:
    Cheap and easy to add or move
    Con:
    Not a barrier for people or large animals
    Garden Fence Calculator
  • Dog

    Sized and reinforced to contain a dog. Height and dig-in matter more than looks.

    Use:
    Dog runs, yard containment
    Pro:
    Stops escapes when the height matches the breed
    Con:
    Determined dogs need buried mesh, not more fence height
    Dog fence calculator

What materials do you need to build a fence?

The bill of materials comes from the same estimate as the calculator. Every item has a job.

  • Posts

    The backbone. Set in concrete, spaced at your chosen interval.

  • Rails

    Horizontal boards the pickets or panels attach to. Two, three or four per section based on height.

  • Pickets

    The vertical boards that make a wood fence. Their spacing sets the look and privacy.

  • Panels

    Pre-assembled sections for vinyl, aluminum and some wood styles.

  • Concrete

    Sets the posts so they stand plumb and survive frost heave.

  • Fasteners

    Nails, screws or staples that hold pickets and rails to the posts.

  • Gate hardware

    Hinges, latches and closers. Never skip the self-closing hinge on a pool fence.

  • Post caps

    Cover the open end of each post so water does not split the wood.

  • Brackets

    Metal hangers for rails on posts, common in panel systems.

  • Gravel

    A few inches at the bottom of each post hole improves drainage and keeps posts from rotting.

Before you calculate your fence

Thirteen things to settle before the numbers mean anything. Most re-estimates happen because one of these was skipped.

  • Total fence length
  • Fence height
  • Fence type and material
  • Gate positions and widths
  • Corners
  • Ends and dead ends
  • Post spacing
  • Terrain and slope
  • Soil type
  • Local building code and frost depth
  • Property line location
  • HOA rules
  • Waste allowance
  • Local material prices

Common fence calculation mistakes

The same handful of errors show up on every forum. Each costs a return trip to the store.

  • Forgetting the gates

    Every gate opening shrinks the fence run and needs two dedicated posts. Deduct the gate width before counting sections.

  • Forgetting corner and end posts

    Line posts carry the middle of the run. Corners and ends carry the turns and dead ends, so count them separately.

  • Using the wrong post spacing

    Eight feet is standard for wood and vinyl, ten for chain link. Using the lumberyard default when the plan calls for six feet shortens every span and wastes rails.

  • Ignoring slope

    A sloped run is longer on the ground than it is on paper. The calculator shows the slope-adjusted run, but material counts follow the flat run, so plan the post stepping separately.

  • Forgetting waste

    Every board count needs a waste factor. Ten percent covers the picket that splits and the crooked cut.

  • Confusing panel width with coverage width

    An 8 ft panel does not always cover 8 ft on center. Check the coverage width on the box before dividing the run by it.

  • Buying too few pickets

    Count the gap, not just the board. A 100 ft run of 5.5 in boards with 0.5 in gaps needs 200 boards, not 218.

  • Forgetting the concrete

    Posts need setting. Count bags from the hole size and post count before assuming the lumberyard order is done.

  • Forgetting gate hardware

    Hinges, latches and closers are a line item. On a pool fence a self-closing hinge is required by code.

  • Skipping local requirements

    Permits, frost depth, HOA rules and property lines outrank any calculator. Settle them before buying a single board.

Fence calculation formulas

The same math the calculator runs, in plain terms. Nothing here is a black box.

  • Sections

    sections = max(ceil(effective run / post spacing), 1)

  • Post count

    posts = (sections + 1) along the run, minus named corner and end posts already placed, plus 2 gate posts per gate

  • Effective run

    effective run = total length - sum of gate widths

  • Rail count

    total rails = sections x rails per section

  • Picket count

    pickets = ceil(run in inches / (picket width + gap)); total = ceil(raw x (1 + waste %))

  • Board-on-board pitch

    pitch = picket width - 1 in overlap

  • Panel count

    full panels = floor(run / panel width); add 1 cut panel if the remainder is over 0.01 ft; total = ceil(raw x (1 + waste %))

  • Concrete volume

    per-hole = pi x (diameter / 2)^2 x depth; total = per-hole x posts; bags = ceil(total / bag yield)

  • Slope-adjusted run

    slope run = effective run / cos(atan(slope % / 100)); shown alongside, counts use the flat run

  • Cost

    materials = (posts x post price + rails x rail price + infill x unit price + 60 lb bags x bag price) x regional multiplier; labor = effective run x labor per ft x terrain multiplier x regional multiplier; installed total = materials + gate hardware + removal + permit + labor

Every number the calculator shows comes from these formulas applied to your inputs.

Fence planning guide

Fourteen steps from first measurement to a materials list you can buy from.

  1. 01 Measure the fence line
  2. 02 Mark corners and ends
  3. 03 Plan gate positions and widths
  4. 04 Choose the fence type
  5. 05 Choose the fence height
  6. 06 Determine post spacing
  7. 07 Calculate the posts
  8. 08 Calculate the rails
  9. 09 Calculate pickets or panels
  10. 10 Calculate the concrete
  11. 11 Add waste
  12. 12 Estimate the cost
  13. 13 Check local requirements
  14. 14 Create the final materials list

Which calculator do I need?

A quick map from fence type to the right tool.

Fence typeTypical useKey componentsCalculator
Wood privacy Backyard screening Posts, rails, pickets, concrete Wood fence calculator
Wood picket Front yard boundary Posts, rails, pickets, caps Picket fence calculator
Chain link Security and large runs Posts, fabric, tension wire Chain link fence calculator
Vinyl panel Low-maintenance privacy Posts, panels, brackets Vinyl fence calculator
Aluminum Decorative and pool Posts, ornamental panels Aluminum fence calculator
Composite Privacy, no refinishing Posts, boards, rails Composite fence calculator
Split rail Acreage and farms Posts, rails, braces Split rail fence calculator
Pool Pool code barrier Panels, gates, self-closing hardware Pool fence calculator

Frequently asked questions

Answers to what people ask most.

What is Fence Calculator and what does it do?

Fence Calculator is a free tool that turns your fence length, height, material and style into a full material list: posts, rails, pickets or panels, concrete bags and hardware, each with its formula shown. Enter your own local prices to see a cost estimate too. There is no signup and no installation.

Is it free to use?

Yes. Every calculator on this site is free with no signup and no usage limit. The site is supported by advertising, which is never shown inside the calculator results themselves.

Do I need an account?

No. The calculator runs entirely in your browser. Nothing needs to be installed, and there is no account to create.

Does it work on mobile?

Yes, the calculator is built to work on a phone, tablet or desktop. Inputs and results are laid out to stay usable on a small screen rather than being a shrunk desktop layout.

Is my data private?

Yes. Every value you type into the calculator is processed in your browser and is never sent to us. If you copy a share link, its values only leave your device if you send that link yourself. See the privacy policy for the full detail.

How accurate are the results?

Material quantities (posts, rails, pickets, concrete) are computed directly from your inputs using the formulas shown next to each result, so they are as accurate as the numbers you enter. Cost figures are only shown once you enter your own local unit prices; this site does not publish a fixed national price list, since real prices vary too much by region and supplier to state as fact. Always verify post depth and any local code requirement with a licensed contractor before you dig.

How far apart should fence posts be placed?

Standard fence post spacing is typically 6 to 8 feet apart on center. Heavy materials like privacy wood fences often use 6-foot or 8-foot spacing to prevent sagging, while chain link and lighter vinyl fences commonly use 8-foot or 10-foot intervals. Our calculator lets you choose your post spacing so all post, rail and picket counts automatically adjust.

How deep should fence post holes be dug?

As a general construction guideline, fence posts should be set one-third to one-half of their above-ground height deep, which is typically at least 2 feet (24 inches) for a standard 6-foot fence. In colder climates, post footings must extend below the local frost line to prevent ground heaving. Always check local building codes and verify utility lines before digging.

How do I calculate the number of fence posts I need?

Divide the fence run by your post spacing and round up to get the number of sections, then add one post for each end of every section. Add separate posts for every corner, end and gate opening. The calculator does this automatically and shows the formula next to the result.

How many pickets do I need for my fence?

Divide the fence run in inches by the sum of the picket width and the gap, then add a waste factor. For board-on-board fences, use the board width minus the overlap instead. For example, a 100 ft run with 5.5 in boards and 0.5 in gaps needs about 200 boards before waste.

How much concrete do I need for fence posts?

The volume of one post hole is pi times the square of the hole radius times the depth. Multiply by the number of posts and divide by the yield of a standard bag (0.375 ft³ for 50 lb, 0.45 ft³ for 60 lb, 0.6 ft³ for 80 lb). Actual needs vary with soil, frost depth and local code.

How do I account for a slope when planning a fence?

The calculator shows the slope-adjusted run length alongside your other numbers, while post, rail and picket counts stay based on the flat run. Use the Fence Slope Calculator to plan how to step the posts on a grade.

How do gate openings affect the calculation?

Each gate deducts its width from the fence run and adds two gate posts. Rails and pickets or panels are then counted on the remaining length only. A 100 ft fence with a 4 ft gate is calculated as a 96 ft run.

What waste percentage should I use?

10% is a common buffer for wood pickets, panels and rails. Use more if the plan has many cuts, angles or short sections, and less for simple straight runs.

How much does a fence cost per foot?

It depends on the material, height, terrain, labor and your local prices. Wood privacy fencing is usually the most affordable to build, vinyl costs more upfront, and composite is typically at the high end. This site does not publish fixed prices; enter your own unit prices in the Fence Cost Calculator for a real estimate.

Can I save my calculation and come back later?

Yes. The calculator can save a quote in your browser so you can reopen it later, and the current state can be shared as a link. Everything stays on your device.

Does the calculator work offline?

Yes. The site installs as a progressive web app, so after your first visit it keeps working without an internet connection.

What is board-on-board fencing?

Board-on-board places pickets on both sides of the rails so each picket overlaps the next by about an inch. It needs more boards than a gapped fence of the same width, and the calculator adjusts the pitch automatically when you choose that style.

Related fence calculators

52 calculators across eight categories, grouped so you can find the right one.

Wood Fences

Pickets, rails and posts for privacy and picket fences.

Metal & Chain Link

Chain link fabric, aluminum and ornamental panels.

Vinyl & Composite

Durable PVC, vinyl panels and composite fencing boards.

Posts & Foundation

Concrete, gravel and digging depth for a fence that stays put.

Measurement & Layout

Slopes, property lines, perimeters and panel layout.

Gates

Gate widths and swings for vehicles, people and animals.

Animals & Farms

Horse, livestock, dog and deer fence dimensions.

Cost & Materials

Material counts, stain coverage and budget estimates.

Ready to run the numbers?

The calculator above takes two minutes. Save the result as a quote, copy the link, or print the bill of materials.