YardMath

Ballpark materials and posts for a straight-run fence.

Fence Cost Calculator

Ballpark materials and posts for a straight-run fence.

Estimate fencing materials, post count, and gate costs for a straight-run fence. This is a materials ballpark — get a local quote for installed pricing.

Too big to DIY? Get matched with top-rated local pros

Enter your ZIP and we'll connect you with highly-rated local pros for fence cost when they're available in your area — free, no obligation.

Estimating fence cost

Post count is roughly length ÷ spacing, plus one. Multiply total length by your per-foot material cost, then add gates. Wood, vinyl, and chain-link all differ, so adjust the per-foot number to your material.

What drives fence cost

Fence pricing comes down to three things: linear footage, material, and posts. Length sets everything else, so measure your run carefully — walk it with a tape or a measuring wheel rather than guessing off a property sketch. Material is the big swing: chain-link is the cheapest per foot, wood sits in the middle, and vinyl and ornamental metal run highest but need the least maintenance. Posts are the hidden cost — you need one roughly every 6–8 feet plus one at every corner, end, and gate, and each means a hole, concrete, and labor. Our calculator ballparks materials and gates; get a local quote for installed pricing, which includes labor, permits, and terrain.

Posts, spacing, and why corners cost extra

Standard post spacing is 8 feet for most wood and chain-link, 6 feet for taller or heavier panels and windy sites. Closer spacing means a stiffer, longer-lasting fence but more posts and concrete. Corner and end posts take more load and often get a bigger post set deeper in more concrete, so a yard with lots of jogs and corners costs more than a straight run of the same length. Set line posts about a third of their height in the ground (a 6-foot fence wants posts roughly 2.5–3 feet deep) below your frost line, and gates need sturdy, well-anchored posts on both sides or they'll sag within a season.

Permits, property lines, and good-neighbor etiquette

Before you buy a single panel, check two things: your local permit and setback rules, and exactly where your property line is. Many towns cap fence height (often 6 feet in back, 3–4 feet in front) and require a permit, and some HOAs dictate style and color. Call 811 to have utilities marked before you dig — hitting a gas or cable line is expensive and dangerous. If you're unsure of the boundary, a survey is cheaper than tearing out a fence built a foot onto your neighbor's land. And the classic courtesy is to face the finished side out, toward the neighbors and street.

FAQ

How far apart should fence posts be?
Most wood and vinyl fences use 6–8 ft post spacing; 8 ft is common for chain-link. Closer spacing adds strength and cost.
How much does it cost to fence a yard?
Materials alone run roughly $8–$20 per linear foot for wood, $5–$12 for chain-link, and $20–$40 for vinyl. Installed, expect to roughly double those figures once labor, posts, concrete, and gates are included. Use the calculator for a materials ballpark, then get a local quote for the installed price.
How far apart should fence posts be?
Line posts are typically 8 feet apart for wood and chain-link, 6 feet for heavier or taller fences and windy areas. Always add posts at every corner, end, and both sides of each gate, which is why post count is slightly more than length divided by spacing.
How deep should fence posts go?
Set posts about one-third of their above-ground height into the ground, and always below your local frost line so they don't heave. A 6-foot fence generally needs posts 2.5–3 feet deep, set in concrete for gates and corners and often for line posts too.