Skip to content
StatesideCalc

Pergola & Gazebo Cost Calculator

Estimate posts, footings, beam and rafter lumber, and optional roof covering cost for a pergola or gazebo from its footprint and post spacing.

By StatesideCalc EditorialLast verified July 28, 2026
ft
ft
ft
$
$
$
ft

Leave at 0 for an open lattice roof with no covering.

$
$

Same post-and-beam math as a fence, applied vertically

A pergola’s structural cost comes down to a small, countable set of components — posts set on footings, beams spanning between them, and rafters laid across at regular spacing — which makes it a genuinely calculable materials takeoff rather than a guess. The post-spacing logic here works the same way a fence’s post count does: a run of a given length, divided into bays of a chosen spacing, needs one more post than the bay count, doubled for both sides of the structure. This calculator runs that math alongside the beam and rafter linear footage it implies, so you get an actual materials list rather than a single opaque price.

Post spacing is a real structural choice, not just a cost lever

Wider post spacing means fewer posts and footings — cheaper — but it also means longer unsupported spans for the beams overhead, which need to be sized (thicker, deeper, or a stronger species) to avoid sagging over time. Most residential pergolas use 6-10 foot post spacing as a practical middle ground; going meaningfully wider than that starts requiring engineered beam sizing rather than standard dimensional lumber spans. If you’re designing a large, wide-open pergola, check span tables for your specific beam size and species — or consult a contractor — rather than assuming any spacing works with any lumber size.

Footings and the frost line, the detail DIYers most often skip

A pergola looks like a simple, light structure, which leads a lot of DIY builders to under-build its footings compared to what a permanent post-set structure actually needs. In any climate with real winter freezing, footings need to extend below the local frost line — the depth at which soil temperature stays above freezing — because the freeze-thaw cycle in soil above that depth exerts real upward force on anything anchored in it, gradually heaving posts out of plumb over a few winters. Frost depth varies enormously by region, from negligible in the Deep South and Gulf Coast to four feet or more across the northern tier of states — check your local building department’s frost depth requirement before setting footings, since it’s specified locally and getting it wrong shows up as a structural problem years later, not immediately.

Open lattice versus a real roof: two very different projects

This calculator’s roof-covering line is set to zero by default because a traditional open-lattice pergola roof — the classic look, filtering light rather than blocking it — has no material cost beyond the rafters themselves. Adding a shade cloth, polycarbonate panels, or a solid shingled roof (moving toward gazebo territory) adds real material cost per square foot of footprint, and often adds structural requirements too, since a solid roof catches wind load and snow load in a way an open lattice simply doesn’t. If you’re covering the roof, size the underlying structure — post count, beam dimension — for that added load, not for an open lattice’s lighter requirements.

Permits: often skipped for pergolas, not always safely

Because pergolas read as “just an outdoor structure” rather than a building, many people skip checking permit requirements entirely — but jurisdictions vary on this, and attaching a pergola to the house, exceeding a height or footprint threshold, or adding a solid roof frequently does trigger a permit requirement even when a small freestanding open pergola wouldn’t. A quick call to your local building department before digging footings is cheap insurance against having to modify or remove a structure after the fact. See the deck boards calculator if the pergola sits over a deck you’re also building, and the fence calculator for the same post-and-bay math applied to a fence line.

How this is calculated

Posts = (bays along length + 1) × 2 Lumber = main beams (2 × length) + rafters (spaced across the length) × width

Frequently asked questions

How much does a pergola cost to build?
A DIY wood pergola in a common 12x14 to 16x20 footprint typically runs $1,500-$6,000 in materials depending on lumber species and roof covering, while a professionally built or larger custom structure with a solid or louvered roof can run well into five figures.
Does a pergola need a permit?
It depends on size, height and your local jurisdiction — many places exempt small, open-roof pergolas below a size or height threshold, but require a permit above it, and attaching a pergola to the house or adding a solid roof covering more often triggers permitting regardless of size. Check with your local building department before digging footings.
How deep do pergola footings need to be?
Footings for a permanent pergola typically need to extend below your local frost line — the depth at which the ground doesn't freeze in winter — which ranges from essentially the surface in the Deep South to 4 feet or more in northern climates. A footing that's too shallow can heave with freeze-thaw cycles over a few winters, tilting posts out of plumb.
What's the difference between a pergola and a gazebo?
A pergola is traditionally an open, slatted-roof structure meant to filter light rather than fully block it, often attached to a house or freestanding over a patio. A gazebo is typically freestanding with a solid, often peaked roof intended for full weather protection. The underlying post-and-beam cost math is similar for both — a gazebo simply carries a higher roof-covering cost since it's fully enclosed overhead.

Sources