Meazora

Fence Calculator

DIY Material

Calculate the posts, rails, and pickets needed to build a wood privacy or picket fence.

Perform calculations locally and securely. No data leaves your device.
Share:
Link Copied!Ready to share.

Your Measurements

ft

Measure the full perimeter (or linear footage) of fence line

in

1×6 board = 5.5"

in

0 = privacy fence

Each gate adds 2 extra posts

Results
Pickets Needed— —
Posts Required— —
Rails Required— —
Complete measurements and press calculate →
Pro Tip: Purchase 2–3 extra pickets for replacement due to future weathering, splitting, or warp.
Note: Sloped terrain or custom layout adjustments may require extra posts or pickets. Verify local permit rules and post depth requirements before digging.

Buying & Material Selection Guide

A durable fence relies on choosing fencing materials suited to your environment. Cedar is highly valued for pickets due to its natural decay resistance (Class 2 (Moderately Durable)) and minimal warping. However, for structural components in ground contact, pressure-treated lumber posts meeting AWPA U1 standards are recommended. The horizontal rails (usually 2x4s) provide lateral strength; a 6-foot fence requires 3 rails to prevent the pickets from sagging or twisting over time.

Modern vertical wood privacy fence made of cedar pickets along a green yard
Fence line post holes dug in soil with layout string lines and Call 811 utility markings

Site Prep & Pro Installation Practices

Before digging, you must check property lines and contact the national digging safety hotline by dialing 811 to locate underground utilities. Since post setting can disrupt boundary turf, check our guide on lawn sodding and reseeding to repair any lawn damage. For structural stability against wind loads, follow the standard trade rule: set posts at a depth of at least 1/3 of post height, extending below your local frost line. Pour one 80 lb bag of concrete per post hole, anchoring the post plumb, and slope the concrete dome at the surface to shed rainwater away from the wood post.

§

Regulatory Building Standards — ASTM F2240

Cited Standard

Fences function as large sails in residential yards, capturing wind and translating substantial lateral loads directly to the supporting posts. Under the structural design parameters of ASTM F2240, fence assemblies in high-wind or coastal regions must be engineered to resist horizontal forces of up to 90 MPH without collapsing or tilting. This resilience depends heavily on post material selection, spacing, and footing geometry.

To resist wind loading, fence posts should be set at a depth equal to one-third or one-half of their above-ground height. Footing holes should be at least three times the diameter of the post itself, filled with concrete, and domed slightly at the surface to encourage water runoff. In addition to structural specs, builders must respect municipal zoning guidelines. Most local ordinances limit front yard privacy fences to 4 feet in height and backyard fences to 6 feet, while enforcing strict setback clearances relative to property boundaries and public easements.

Source: ASTM International - Standard Specification for Strength Requirements of Metal Posts for Wooden FencesView full standard →
  • Fence assemblies must resist lateral wind forces up to 115 MPH.
  • Post hole depth should be one-third to one-half of the above-ground post height.
  • Footing holes must be at least three times the diameter of the fence post.
  • Respect local zoning heights (typically 4 feet in front yard, 6 feet in backyard).

Frequently Asked Questions

Technical building code (IRC/ASTM) references and trade-tested guidance for your project.

As a general rule, dig post holes to a depth equal to 1/3 of the post's total height (e.g. 2 feet deep for a 6-foot fence). In colder northern regions, you must dig deep enough to place the bottom of the post below the local frost line to prevent freezing soil from heaving the post upwards.

Verified SourceAmerican Fence Association (AFA)Audit LinkConsulted: 2026-07-01

Cedar is highly recommended for pickets and rails due to its natural oils that resist insects, rot, and weathering. However, cedar posts can decay when set directly in damp soil. The best hybrid approach is to use pressure-treated lumber rated for ground contact (AWPA UC4A) for posts and cedar for pickets.

Verified SourceAmerican Wood Protection Association (AWPA)Audit LinkConsulted: 2026-07-01

Concrete is critical for corner, gate, and end posts, which endure higher pulling tension. For standard line posts, packing the bottom with 6 inches of crushed gravel, followed by compacted soil, can provide sufficient stability and allow drainage, extending the post's life by preventing water traps.

Verified SourceAmerican Fence Association (AFA) Post FoundationsAudit LinkConsulted: 2026-07-01

Related Projects & Standards

Explore adjacent calculations and the construction codes linking these tasks on the job site.

Material Estimator

Concrete Calculator

Calculate cubic yards and bags of concrete needed for slabs, footings, and columns.

Open Calculator
Material Estimator

Mulch & Gravel Calculator

Calculate cubic yards or bags of mulch, gravel, or topsoil needed for your landscape.

Open Calculator
Material Estimator

Square Footage Calculator

Calculate area of any shape in square feet, square meters, and square yards instantly.

Open Calculator