Fence Calculator

This fence calculator turns a fence length into a materials list: posts, rails, pickets and bags of concrete for setting the posts. Enter the total length, post spacing, fence height and any gates, and it works out how many sections the fence has and what each one needs.

You can match the numbers to your actual materials by setting the picket width and gap, the post type, and the diameter and depth of your post holes. It suits wood privacy fences, picket fences and similar post-and-rail designs, and is handy for checking a supplier quote.

Fence Calculator

How to Use the Fence Calculator

  1. 1

    Enter the fence layout

    Type the total fence length in feet, including gate openings, then set the post spacing (8 ft is standard), the fence height, the number of gates and the gate width.

  2. 2

    Set rails and pickets

    Leave Rails per section on Auto (2 rails up to 5 ft tall, 3 above) or pick 2, 3 or 4. Enter the picket width (5.5 in for a 1x6) and the gap between pickets, which is 0 for a privacy fence.

  3. 3

    Describe the post holes

    Choose the post type and enter the hole diameter and depth in inches. The defaults are a 4x4 post in a 10 in wide, 24 in deep hole.

  4. 4

    Read the materials list

    Results update as you type: posts and suggested post length, rails, pickets for the fence and gates, and concrete per hole with 80 lb and 50 lb fast-setting bag counts.

How the fence calculator works

The calculator treats the fence as one straight run. It first removes the gate openings from the length, then divides what is left by the post spacing and rounds up to get the number of sections. A straight run needs one more post than it has sections, and each gate splits the run, which adds one more post per gate.

Each section gets 2 or 3 rails, each as long as the post spacing. Pickets are the width to cover in inches divided by the picket width plus the gap, rounded up, calculated separately for the fence and the gates. For concrete, each hole is a cylinder, minus the space the post takes up, converted from cubic inches to cubic feet. Bag counts use typical yields of 0.6 cu ft per 80 lb bag of standard concrete and 0.375 cu ft per 50 lb bag of fast-setting post mix.

Sections = ⌈(fence length − gates × gate width) ÷ post spacing⌉
Posts = sections + 1 + gates
Rails = sections × rails per section
Pickets = ⌈width in inches ÷ (picket width + gap)⌉
Concrete per hole (cu ft) = (3.1416 × (diameter ÷ 2)² − post area) × depth ÷ 1728

Worked example: 150 ft privacy fence with one gate

Take a 6 ft tall privacy fence, 150 ft long, with one 4 ft gate, posts every 8 ft, 5.5 in pickets with no gap, and 4x4 posts set in 10 in wide, 24 in deep holes.

  • Fenced length: 150 − 4 = 146 ft. Sections: 146 ÷ 8 = 18.25, rounded up to 19.
  • Posts: 19 + 1 + 1 gate = 21 posts, each about 8 ft long (6 ft above ground plus 2 ft in the hole).
  • Rails: a 6 ft fence gets 3 rails per section, so 19 × 3 = 57 rails of 8 ft.
  • Pickets: 146 × 12 ÷ 5.5 = 318.5, so 319 for the fence, plus 48 ÷ 5.5 = 8.7, so 9 for the gate. Total 328.
  • Concrete: each hole holds 0.92 cu ft after subtracting the post, so 21 holes need 19.34 cu ft. That is 33 bags of 80 lb concrete or 52 bags of 50 lb fast-setting mix.

Materials for common fence lengths

Straight runs with no gates, 6 ft tall, 8 ft post spacing, 3 rails per section, 5.5 in pickets with no gap, and 4x4 posts in 10 x 24 in holes.

Fence lengthSectionsPostsRailsPickets80 lb bags50 lb fast-set bags
50 ft78211101320
100 ft1314392192235
150 ft1920573283150
200 ft2526754374064
300 ft38391146556096

Concrete per post hole

Concrete for one hole around a 4x4 post (3.5 x 3.5 in actual). The bag figures are fractions of a bag per hole; the calculator totals all holes before rounding up.

Hole (diameter × depth)Concrete per hole80 lb bags per hole50 lb fast-set bags per hole
8 × 18 in0.40 cu ft0.661.06
10 × 24 in0.92 cu ft1.532.46
12 × 24 in1.40 cu ft2.333.74
12 × 30 in1.75 cu ft2.924.67
12 × 36 in2.10 cu ft3.505.60

Tips and common mistakes

  • Measure each straight run separately if the fence turns corners. Every corner and end needs its own post, and a run that does not divide evenly by the spacing gets one shorter section.
  • Keep post spacing at 8 ft or less for wood fences so standard 8 ft rails reach from post to post. Wider spacing lets rails sag and pickets warp.
  • Buy 5 to 10% extra pickets. Some will be split, warped or badly knotted, and you will cut a few to fit short sections.
  • Dig holes about 3 times the post width and 1/3 to 1/2 as deep as the fence is tall above ground, and in cold climates below the local frost line, which may be deeper.
  • Remember gate hardware and gate frames, which are not included, and check your property line before digging.

Before you build

Many towns limit fence height and set how far a fence must sit from property lines, sidewalks and pools, and some require a permit. Pool barriers have their own strict rules. Call 811 (or your local utility locating service) a few days before you dig so buried lines are marked, and check local code and any homeowners association rules before you order materials.

Features

  • Posts, rails and pickets from fence length and post spacing
  • Accounts for gates (extra posts and gate pickets)
  • Auto 2 or 3 rails per section based on height, or pick your own
  • Picket count from picket width and gap
  • Concrete per post hole with 80 lb and 50 lb fast-setting bag counts

Frequently Asked Questions

How many fence posts do I need for 100 feet?

With posts every 8 ft, a straight 100 ft fence has 100 ÷ 8 = 12.5 sections, rounded up to 13, so it needs 14 posts. Each gate adds another post, and each corner can add one if the corner does not fall exactly on the spacing. With 6 ft spacing, the same fence needs 17 sections and 18 posts.

How many pickets are in an 8 foot fence section?

An 8 ft section is 96 inches wide. With 5.5 in pickets (the actual width of a 1x6) butted tight for privacy, you need 96 ÷ 5.5 = 17.5, rounded up to 18 pickets. With a 0.5 in gap, each picket and gap takes 6 in, so you need 16. With 3.5 in pickets and a 2.5 in gap, you also need 16.

Does a fence need 2 or 3 rails?

A common rule is 2 rails for fences up to about 5 ft tall and 3 rails for taller fences, such as a 6 ft privacy fence. The middle rail keeps long pickets from bowing and warping. The calculator uses that rule on Auto, and you can choose 2, 3 or 4 rails yourself. Heavier or taller designs may call for more.

How deep should fence posts be?

A common guideline is to bury 1/3 to 1/2 of the post's above-ground height, so a 6 ft fence needs holes about 24 to 36 in deep, and an 8 ft post for a 24 in hole. In areas where the ground freezes, set the post below the local frost line to prevent heaving. Your local building department can tell you the frost depth.

How many bags of concrete do I need per fence post?

For a 4x4 post in a 10 in wide, 24 in deep hole, the concrete fills about 0.92 cu ft once you subtract the post. That is about 1.5 bags of 80 lb concrete (0.6 cu ft each) or about 2.5 bags of 50 lb fast-setting mix (0.375 cu ft each). A 12 x 36 in hole takes about 2.1 cu ft, or 3.5 bags of 80 lb concrete.

How far apart should fence posts be?

Most wood fences use posts 6 to 8 ft apart, measured center to center. Eight feet is the most common because it matches standard 8 ft rails and keeps waste low. Use closer spacing for tall fences, heavy materials or windy sites. Vinyl and metal fence panels come in fixed widths, so follow the manufacturer's spacing for those.

Last reviewed