Fence posts and rails

Posts, sections, and rails for one straight fence run.

Measured in

Feet. Greater than 0, up to 1,000.

Feet. Greater than 0, up to 1,000.

Greater than 0, up to 100.

One straight run, with a post at each end. The headline is the posts.

Enter the length, the post spacing, and the rails on each section.

How a run becomes posts

Divide the length by the post spacing. The page rounds that quotient up to a whole number of sections. Posts are the sections plus 1, so the run has a post at each end. Rails are the sections times the rails on each section.

Length and spacing are each greater than 0 and at most 1,000. Rails are greater than 0 and at most 100. A blank field, zero, or a negative number has no result. A spacing longer than the length is still one section and two posts. Switching the unit does not convert a number you already typed. The same division is used in feet and in metres.

How to use this fence calculator

  1. Choose feet or metres.
  2. Enter the length, the post spacing, and the rails on each section. Length and spacing are greater than 0 and at most 1,000. Rails are greater than 0 and at most 100.
  3. Read the headline. It is the number of posts. The rows below are the count before rounding up, the sections, and the rails.

Formula

The section count starts as the length divided by the spacing.

Sections before rounding
N=Ls

The page rounds that quotient up to a whole number of sections. Posts are the sections plus 1. Rails are the sections times the rails on each section. A run that divides evenly does not add an extra section.

Where the formula comes from

The section count starts as the length divided by the spacing, as on the Wikipedia page that defines division.

Worked examples

Example: 96 feet, spacing 8, 2 rails

96 ÷ 8 = 12, already a whole number, so there are 12 sections. Posts are 12 + 1 = 13. Rails are 12 × 2 = 24.

Example: 100 feet, spacing 8, 2 rails

100 ÷ 8 = 12.5 before rounding up, so the page uses 13 sections. Posts are 14. Rails are 13 × 2 = 26.

Example: 10 feet, spacing 6, 3 rails

10 ÷ 6 = 1.66666666667 before rounding up, so the page uses 2 sections. Posts are 3. Rails are 2 × 3 = 6.

Example: 24 metres, spacing 3, 2 rails

24 ÷ 3 = 8, already a whole number, so there are 8 sections. Posts are 9. Rails are 8 × 2 = 16.

Things to keep in mind

An 8 foot run with 8 foot spacing and 2 rails is 1 section, 2 posts, and 2 rails. A 25 foot run with 8 foot spacing and 2 rails is 3.125 before rounding up, so the page uses 4 sections, 5 posts, and 8 rails. A 7 foot run with 8 foot spacing is 0.875 before rounding up, so the page still uses 1 section and 2 posts. A 30 metre run with 8 metre spacing and 2 rails is 3.75 before rounding up, so the page uses 4 sections, 5 posts, and 8 rails. A near integer is shown as that integer. Other results keep 12 significant digits, and a trailing zero is left off the screen. This page is one straight run. It does not add a gate, pickets, or a price, and two runs that share a corner post are counted separately.

Fence calculator FAQ

Which fields are required?

Length, post spacing, and the rails on each section. Length and spacing are greater than 0 and at most 1,000. Rails are greater than 0 and at most 100. The starting unit is feet.

What are the rows under the headline?

The section count before rounding up, the whole sections, and the rails. The headline is the posts, which are the sections plus 1.

Why is there one more post than sections?

A straight run needs a post at each end. Twelve sections need 13 posts. One section needs 2 posts.

Does the page add a gate or pickets?

No. The count is posts, sections, and rails for one straight run. A gate, pickets, and a shared corner post stay out of the result.

Why is there no result?

A blank field, zero, or a negative number has no result. The same is true for a length or a spacing above 1,000, and for rails above 100. A spacing longer than the length still has a result.

Does this fence calculator store my dimensions?

A completed result can be saved in this browser’s local history, including the length, the post spacing, the rails on each section, and the unit you chose. It stays on your device and is not sent to our servers or to analytics. Clear it with the history Clear action or by clearing site data.