Skip to content

Fence Posts and Panels Calculator

Enter the total length of the fence and the length of one panel from post to post, and you get the number of panels, the number of posts and the length of the last panel. Add gates, each with its width, and the page takes them off the length to cover and adds one post for every gate, since the two posts of a gate are the end posts of the two runs it creates. Tick the closed loop for a fence that returns to its first post, where there is one post per panel. Work in metres or feet. The arithmetic is exact, runs in your browser and nothing you type is sent anywhere.

Posts needed

11

10 panels of 2 m.
Posts without gates (panels + 1)
11
Added by the gates (1 per gate)
0
Length covered by panels
20 m
Length of the last panel
2 m (a full panel)
Panel length left over
0 m

Panels = ⌈(length − gates) ÷ panel length⌉. Posts = panels + 1 for an open fence and as many as panels for a closed loop, plus 1 for each gate: a gate cuts the fence into two runs, and its two posts are the end posts of those runs. The gates are assumed to sit inside the fence, not at an end. The panels are counted on the total length minus the gates; if each run is rounded up on its own, there can be up to one more panel per gate, depending on where the gates sit. Corners, slopes, gaps between panels and the depth of the posts are not included.

How it works

  1. Type the total length of the fence and the length of one panel, measured from post to post, in metres or in feet.
  2. Optionally type the number of gates and the width of one gate.
  3. Tick the closed loop if the fence goes all the way round and ends where it began.
  4. Read the panels, the posts, the posts added by the gates and the length of the last panel, then copy the summary.

What people use it for

  • Ordering for a garden boundary

    Cover 20 m with 2 m panels and see that it takes 10 panels and 11 posts, or 10 posts if the fence closes on itself.

  • Leaving room for a gate

    Take a gate off the length and read how many panels remain and how long the last one is cut.

  • Planning a paddock or a pen

    Use the closed loop to see that a fence round a pen needs as many posts as panels.

Questions

How are the panels and posts calculated?
Panels = ⌈(length − gates) ÷ panel length⌉. Posts = panels + 1 for an open fence and as many as panels for a closed loop, plus 1 for each gate. For 20 m with 2 m panels: 10 panels and 11 posts, or 10 posts as a closed loop. The last panel measures the length to cover minus the full panels before it: with 21 m it is 11 panels, the last one 1 m long.
How are the gates counted?
The total width of the gates, their number times the width of one gate, is taken off the length before counting the panels. A gate inside the fence cuts it into two runs, and the two posts of the gate are already the end posts of those runs, so each gate adds only 1 post. With 21 m, 2 m panels and one 1 m gate, that is 20 m, so 10 panels and 10 + 1 + 1 = 12 posts: posts at 0, 2, 4, 6, 8 and 10 m, the gate from 10 to 11 m, then posts at 11, 13, 15, 17, 19 and 21 m. A closed loop with a gate has 10 + 1 = 11 posts. The gates are assumed to be inside the fence, not at an end.
Which values are refused?
The length and the panel length must be above 0 and up to 1,000,000, the panel at least 0.01, the number of gates a whole number from 0 up to 1,000 and the width of one gate above 0 when there are gates. If the gates take the whole length, there is nothing left for panels and a message is shown. A closed loop needs at least 3 panels.
What is not included, and is the count exact with gates?
With gates, the panels are rounded on the total length minus the gates, because the page does not know where the gates sit. If each run between two gates is rounded up on its own, there can be one more panel per gate: with 21 m and a 1 m gate splitting the fence into runs of 10.5 m and 9.5 m, that is 6 + 5 = 11 panels instead of the 10 shown. Place your gates on a plan and count each run to be sure. Corners, slopes, gaps between panels, the depth of the posts, the rails, the concrete and the fixings are not in the page, and a panel is assumed to run from one post to the next. Measure your own layout, keep a spare panel if you want a margin, and check the rules of your area before building.