Fence Calculator

Calculate fence posts, panels, pickets, and rails using fence length, height, and post spacing. Includes gate openings, multiple sections, and material costs.

Category: Home Improvement Calculators

More options

Result

—

Enter your measurements and select Calculate.

Fence Calculator

Use this Fence Calculator to calculate the materials needed for a straight fence or multiple fence sections. Enter the fence length, height, and maximum post spacing to calculate fence posts, spans, pickets, panels, and rails.

The calculator supports metric and imperial measurements with individual unit selectors. You can also account for gate openings, picket spacing, ready-made panels, additional materials, and estimated costs.

How to Use the Fence Calculator

  1. Choose Fence Layout: Select Straight Fence or Multiple Fence Sections.
  2. Enter Fence Length: Provide the length of the fence.
  3. Enter Fence Height: Specify the required fence height.
  4. Enter Maximum Post Spacing: Provide the maximum distance between adjacent fence posts.
  5. Open More Options: Choose individual pickets or ready-made panels, enter gate opening width, adjust extra material, or add pricing.
  6. Calculate: Click Calculate to view the required materials.

If Multiple Fence Sections is selected, enter the number of identical sections.

How to Calculate Fence Posts

Fence post quantities depend on the fence length and maximum spacing between posts.

Step 1: Calculate Fence Spans

A fence span is the section between two adjacent posts.

Number of spans = Fence length ÷ Maximum post spacing

Round up to the next whole number.

For example, suppose a fence is 20 meters long and the maximum post spacing is 2.4 meters.

20 ÷ 2.4 = 8.33

Rounded up = 9 spans

Step 2: Calculate Fence Posts

For a single straight fence:

Number of posts = Number of spans + 1

Using the example:

9 + 1 = 10 posts

The fence requires 10 posts.

For multiple separate straight sections, the calculator calculates the posts for each section and multiplies by the number of sections.

How to Calculate Fence Pickets

Fence pickets are individual vertical boards installed across a fence.

The number of pickets depends on the fence length, picket width, and spacing between pickets.

Pickets required = Net fence length ÷ (Picket width + Gap)

Round up to the nearest whole picket.

For example, suppose you have:

Measurement Value
Fence length 20 m
Picket width 90 mm
Gap between pickets 10 mm
Gate openings 0 m

Convert the picket measurements into meters:

90 mm = 0.09 m

10 mm = 0.01 m

Calculate:

20 ÷ (0.09 + 0.01) = 200

Result: 200 pickets

The calculator uses the total effective length occupied by each picket and its spacing.

How to Calculate Fence Panels

For ready-made fence panels, enter the effective panel width.

Panels required = Net fence length ÷ Effective panel width

Round up to the nearest whole panel.

For example, suppose a fence is 18 m long and each panel provides 1.8 m of effective coverage.

18 ÷ 1.8 = 10 panels

The calculator provides the estimated number of complete panels required.

How to Calculate Fence Rails

Horizontal rails connect fence posts and support the fence infill.

Total rails = Number of fence spans × Rails per span

For example, a straight fence with 9 spans and 2 rails per span requires:

9 × 2 = 18 rails

The Rails per Span setting is available under More Options.

Calculating Multiple Fence Sections

If you have several identical straight fence sections, select Multiple Fence Sections.

The calculator uses the entered length for each section and multiplies the material quantities by the number of sections.

For example, three separate straight sections requiring five posts each would require:

3 × 5 = 15 posts

Each section is calculated independently.

Accounting for Gate Openings

Gate openings reduce the length requiring pickets or panels.

Net infill length = Total fence length − Gate opening width

For example, a 20 m fence with a total gate opening width of 2 m has:

20 − 2 = 18 m

The calculator uses the net infill length for picket or panel quantities. The post and rail counts are calculated separately using the full section lengths.

Frequently asked questions

How many fence posts do I need?

Divide the fence length by the maximum post spacing, round up to calculate the spans, and add one post for a single straight fence.

How far apart should fence posts be?

Post spacing depends on the fence design, materials, height, and installation requirements. Enter the maximum spacing appropriate for your project.

How do I calculate fence pickets?

Divide the net fence length by the combined picket width and gap, then round up to a whole picket.

Can I calculate ready-made fence panels?

Yes. Select Ready-made Panels under More Options and enter the effective panel width.

Does the calculator include fence rails?

Yes. Enter the number of rails per span to calculate the total rail quantity.

Can I subtract gate openings?

Yes. Enter the combined gate opening width under More Options. The calculator deducts this length when estimating pickets or panels.

Can I calculate multiple fence sections?

Yes. Select Multiple Fence Sections and enter the number of identical sections.

Can I calculate a fence using feet and inches?

Yes. The calculator supports both metric and imperial measurement units.

How do I calculate fence material cost?

Enter the price per picket or panel under More Options. The calculator multiplies the purchase quantity by the entered price.