GlobalFree to use

Fence calculator: posts, rails and pickets

Enter the fence length and post spacing to get the number of sections, posts, rails and pickets, with the picket width and gap you plan to use, in feet and inches or metres and centimetres.

Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.

Input

Tip: press Ctrl + Enter to run

Your result

Your result will appear here.

About this tool

Before ordering fence materials you need three numbers: how many posts, how many rails and how many pickets. This calculator turns the length of a straight fence run and the maximum post spacing into a section count, then works out posts, rails and, if you give the picket width and gap, the number of pickets, in feet and inches or metres and centimetres.

How to use it

  1. Choose imperial or metric and enter the length of the straight run.
  2. Enter the maximum distance you want between posts, such as 8 ft or 2.4 m. Panel fences use the panel width plus the post.
  3. Enter the number of horizontal rails in each section, usually 2 or 3.
  4. For a picket fence, enter the picket width and the gap between pickets, then run it to get the totals and the actual section length.

How the calculation works

The number of sections is the length divided by the maximum spacing, rounded up, so posts end up evenly spaced and never further apart than you asked. A straight run needs one more post than it has sections. Rails are sections multiplied by rails per section. Pickets are the run length, in inches or centimetres, divided by one picket width plus one gap, rounded up.

sections = ⌈length ÷ spacing⌉; posts = sections + 1; rails = sections × rails per section; pickets = ⌈length ÷ (picket + gap)⌉

Worked example

A 100 ft backyard fence with posts no more than 8 ft apart, two rails per section and 5.5 inch pickets with half-inch gaps needs 13 sections, 14 posts, 26 rails and 200 pickets. The posts end up 7.69 ft apart, which keeps every section the same length.

Sample input and result

100 ft, posts at most 8 ft apart, 2 rails, 5.5 in pickets with 0.5 in gaps: 13 sections, 14 posts, 26 rails, 200 pickets

Limitations

  • One straight run on level ground. Corners, gates and slopes need to be planned run by run.
  • It does not estimate concrete or gravel for post holes; use the concrete calculator for that.
  • Property lines, permits, height limits and buried utilities are not checked; confirm them locally before digging.

Last updated:

Frequently asked questions

Why are there more posts than sections?

A straight fence needs a post at each end, so a run of 13 sections has 14 posts.

How do I calculate a fence with corners?

Run each straight side separately and add the results, then subtract one post for every corner, because two sides share it.

How far apart should fence posts be?

Many wood fences use 6 to 8 ft (about 1.8 to 2.4 m), but the right spacing depends on the design, wind exposure, the rail size and any panels you buy. Check the product or plan you are following.

How do I add a gate?

Gate openings usually need their own posts, often heavier ones. Treat the fence on each side of the gate as a separate run and add the gate posts.

Why is the section length shorter than my spacing?

The tool spreads posts evenly along the whole run, so each section is the total length divided by the number of sections.

Troubleshooting

The picket count is missing.

It only appears when you enter a picket width. Leave the field empty for panel or chain-link fences.

I get more posts than I expected.

A straight run always needs a post at each end. If two runs meet at a corner, they share one post.

Privacy & Free to use

Are my inputs stored?

Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.

Is this tool free?

Yes. No signup or payment is required.

Processed in your browser

Useful next steps