Fence Post Calculator
Calculate posts, sections, rails, and pickets for any fence project.
Results
How to Calculate Fence Posts and Materials
The fence post calculator turns your total fence run and post spacing into a complete material list — posts, sections, rails, and pickets. Here is how each number is calculated and what you need to know before buying.
Post Count Formula
Posts = floor(fence length ÷ spacing) + 1. For 100 linear feet with 8-foot spacing: floor(100 ÷ 8) = 12 sections, requiring 13 posts (one at each end plus one between each section). For corner posts or gate posts, add 1 extra post per corner and 2 per gate opening (the hinge post and latch post count as sections). A gate also typically uses the panel spacing for both posts, reducing effective fence run.
Rail Count
Rails run horizontally from post to post. A 6-foot privacy fence needs 3 rails per section (top, middle, bottom). With 12 sections and 3 rails: 36 rails × 8-foot post spacing = 288 linear feet of 2×4 rail material. Rails are typically sold in 8-foot lengths — so 36 rails for this example. Always buy 2–3 extra rails for end cuts and any split or warped pieces.
Picket Count
Standard privacy fence pickets are 3.5 inches wide (matching the face of a 1×4 board) with 0–0.5 inch spacing between each. For zero-gap privacy: pickets per section = section width ÷ picket width. For an 8-foot section with 3.5-inch pickets: 96 ÷ 3.5 = 27.4 → 27 pickets (round down for tight fit or buy 28 for a slight gap). For 12 sections: 12 × 27 = 324 pickets.
Post Material Options
Pressure-treated pine: Most common, affordable, treated to resist rot and insects. Use 4×4 posts for fences up to 6 feet, 6×6 for 8-foot fences or in windy locations. Cedar: Naturally rot-resistant, beautiful grain, no chemical treatment needed. More expensive than PT pine. Metal posts: Steel pipe or U-channel posts for vinyl and chain-link fences. Set in concrete for maximum stability.
Setting Posts in Concrete
Use two 60-lb bags of fast-setting concrete per post for a standard 4×4 post in a 10-inch wide, 36-inch deep hole. That is two bags per post × number of posts. For 13 posts: 26 bags of concrete. Dig the hole 3× the post width for the concrete to grip. Angle the top of the concrete away from the post to direct water away. Brace posts plumb with 2×4 braces until the concrete sets — typically 24–48 hours before attaching rails.
Gate Openings
Standard single gate openings are 3–4 feet wide; double gates for vehicle access are 8–12 feet. Gate posts take more lateral force than line posts — use 4×4 posts for single gates and 6×6 posts for double gates, set in concrete. Hang gates with heavy-duty galvanized hardware. Every gate sags over time — use a turnbuckle anti-sag kit for gates over 4 feet wide.
Frequently Asked Questions
8 feet on center is standard for wood privacy fences. 6 feet for chain-link and vinyl. 10–12 feet for split rail. Shorter spacing gives a stronger fence but uses more posts and costs more.
Bury 1/3 of total post length — 3 feet deep for a 9-foot post on a 6-foot fence. In cold climates, dig below the local frost line (36–48 inches) to prevent frost heave.
2 rails for fences up to 4 feet tall, 3 rails for 5–6 foot fences, 4 rails for 7–8 foot fences. Rails carry the pickets and must be spaced evenly across the fence height.
Pressure-treated 4×4 wood posts are standard for privacy fences — affordable, easy to work with, last 15–30 years. Use metal posts for vinyl and chain-link fences where the post must be non-wood.
DIY wood privacy fence: $8–$15/linear ft in materials. Professional installation: $25–$45/linear ft total. Chain-link: $8–$15 installed. Vinyl: $20–$40. Cedar or composite: $30–$60.