Calculator Bar

Fence Calculator

Fence Calculator

For one straight run. Add one post for each corner.

You need—

How to calculate fence materials

Sections = (fence length − gate widths) ÷ post spacing, rounded up Posts = sections + 1 + 1 per gate Rails = sections × rails per section Pickets = fenced length (in) ÷ (picket width + gap), rounded up

Example: 100 ft of 6 ft fence with one 4 ft gate, posts every 8 ft, 3 rails and 5½ inch pickets with no gap.

This assumes each stretch of fence between gates divides evenly into sections. If a gate splits the fence into runs that don't, each extra part-section needs one more post. Add 5–10% extra pickets for split or warped boards. Gates are usually bought or built as a kit with their own hardware.

Post depth

Set posts at least one-third of the fence height into the ground, and never less than 2 feet. A 6 ft fence needs posts about 2 ft deep, so buy 8 ft posts. In places where the ground freezes, the hole should go below the frost line, or frost can push the posts up over the winter. Your local building department can tell you that depth. Put a few inches of gravel in the bottom for drainage, and use the round column tab of the concrete calculator to work out concrete for each hole.

Fence heightMinimum post depthPost length to buy
3 ft2 ft6 ft
4 ft2 ft6 ft
5 ft2 ft8 ft
6 ft2 ft8 ft
8 ft2 ft 8 in12 ft

Before you dig, call 811 (in the US) to have underground utility lines marked. It's free. Check property lines and any HOA or city rules on fence height too.

Frequently asked questions

How many fence posts do I need?

Take away the gate openings, divide the rest by the post spacing, round up, and add one for the end post. Then add one post for each gate and each corner. 100 feet with a 4-foot gate leaves 96 feet: at 8-foot spacing that is 12 sections, so 13 posts, plus 1 for the gate = 14.

How deep should fence posts be?

A common rule is to bury at least one-third of the fence height, and at least 2 feet. A 6 ft fence needs posts about 2 ft deep, so an 8 ft post. In cold climates, set posts below the frost line to stop frost heave. Your local building department can tell you the depth.

How far apart should fence posts be?

6 to 8 feet is standard for wood fences. 8 feet suits common 8 ft rails. Use closer spacing for tall fences, windy sites or heavy boards.

How many rails does a fence need?

Two rails per section for fences up to about 4 ft tall, and three for 5–6 ft fences, so the pickets don't warp in the middle.

How much concrete per fence post?

For a 4×4 post in a 10-inch hole 2–3 feet deep, about 0.9–1.4 cubic feet once the post is subtracted. That's roughly 3 to 4 bags of 50 lb fast-setting mix, at about 0.375 cubic feet per bag. Check the yield printed on the bag. Use the concrete calculator's round column tab for other hole sizes.

See also

Last updated: November 23, 2026