Fence Calculator
Posts, panels and pickets for a fence, with the end and corner posts that simple division gets wrong. Gates are handled per run, because a gate splits the run it sits in.
Switching units keeps your measurements. Nothing is reset.
Your fence runs
How it is built
One panel spans one section between posts.
The opening, not the gate frame.
Estimated cost
Cost uses the price you enter. This product never shows invented market prices.
Your result appears here
Enter your measurements to see how much material to buy.
How to use this calculator
- 1
Enter each straight run separately. A fence along one boundary is one run; a fence that turns a corner is two.
- 2
Tick the corner box on any run that continues from the previous one. That tells the calculator the two runs share a post rather than each needing their own.
- 3
Say how many gates are in each run and how wide the opening is. Gate openings come out of the fenced length, and each gate adds a post.
- 4
Choose panels or pickets, then set the panel width or the maximum post spacing you will work to.
A worked example
Two 50 ft runs meeting at a corner, one 4 ft gate in the first run, panels 8 ft wide:
Take out the gate openings
100 ft − 4 ft96 ft
Sections between posts
round up 96 ft ÷ 8 ft13
Add the end, corner and gate posts
13 + 215
You will need
15 posts
This example is produced by running the calculator above, so it always matches what the tool does.
The formula
For each run, the gate openings are taken out to give the fenced length. That length is divided by the post spacing and rounded up to whole sections. Posts are sections plus one, because a run needs a post at each end, plus one more for each gate, because a gate needs a post on each side and only one of them is shared with the fence. A run that turns a corner from the previous one shares a post with it, so one is subtracted. Panels are one per section.
Setting out a fence
The endpoint is what a simple formula misses
A 100 ft fence at 8 ft spacing is 13 sections and 14 posts. Length divided by spacing gives 12.5, and rounding that to 13 leaves you one post short at the last corner. It is the most common fencing miscount there is.
Spacing is a maximum, not a target
Setting out at exactly the maximum leaves an awkward short section at the end of most runs. Most people divide the run into equal sections at or under the maximum instead, which is why the calculator rounds up rather than down.
Corner and end posts do more work
Ends, corners and gate posts carry loads that line posts do not, and are often set deeper, in more concrete, or in a heavier section. The counts above tell you how many of each you have so you can order accordingly.
Gates need clearance, not just an opening
The gate width to enter here is the opening between posts. A gate leaf is made slightly smaller than that to allow for hinges and a latch, so ordering a gate exactly as wide as the opening does not work.
Common questions
- How many fence posts do I need?
- One more than the number of sections. Divide the fenced length by your post spacing, round up to whole sections, then add one for the far end. Add one more for each gate, and subtract one wherever two runs share a corner post.
- How far apart should fence posts be?
- That depends on the fence type, the panel width and how exposed the site is, so this calculator asks rather than assuming. Panel fences are fixed by the panel width; picket fences are usually set to whatever divides the run evenly under the maximum you choose.
- Does a gate change the post count?
- Yes. A gate needs a post on each side, and only one of those doubles as a fence post, so every gate adds exactly one post. The opening also comes out of the fenced length, so it reduces the panels or pickets you need.
- How do I handle a fence that turns a corner?
- Enter each straight side as its own run and tick the corner box on the second and any later ones. That shares a post at each corner instead of counting two posts standing in the same hole.