Use this free fence calculator to estimate how many fence posts, rails, and panels or pickets you need for your fencing project. Enter your total fence length and panel spacing to get an accurate material count.
How to use this Fence Calculator
1. Enter your total fence length in feet — measure the perimeter of the area you want to enclose, subtracting any existing structures or walls that will form part of the boundary.
2. Select post spacing — 6 feet is standard for residential wood and vinyl privacy fencing. 8-foot spacing is used for some farm fencing, and 4-foot spacing is used for decorative or lighter applications.
3. Select the number of rails per section — 2 rails is standard for fences up to 4 feet tall, 3 rails for 6-foot privacy fences.
4. Enter the number of gate openings — each gate requires two dedicated gate posts in addition to the standard post count.
5. Click Calculate Fence Materials to see the number of posts, fence sections, rails, and total linear footage needed.
Frequently asked questions
How deep should fence posts be set?
As a general rule, fence posts should be set one-third of their total length into the ground. For a 6-foot fence using 8-foot posts, set the post 2 feet deep. In areas with hard winters and frost heave, increase the depth to below the frost line for your region, which ranges from 12 inches in the south to 48 inches or more in northern states.
What type of wood is best for fence posts?
Pressure-treated pine is the most common and cost-effective choice for fence posts due to its resistance to rot and insects. Cedar and redwood naturally resist decay and are good alternatives. For maximum longevity, use posts rated for ground contact (UC4B or UC4C treatment). Avoid untreated wood for below-grade applications as it will rot within a few years.
Do I need a permit to build a fence?
Most municipalities require a permit for fences over a certain height — typically 6 feet in the front yard or 8 feet in the back yard — or when the fence is adjacent to a street or public right-of-way. Always check local ordinances and HOA rules before building. Property surveys are also recommended to ensure the fence is on your property and not encroaching on a neighbor’s land or easements.
How much concrete do I need per fence post?
A standard fence post hole requires approximately 1 to 2 50-lb bags of concrete per post, depending on hole size. A 10-inch diameter hole that is 24 inches deep uses about 1.5 bags. Use our Concrete Calculator and select the Column option to estimate exactly how much you need for your post holes.
How long does a wood fence last?
Pressure-treated pine fence posts typically last 20 to 30 years. Cedar and redwood rails and pickets last 15 to 20 years with minimal maintenance. Applying a wood sealant or stain every 2 to 3 years significantly extends the life of wood fencing. Vinyl fencing lasts 20 to 30 years with virtually no maintenance and does not rot, warp, or require painting.