Fence Calculator
Estimate posts, rails, boards or panels and post-hole concrete. A gate needs its position. Prices are what you type. The result is not a structural design.
Quick answer A 100 ft run with posts at most 6 ft apart and no gate is 18 posts. Boards 5.5 in wide with a 0.5 in gap are 200 on a continuous pitch and 204 when each bay is bought separately. A gate needs a position. The planner does not add one post per gate without that position.
Method & assumptions
Bays = ceil(interval length ÷ maximum spacing); spacing = interval ÷ bays Posts are the interval ends and interiors, with shared nodes counted once Theoretical boards = cover ÷ pitch. Per-bay purchase ceils each bay and does not replace the theoretical count Concrete bags use hole volume minus the embedded post only, then one selected rounding
- Post spacing
- center-to-center distance between posts
- Hole Ø
- post-hole diameter, often about 3× post width
Assumptions & limits
- Several runs can share a node. The shared post is counted once.
- A gate at offset 0 starts at the run. The planner does not add one extra post per gate.
- Rail stock shorter than a bay is not treated as a splice unless you allow it.
- Bag yield, tax, and prices are the ones you enter. A blank price is not zero. Currency labels are not exchange rates.
- This is a material estimate, not a structural or code design. The planner does not choose post depth or a frost line.
Rounding: purchase quantities are always rounded up to whole units as sold. See our methodology.
Diagram
How to use this calculator
- Measure each run from node to node and enter the centerline length.
- Set the maximum post spacing. The planner divides each fenceable interval so the spacing is at most that maximum.
- Enter each gate offset and clear width. Offset 0 means the gate starts at the run. A missing length is an error, not a hidden post.
- Choose wood, cedar, vinyl, aluminum, or chain link. Vinyl and aluminum need the manufacturer coverage and center spacing you enter. Missing hardware stays blank.
- Enter hole size, the embedded post length, and the bag yield printed on your product. A blank yield does not become a bag count.
Worked examples
Imperial: 100 ft, no gate, 6 ft maximum
- 17 bays, equal spacing 100/17 ft, 18 posts.
- 5.5 in boards with a 0.5 in gap: theoretical 200. Per-bay purchase without shared offcuts: 204.
- Two rail layers and 8 ft stock: 34 sticks. A 4 ft stock without a splice is an error, not a joined rail.
Metric: the same 100 ft run
- 100 ft is 30.48 m. Six inches is 152.4 mm.
- Switching the unit control shows those values and does not change the 18 posts.
- Switching the currency label does not multiply any price.
Purchase: 100 ft, one 4 ft gate, opening at 48 ft, 8 ft maximum
- Shared jambs and a 4 ft opening at 48 ft leave two 48 ft intervals.
- Each interval is 6 bays. The unique post count is 14, and the three rail layers are 36 sticks.
- Boards 5.5 in wide with no gap are 2304/11 on the continuous pitch. Buying each bay separately is 216.
- Moving that opening to the start of the run changes the count to 13 posts. The older sections-plus-one-plus-gates figure is not used.
In depth: fence planning notes
Planning the line and the spacing
Start by marking the fence line with stakes and string, then measure along the string rather than along the ground. Gates take up part of the run, so subtract their widths before dividing by post spacing. A common spacing is 8 ft (2.4 m) for site-built wood fences, and 6 ft (1.83 m) for UK panel fences, where the panel width fixes the spacing. Closer spacing is stronger in exposed, windy locations.
Corners and ends are posts. A gate does not add one post by itself: the planner needs the gate offset, and shared nodes are counted once. A gate at the start of a run is not the same post count as the same gate in the middle. Sloping ground changes the picture: panels can be stepped, which may need taller posts on the downhill side, while site-built fences can be racked to follow the slope. Measure the horizontal length for spacing and allow for longer posts on steps.
Post holes and concrete
A rule of thumb is a hole about three times the post width and deep enough to set one-third of the post's height in the ground, or below the frost line where frost heave is a problem. For a 4 × 4 post with 6 ft above ground, that is roughly a 10–12 in hole about 2–3 ft deep. The concrete volume is the cylinder of the hole minus the part of the post inside it, which is why the calculator asks for both hole and post sizes.
Bagged concrete or fast-setting post mix is usually poured dry or mixed with a little water depending on the product; follow the bag instructions. Sloping the top of the concrete away from the post helps water run off. Some installers prefer compacted gravel for posts to improve drainage — in that case use the gravel calculator for the fill.
Before digging, contact your local utility locating service (811 in the US) and confirm property lines and any local height or permit limits. Fences on boundaries may need agreement with neighbors.
Reference table
| Fence type | What you still enter |
|---|---|
| Wood picket, up to 4 ft (1.2 m) | A maximum spacing you choose. The worked example uses 6 ft, not a hidden 8 ft default. |
| Wood privacy, 6 ft (1.8 m) | Rail layers and stock length. Three layers is an example, not an automatic count. |
| UK panel fence | The panel width from the product. 1.83 m is a common panel, not a built-in length. |
| Vinyl or aluminum | Manufacturer coverage and center spacing. The planner does not assume 6–8 ft. |
Key facts
- 4×4 post actual size
- 3.5 × 3.5 in
- Post depth rule of thumb
- ⅓ of above-ground height, below frost line
- 10 in × 30 in hole, 4×4 post
- ≈ 1.15 cu ft of concrete
Tips & common mistakes
- Call before you dig — utility locating is free in the US (811) and available in the UK and Australia.
- Set end and corner posts first, then string a line for the rest.
- Crown the concrete at the top so water runs away from the post.
Frequently asked questions
How many fence posts do I need for 100 feet?
With no gate and a 6 ft maximum spacing, a 100 ft run is 17 bays and 18 posts. A gate changes that count only after you enter its position. One 4 ft opening centered at 48 ft, with an 8 ft maximum and shared jambs, is 14 posts. The same opening at the start of the run is 13 posts.
How many bags of concrete per fence post?
The planner subtracts the embedded post from the hole volume, then divides by the yield printed on your bag and rounds the purchase up. Quikrete Concrete Mix 1101 lists about 0.375 cu ft for a 50 lb bag. That is not every 50 lb bag. A blank yield does not become a bag count, and the planner does not assume three or four bags.
How far apart should fence posts be?
Typically 6–8 ft (1.8–2.4 m) for wood fences. Panel fences use the panel width.
How deep should fence posts be?
A common rule is one-third of the above-ground height (about 2 ft for a 6 ft fence), and below the local frost line.
How many pickets do I need?
A 100 ft run of 5.5 in boards with a 0.5 in gap is 200 boards on the continuous pitch. Buying each of the 17 bays separately, without reusing offcuts, is 204. Those are different lines. The planner does not replace 200 with 204.
Sources
- Quikrete – Setting Posts in Concrete (PDF) — accessed : “Dig the post hole, making it three times the width of the post and at a depth equal to 1/3 to 1⁄2 of the above-ground length of the post, plus 6"”
- Quikrete – Concrete Mix No. 1101 data sheet (PDF) — accessed : “40 lb ≈ 0.30 cu ft, 50 lb ≈ 0.375 cu ft, 60 lb ≈ 0.45 cu ft, 80 lb ≈ 0.60 cu ft (17 L) per bag”
- Call 811 – Know what's below (US) — general reference — not cited for a specific figure
- Forest Garden (UK) – fence installation guides — general reference — not cited for a specific figure
Default values (yields, coverage rates and densities) are typical figures from manufacturer literature. Always check the label on the product you buy.
Related calculators
- Concrete Bag CalculatorHow many bags of concrete do you need? Compare 40, 60 and 80 lb or 20, 25 and 30 kg bags, total weight and cost — with the math shown.
- Board Foot CalculatorConvert lumber dimensions to board feet and cubic meters, and price hardwood or dimensional lumber by the board foot.
- Deck & Fence Stain CalculatorHow much deck or fence stain do you need? Gallons or liters by stain type, wood porosity and number of coats, rounded to real can sizes.
- Deck Board CalculatorWork out how many deck boards, joists, screws or hidden clips you need for a deck, using real board widths, gaps and stock lengths.
Learn more in our guides
Worked project examples
- Picket fence example — hypothetical quantities, not a client job.
Embed this calculator
Run a blog, forum or contractor site? Add this free fence calculator to your page. It resizes itself, has no ads and sets no tracking cookies.
Free for any site. Keep the small “Calculator by DIYCalcLab” credit visible; it is rel="nofollow" by design. No ads or tracking cookies inside the widget. Widget terms & all calculators.
Cite this calculator
DIYCalcLab. “Fence Calculator.” Nov 6, 2026. https://diycalclab.com/fencing/fence-calculator/
Estimates only. Verify quantities with your supplier and local building codes. For structural, electrical or safety-critical work, consult a licensed professional. Full disclaimer.