How to Use the Fence Calculator
Building a fence requires careful planning to order the right amount of lumber and hardware. Enter the total length of your fence line in feet, the desired fence height, and the distance between posts. The calculator determines the number of posts, horizontal rails, pickets, and fence sections you need for the entire project.
Posts are calculated by dividing the total length by the post spacing and adding one for the end post. Sections equal the number of posts minus one. Rails are calculated using two per section for fences under 5 feet tall and three per section for fences 5 feet and taller. Pickets are estimated assuming standard 3.5-inch-wide pickets in a privacy (no-gap) configuration, giving approximately 28 pickets per 8-foot section.
Fence Materials Planning
The most common residential fence material is pressure-treated pine, which is affordable and resists decay when properly maintained. Cedar is a premium option that naturally resists rot and insects without chemical treatment, though it costs more. Redwood offers similar benefits to cedar with a distinctive color. Composite fencing is the most expensive but requires virtually no maintenance. For each material, the posts, rails, and pickets are sized the same way, so the quantities from this calculator apply regardless of material choice.
Post Sizing and Installation
For a 6-foot fence, use 4x4-inch posts that are 8 feet long, burying 2 feet underground. For fences taller than 6 feet or in high-wind areas, upgrade to 6x6-inch posts for added strength. Dig post holes at least 3 times the post width (about 12 inches for a 4x4 post) and set them in premixed concrete for maximum stability. Allow the concrete to cure for at least 24 to 48 hours before attaching rails and pickets.
Permits and Property Lines
Most municipalities require a permit for fences over a certain height, typically 4 or 6 feet. Check your local building codes before starting. Have your property surveyed or locate existing survey pins to ensure your fence is built on your property and not encroaching on a neighbor's land. Many jurisdictions also require the finished side of the fence to face outward toward the neighbor. Homeowner associations may have additional restrictions on fence height, material, and style.
Frequently Asked Questions
How do I calculate how many fence posts I need?
Divide the total fence length by the post spacing distance and add one for the end post. For example, a 100-foot fence with 8-foot post spacing needs (100 / 8) + 1 = 14 posts. Always round up to ensure complete coverage. Corner posts and gate posts count as regular posts in the calculation.
What is the standard fence post spacing?
The standard post spacing for most residential fences is 8 feet on center, meaning 8 feet from the center of one post to the center of the next. Some fence styles, heavier materials, or high-wind areas may require 6-foot spacing for added strength. Always check local building codes for specific requirements.
How many rails do I need for a fence?
Most fences use 2 horizontal rails per section for fences under 5 feet tall and 3 rails for fences 5 feet and taller. The number of rails equals the number of sections multiplied by the rails per section. A 6-foot privacy fence typically uses 3 rails per section.
How many pickets do I need per section?
For a standard privacy fence with no gaps, divide the section width by the picket width (typically 3.5 or 5.5 inches) and round up. For an 8-foot section with 3.5-inch pickets, you need about 28 pickets. For a shadow-box or spaced picket fence, account for the gap between pickets.
How deep should fence posts be set?
A general rule is to bury one-third of the total post length underground. For a 6-foot fence, use 8-foot posts and set them 2 feet deep. In areas with frost, posts should extend below the frost line to prevent heaving. Setting posts in concrete provides the strongest hold and longest lifespan.
Save your results & get weekly tips
Get calculator tips, formula guides, and financial insights delivered weekly. Join 10,000+ readers.
No spam. Unsubscribe anytime.