Fence Calculator

Updated July 2026

Enter your total fence length and post spacing to see how many fence posts, sections or panels and rails you need — plus pickets if you add picket measurements, and an extra post for each gate. Switch between feet and meters. Everything runs privately in your browser.

On a straight run, posts = sections + 1. Divide the length by the post spacing and round up to get the sections, then add one closing post. Wider spacing means fewer posts and sections; closer spacing means more.
Default 8 ft (≈2.4 m). Center-to-center between posts.
Each gate adds a post and an opening in the fencing.
Same units as length. Leave blank to skip pickets.
Gap between pickets, same units as length.
Posts needed
Posts
Sections / panels
Rails
Pickets
Gate posts included

How this fence calculator works

The amount of material a fence needs is driven by two numbers: the total length of the run and the post spacing — the distance between the centers of neighbouring posts. Divide the length by the spacing and round up, and you have the number of sections (also called panels or bays). A straight run is closed off by one more post than it has sections, which is why posts = sections + 1.

Once you know the sections, the rest follows. Rails are the horizontal members that span each section, so total rails are sections multiplied by the rails per section you pick — typically 2 for low fences and 3 for taller ones. Pickets are optional vertical boards: add the picket width to the gap you want between boards and divide the length by that figure, rounding up. Each gate needs its own post and creates an opening, so the tool adds a post per gate and trims the fenced sections accordingly.

Worked example: a 100 ft straight fence at 8 ft spacing works out to ceil(100 ÷ 8) = 13 sections and 14 posts (13 + 1). With 3 rails per section that is 39 rails. Add one gate and you carry an extra post for it while the gate opening removes a slice of fencing.

Assumptions: a single straight run with posts spaced evenly center-to-center. Each corner or change of direction needs an extra post, and uneven ground or terminal/end posts may require small adjustments. Treat the figures as a close estimate and round up when ordering materials.

Frequently asked questions

How many fence posts do I need?
For a straight run, divide the total length by your post spacing and round up to get the sections, then add one for the closing post — posts = sections + 1. For example, 100 ft at 8 ft spacing gives 13 sections and 14 posts.
How far apart should fence posts be?
Most wood and panel fences use about 8 ft (≈2.4 m) spacing, which balances strength and cost. Heavier or windier sites use closer spacing like 6 ft, while light fences can stretch further. Match the spacing to your panel or rail length.
How many rails per section do I need?
Two rails suit fences up to about 4 ft tall; three rails are used for taller 5–6 ft fences for extra rigidity. Total rails equal the number of sections multiplied by the rails per section you choose.
How do I count fence pickets?
Add the picket width to the gap between pickets to get the spacing per picket, then divide the total length by that figure and round up. With 5.5 in pickets and a 0.5 in gap, each picket takes 6 in, so a 100 ft fence needs about 200 pickets.
Do gates change the post and section count?
Yes. Each gate needs its own post, so the calculator adds one post per gate. A gate opening also replaces a run of fencing, so the fenced sections — and the panels, rails and pickets you order — drop slightly versus an unbroken run.
How do corners affect the number of posts?
This tool assumes a single straight run. Every corner or change of direction needs its own post, so add one extra post per corner on top of the straight-run total, and treat each straight side as its own length for complex layouts.
⚡ Fence Calculator — by larely ↗

Related tools

Acreage Calculator

Calculate land area in acres, square feet, square meters and hectares.

Drywall Calculator

Work out how many sheets of drywall and how much compound you need.

Wallpaper Calculator

Estimate how many rolls of wallpaper you need, allowing for pattern repeat.

Soil Calculator

Calculate soil volume for raised beds and gardens, plus bags needed.

Grass Seed Calculator

Calculate how much grass seed you need for a new lawn or overseeding.

Decking Calculator

Estimate deck boards, joists and fasteners for a rectangular deck.

Carpet Calculator

Estimate carpet needed in square feet and yards, plus cost, for a room.

Mulch Calculator

Work out how much mulch you need in cubic yards and bags for a bed.

Brick Calculator

Estimate how many bricks you need for a wall, with mortar and waste.

Sod Calculator

Work out how much sod you need in pieces and pallets for a lawn.

Pool Volume Calculator

Calculate how many gallons or liters your pool holds by shape and depth.

Wall Framing (Stud) Calculator

Estimate studs and plate lumber for a framed wall at any stud spacing.

Browse all 251 free tools →