Auto/Utility

Fence Calculator

Estimate the posts and rails needed for a wood fence run.

  • Answers as you type
  • Every formula cited
  • Calculated in your browser
SettingsSettings for this calculationUS
Market
Imperial · sales tax
The total straight-line run of fence you're building.

For a fence with corners, measure and add up each straight section separately.

Tools needed: Tape measure, Stakes and string to mark the line

Closer spacing is sturdier but needs more posts and concrete.

8 ft is standard for most residential wood fences. Use 6 ft spacing for taller fences, high-wind areas, or heavier panel material.

Taller fences need more horizontal rails per section to resist wind and sagging.

Choose the range your fence height falls into.

How many times the fence line turns; each turn takes a post of its own.

The run is counted as if it were straight, with a post at each end. Every corner adds one post where the line changes direction, on top of the line posts; gates still need their own posts.

Estimated fence needed

14 posts

High confidence
Fence length
98 ft
Sections
13 sections
Line and end posts
14 posts
Corner posts
0 posts
Section width, as set out
7.54 ft
Rails needed
39 rails
Then change the inputs to see how far the answer moves.

Show calculation logic

How this was calculated

Formula source(s)

  • Post count = (fence length / post spacing) + 1; typical post spacing is 6-8 ft for wood fencing
  • Recommended rails: 2 for fences under 5 ft, 3 for 5-7 ft, 4 for 8 ft fences

Inputs used

Fence Length
98 ft
Post Spacing
8 ft (standard)
Fence Height
5-7 ft
Corners (changes of direction)
0

Intermediate steps

Fence length
98 ft
Sections
13 sections
Line and end posts
14 posts
Corner posts
0 posts
Section width, as set out
7.54 ft
Rails needed
39 rails
Final result14 posts

What this calculation does not cover

  • A part-bay at the end is rounded up to a whole section, so the count assumes every bay runs the full 6 or 8 ft you picked; the run is never redistributed into equal bays, and the last one comes out short unless you reset the spacing on site.
  • Rails are counted as one continuous piece per bay per course, so nothing is added for stock lengths that fall short of a post, splices, off-cuts or waste — there is no waste field on this page.
  • The rail count steps in three fixed jumps, two then three then four, so a 5 ft fence and a 7 ft fence sharing a band come back with the same three rails, and no part of the arithmetic responds to wind exposure or panel weight even though the height and spacing hints both raise them.
  • Height feeds the rail count and nothing else: it never sizes the posts, so the extra length buried below grade, the hole diameter and the concrete or gravel to set each one all sit outside this number.
  • Posts and rails are the entire output — pickets, boards or prefabricated panels, fasteners, post caps and end treatment against rot are counted nowhere in it.
  • Both spacing choices are stored as the imperial 6 ft and 8 ft, so the metric labels of 1.8 m and 2.4 m are rounded restatements of those figures, and a bay of any other size — a 2.0 m panel, say — cannot be entered at all.

Estimated cost — your price

This site holds no price list for this material — local prices vary too much to publish honestly. Enter your supplier's price and the result is costed with it.

20 ft5 m98 ft29.87 m7.54 ft2.3 m

Part of bigger jobs

This trade is one line of a job takeoff. Run the whole job and every other trade comes back with it, off the same measurements.

Or plan the space itself: measure it once, doors and windows included, and this figure comes back worked out on that space, with what goes with it.

Computed in your browser — nothing you enter is uploaded. Presented in US customary units and US trade terminology. Where a formula follows a published standard, that standard and its edition are cited beside it on this page; where none governs, the page says so. Local amendments override model codes — verify against the code in force where you build.

Sources checked 2026-10-11 · v1.0.1

Regulatory standards & verification citations2
  1. Post count = (fence length / post spacing) + 1; typical post spacing is 6-8 ft for wood fencing
  2. Recommended rails: 2 for fences under 5 ft, 3 for 5-7 ft, 4 for 8 ft fences
Cite this page

Your workspace

Most jobs need more than one number. Add the calculators you need next and they open right here, underneath this one — your figures stay on screen and nothing is lost to a page change.

Tools and safety for this job

To set fence posts and fix fence panels or boards. Generic types, no brands, no prices.

Protection this work requires

  • Hardwood dust is a recognised carcinogen: extract at the tool and wear a P2/N95 respirator when cutting or sanding indoors.
  • Wet cement and lime burn skin and eyes painlessly until the damage is done: waterproof gloves to EN 374, safety glasses whenever the mix can splash, and never kneel in wet mix in permeable trousers.
  • Saws, grinders and breakers run above 85 dB, where hearing damage accumulates and does not recover: defenders or plugs for every cut, not just the long ones.
  • Boards, blocks and bagged material cause most lasting back injuries on small sites: two people or a lifter for full sheets, and never a bag on one shoulder up a ladder.
  • Digging blind strikes gas, water and power every day: get the plans, scan with a cable avoidance tool, and hand-dig trial holes over anything you find.
Show the 10 tools this job needs

Essential

  • Cable and pipe detector

  • Claw hammer

  • Cordless drill/driver

  • Mixing bucket or tub

  • Post hole digger or auger

  • Spirit level

  • String line and pins

  • Tape measure

Recommended

  • Circular saw

  • Post driver

Also needed as materials: circular saw blades, drill and driver bits.

what each landscaping tool is for, and the spec that decides which to buy where one does.

Now that you have the number

These guides cover the work this quantity is for — the first ones run this calculator inside the section that raises the question.

Already have some? How long a fence will my posts set out?

Worked example: Privacy fence — step 2 of 7

Already gone wrong? My fence posts are rotting or the fence is leaning

The data behind it: Production rates by operation

How to calculate fence in 5 steps

  1. Fence LengthThe total straight-line run of fence you're building.
  2. Post SpacingCloser spacing is sturdier but needs more posts and concrete.
  3. Fence HeightTaller fences need more horizontal rails per section to resist wind and sagging.
  4. Corners (changes of direction)How many times the fence line turns; each turn takes a post of its own.
  5. Read the resultThe tool computes the result from those figures and shows the formula, its sources, and a confidence rating alongside it.

Frequently asked questions

Do I need a post at every corner?
Yes. Enter the number of corners and the page adds one post for each, on top of the line posts and the two end posts of the run.
How deep should fence posts be set?
A common rule of thumb is at least 1/3 of the post's above-ground height, set in concrete — check local frost-line depth requirements too, which can require deeper footings in cold climates.
Does this include gates?
No — gates need their own dedicated posts (typically sturdier than line posts) and hardware, calculated separately based on gate width.
What does the 'Section width, as set out' figure mean?
It is the fence length divided by the number of sections counted. The post and rail counts are the same either way; this row shows the width each bay comes to if you share the run evenly between those posts on site, instead of leaving the short last bay the count assumes, and it is never wider than the spacing picked. Evenly shared bays suit a fence built in place from rails and boards; ready-made panels come in one width and cannot be shared out, so with panels the last bay takes a panel cut down to fit instead.
Do I need the rail count if I am putting up ready-made panels?
No. A prefabricated panel — the usual garden fence panel in the UK, or a pre-built privacy section in North America — has its rails built in, so only the post count applies, along with the clips or brackets the panels hang by, or the slotted concrete posts used for panel fencing in the UK. The rail figure is for a fence built in place: horizontal 2×4 rails fixed to the posts in North America, or the triangular arris rails morticed into the posts of a UK closeboard fence.
Which spacing should I pick for UK panels 6 ft wide?
The 1.8 m (6 ft) option, knowing the page takes it as the distance between post centres. A panel 1.83 m (6 ft) wide between posts 100 mm (4 in) square puts the centres about 1.93 m (6 ft 4 in) apart, so on a long run this page can count a post or more beyond what the panels need. Set the posts out from the panels actually bought and treat this count as the upper figure.
How do I measure a fence on sloping ground?
By how the bays will meet the slope. A stepped fence keeps each bay level and drops at the posts, so its bays are set out on the level: measure the horizontal length, and expect the post on the low side of every step to stand taller, which this count does not size. A fence that follows the ground, with its rails parallel to the slope (racked, in North American usage), is measured along the slope, since each rail runs that sloping length. A square-made panel can only be stepped; a fence built in place can go either way.
Preliminary estimate, not certified engineering. This tool produces an indicative quantity calculation for planning purposes only — it is not a certified structural analysis, a guaranteed material takeoff, or a substitute for building department approval. Always verify measurements on-site and have a licensed contractor or structural engineer review any load-bearing, code-sensitive, or safety-critical work before purchasing materials or starting construction. Spotted an arithmetic or standards error? Report it to contact@craftquantities.com with your inputs — a confirmed fix gets a permanent check of its own, so the same mistake cannot come back.