How the fence calculator works
Sections = the fence length / the distance between posts, rounded up. Posts = sections + 1, plus any extra posts for gates and corners. Rails = sections x the rails in each section. Pickets = the fence length in inches (12 inches in a foot) [2] / (picket width + gap), rounded up. The picket width is the width it is dressed to: a nominal 6 inch board is dressed to at least 5 1/2 inches when dry. [1]
Worked example
A 100 ft fence with posts 8 ft apart: 100 / 8 = 12.50, rounded up to 13 sections. Posts = 13 + 1 = 14. At 2 rails per section that is 26 rails. Pickets 5.5 in wide with 0.5 in gaps take 6 in each: 100 x 12 / 6 = 200 pickets, exactly.
How far apart should fence posts be?
We found no national standard for the distance between posts on a residential fence. For a wood privacy fence, one city's standard (City of Mansfield, Texas, dated 2/11/2020) calls for galvanized steel pipe posts of at least 2 3/8 inches outside diameter, spaced no more than eight feet on center and set in concrete footings. [3]
This calculator starts at 8 ft, the figure in that one city's standard, and you can change it under Assumptions and constants. Your local rules apply: ask your building authority or follow your fence maker's instructions.
How to measure for a fence
Measure along the line the fence will follow, around every side and including the gates, with a tape measure or a measuring wheel, and add the lengths. Note each corner and gate, and enter any extra posts your plan needs in Extra posts. To fence a whole yard, add up the sides.
Picket, privacy and other fence styles
For a picket fence, enter the picket width and the gap. For a privacy fence with boards that touch, set the gap to 0. One city's standard requires 3 horizontal stringers (rails) for a fence six feet high and 4 for a fence eight feet high. [3] Enter the number on your plan in Rails between each pair of posts. For other layouts, such as board-on-board, ask your supplier how many boards you need. This tool counts wood pickets and rails. It does not cover vinyl, metal or masonry fences.
How much fence do I need around an area?
If you know only the area, the side of a square lot is the square root of its area and its perimeter is four times that. Measure the actual sides when you can. If the fence returns to where it started, the first post is also the last, so subtract one from the posts.
| Area (ft²) | Side (ft) | Fence length (ft) |
|---|---|---|
| 5,000 | 70.71 | 282.84 |
| 10,000 | 100.00 | 400.00 |
| 20,000 | 141.42 | 565.69 |
How deep should fence posts go?
In the same city standard, the minimum depth of the concrete footings is 24 inches for a fence six feet high and 36 inches for a fence eight feet high. [3] That is one city's rule for one kind of fence, and we found no second source. Your local frost depth and rules apply: ask your building authority or follow your fence maker's instructions.
How much fence stain or paint do I need?
The area to coat is the fence length times its height, times the number of sides you will coat. Divide it by the coverage printed on the product label. We state no coverage figure.
How much does a fence cost?
We state no price. Ask local suppliers for the price of a post, a rail and a picket, and multiply each by its count above.
Common mistakes and limits
- Forgetting the extra post. A run needs one more post than sections.
- Ignoring gates and corners. Enter any extra posts your plan needs in Extra posts.
- Using the nominal board width. A nominal 6 inch board is dressed to at least 5 1/2 inches when dry. [1] Use the dressed width.
- Using a post spacing no one gave you. The starting value is a typical value, not a standard. Follow your fence maker's instructions.
- What this tool does not cover: gates, hardware, post holes and concrete, slopes, and permits.
Common lengths
Fence lengths with the counts the calculator gives. The lengths are examples to show the sum.
| Length | Sections | Posts | Rails | Pickets |
|---|---|---|---|---|
| 50 ft | 7 | 8 | 14 | 100 |
| 100 ft | 13 | 14 | 26 | 200 |
| 150 ft | 19 | 20 | 38 | 300 |
| 200 ft | 25 | 26 | 50 | 400 |
| 300 ft | 38 | 39 | 76 | 600 |
Frequently asked questions
How many fence posts do I need?
Divide the fence length by the distance between posts and round up to get the sections, then add one post, plus any extra for gates and corners. A 100 ft fence with posts 8 ft apart has 13 sections and needs 14 posts.
How many fence pickets do I need?
Divide the fence length in inches by the picket width plus the gap, and round up. With 5.5 inch pickets and 0.5 inch gaps, 100 ft is 1,200 / 6 = 200 pickets exactly. A nominal 6 inch board is dressed to at least 5 1/2 inches when dry. [1]
How do I measure for a fence?
Measure along the line the fence will follow, around every side and including the gates, with a tape measure or a measuring wheel. Add the lengths. Note each corner and gate, and enter any extra posts your plan needs.
How much fence stain or paint do I need?
Find the area to coat: the fence length times its height, times the number of sides you will coat. Then divide by the coverage printed on the product label. We state no coverage figure.
Sources and references
- National Institute of Standards and Technology (NIST). Voluntary Product Standard PS 20-25, American Softwood Lumber Standard (PS 20-25, accessed November 2026). Used for: Nominal and minimum dry dressed lumber sizes, for example a dry 2 by 4 is dressed to at least 1 1/2 by 3 1/2 inches.
- National Institute of Standards and Technology (NIST). NIST Guide to the SI, Appendix B.8: Factors for Units Listed Alphabetically (SP 811, accessed November 2026). Used for: the inch and foot relationship (12 inches in a foot).
- City of Mansfield, Texas. New or Replacement Wood Privacy Fence Construction Standards (dated 2/11/2020, accessed November 2026). Used for: one city's post spacing, footing depth, number of horizontal stringers and post type for a wood privacy fence.
How we use sources: methodology.
Estimates only. Confirm quantities with your supplier. See the disclaimer. Found a wrong result? Report an error.