· Updated

How to Build a Pergola: Planning, Post Setting, and Beam Assembly

A complete DIY guide to building a freestanding or attached pergola — covering permits, wood selection, post depth, beam and rafter installation, and finishing.

Quick Answer

Building a pergola: (1) Check permit requirements — most jurisdictions require one for attached or permanent freestanding structures over 200 sq ft. (2) Set posts — 4×6 posts minimum for most pergolas, at least 1/3 of post length in ground (3 ft deep for a 10 ft post), set in concrete footings. (3) Install beams — 2×8 or 2×10 double beams spanning post tops, secured with post caps. (4) Install rafters — 2×6 rafters 12–24 inches on center, notched over beams. (5) Add shade slats (optional) — 2×2 or 2×4 pieces running perpendicular. A 12×14 pergola takes a weekend with 2 people. Materials cost $800–$3,000 depending on wood species (pine vs cedar).

Frequently Asked Questions

Do I need a permit to build a pergola?

In most jurisdictions, yes. Pergolas are considered permanent structures and typically require a building permit. Rules vary widely — some counties exempt open-roof pergolas under a certain footprint (usually 200 sq ft or less), others require full structural drawings. Check your local building department and HOA before buying materials. Fines for unpermitted structures range from $250 to over $2,500, plus you may be required to tear it down.

What size lumber do I need for a pergola?

Posts are typically 4x4 for spans up to 8 feet and 6x6 for larger structures. Beams spanning 8–12 feet use doubled 2x8 or 2x10 lumber, or single 4x8/4x10. Rafters are typically 2x6 spaced 12–24 inches on center. Top slats (the decorative layer) are commonly 2x2 or 2x4. Sizing depends on your span — download the AWC Span Calculator or check your local code for an engineered span table.

How deep should pergola posts be set?

At minimum, 1/3 the total post length — but always below your local frost line. In cold climates (Minnesota, Wisconsin), that means 42–60 inches deep. In the Southeast, 18–24 inches may be sufficient. A 10-foot post needs at least a 36-inch hole in moderate climates, deeper in frost-prone areas. Use fast-setting concrete around the post and slope the concrete surface away from the post to shed water.

How do I attach a pergola to my house?

For attached pergolas, a ledger board replaces the rear pair of posts. The ledger must be through-bolted or lag-screwed into the house's rim joist or structural framing — never into siding alone. Remove siding at the attachment point, install flashing over the ledger and under the siding above, then bolt with 1/2-inch galvanized lag screws every 16 inches. An improperly flashed ledger leads to rot and structural failure within 5–10 years.

What wood is best for an outdoor pergola?

Western red cedar is the best overall choice — naturally rot-resistant, dimensionally stable, holds fasteners well, and takes stain beautifully. Redwood is equivalent but harder to source outside the West Coast. Pressure-treated pine (ground contact rated) is the budget option: more affordable and widely available, but it twists and checks more than cedar. Composite pergola materials (PVC, fiberglass) require no maintenance but cost 2–3x more upfront. Avoid untreated pine or standard construction lumber outdoors.

How long does it take to build a pergola?

A 10x12 freestanding pergola typically takes two weekends for one or two people. Weekend one: layout, post hole digging, and concrete setting (posts must cure 24–48 hours). Weekend two: beam installation, rafters, and top slats. An attached pergola with a ledger board adds a half-day for flashing and ledger installation. Budget extra time if you're renting a power auger and coordinating delivery of lumber.

How much does a DIY pergola cost vs. hiring a contractor?

DIY pergola costs: $800–$2,500 for a 10x12 in pressure-treated pine; $1,500–$3,500 in cedar. The main costs are lumber (60% of budget), hardware (post caps, carriage bolts, joist hangers — $100–$200), concrete for footings ($30–$60), and tools (post hole digger or auger rental $50–$80/day). Hired contractor costs: $3,000–$8,000 for a basic 10x12, $6,000–$15,000+ for larger or custom designs. The labor premium for a contractor is significant because pergola installation is time-intensive — digging, setting posts level and plumb, and lifting beams all benefit from two workers. If you can swing a weekend with a helper, DIY saves $1,500–$5,000.

How do I add privacy or shade to a pergola?

The most popular shade additions: (1) Shade sails or canopy panels — attach to the rafter ends and roll up or remove seasonally; cost $50–$200 for a 10x12. (2) Retractable pergola cover — motorized or manual fabric panels that close when you want shade; $300–$800. (3) Climbing plants — wisteria, Virginia creeper, and climbing roses grow through the rafters and create natural canopy in 2–3 seasons; cost of plants $30–$80. For privacy, outdoor fabric curtains on curtain rod hardware ($40–$120 per panel) can be mounted on the sides and tied back when open. String lights between rafters add evening ambiance and define the space visually without blocking airflow.

Building a pergola: (1) Check permit requirements — most jurisdictions require one for attached or permanent freestanding structures over 200 sq ft. (2) Set posts — 4×6 posts minimum for most pergolas, at least 1/3 of post length in ground (3 ft deep for a 10 ft post), set in concrete footings.

A pergola adds structure, shade, and definition to an outdoor space without the cost or permanence of a full deck cover. A basic 10x12 freestanding build runs $800–$2,500 in materials depending on wood species and hardware. With two weekends and a helper for post-setting day, most homeowners can complete this project without subcontractors.

Permits and Setbacks

Most municipalities classify pergolas as permanent structures regardless of whether they have a solid roof. That means permits are typically required.

Before pulling a permit, check:

  • Setback requirements — how far the structure must sit from property lines, easements, and the main dwelling
  • Footprint limits — some jurisdictions exempt accessory structures under 120–200 sq ft from full permits
  • HOA rules — many HOAs require architectural review for any exterior structure, including pergolas
  • Frost line depth — your permit application and footing depth both depend on this

Call your local building department or check online. Most permit applications for a residential pergola require a site plan (top-down sketch showing the structure’s location relative to property lines and house) and a framing drawing showing post, beam, and rafter sizes.

Wood Selection

Western Red Cedar

The best all-around choice for most homeowners. Cedar is naturally rot-resistant due to its oils, so it doesn’t require chemical treatment. It’s lighter than pressure-treated pine, machines cleanly, and holds stain and sealant well. Expect cedar to last 20–30 years when stained regularly.

Cost: $1.50–$3.50/board foot (more expensive than pressure-treated pine, cheaper than redwood)

Pressure-Treated Pine

Ground-contact rated pressure-treated (ACQ or MCA) pine is the most affordable structural option. It’s the right choice for posts embedded in concrete, where direct soil contact would rot untreated wood quickly. Drawbacks: it’s heavier, tends to cup and check as it dries, and requires waiting 6–12 months before staining.

Use pressure-treated for posts, cedar or redwood for beams and rafters if budget allows.

Cost: $0.80–$1.60/board foot

Composite and PVC Pergola Systems

Pre-engineered composite pergola kits eliminate painting and staining indefinitely. They’re more expensive upfront ($3,000–$8,000 for a 10x12 kit installed) and generally have more limited design flexibility. For homeowners who want zero maintenance, composite is worth considering.

What to Avoid

Avoid untreated pine, whitewood studs, or standard construction-grade lumber for any part of a pergola. Even under a roof overhang, repeated moisture exposure will rot untreated lumber within 5–8 years.

Sizing and Spacing

Standard Dimensions

A pergola should feel comfortable, not cramped or overwhelming.

Use CaseRecommended Size
Intimate seating area for 2–48x10 ft
Outdoor dining table (6 people)10x12 to 10x14 ft
Full outdoor living space12x16 to 14x20 ft
Pool or spa coverCustom — match footprint

Minimum 7-foot clearance from ground to bottom of beams. 8 feet is more comfortable for taller homeowners.

Shade Math

A pergola with open rafters and slats provides partial shade, not full coverage. The percentage of shade depends on rafter and slat spacing:

  • 2x6 rafters at 12” OC + 2x2 slats at 4” OC: approximately 60–70% shade at noon
  • 2x6 rafters at 24” OC + 2x4 slats at 6” OC: approximately 40–50% shade
  • No slats, rafters only: 20–30% shade

For deeper shade, reduce rafter and slat spacing, add a shade sail between the posts, or install polycarbonate roofing panels over the rafters.

Post Spacing

Posts are typically spaced 8–12 feet apart. Beam spans determine whether you need intermediate posts:

  • Up to 10-foot span: single 4x8 or doubled 2x8 beams handle the load
  • 10–14 foot span: use doubled 2x10 or 2x12
  • Over 14 feet: engineer-specified beam or intermediate post required

What You Need

Tools

  • Post hole digger / auger — rent a gas-powered one-man auger for $80–$120/day; essential for 4+ holes
  • Circular saw or miter saw
  • Drill and impact driver
  • 4-foot level and post level
  • Speed square
  • String line and stakes
  • Tape measure
  • Safety glasses and work gloves

Materials

Setting Posts

Post setting is the most critical step. Posts that aren’t plumb or set deep enough will produce a leaning structure within a few years.

Footing Depth by Climate

Climate ZoneFrost LineMinimum Post Depth
Deep South (FL, Gulf Coast)0”18–24”
Mid-Atlantic, Pacific NW12–24”24–30”
Midwest (IL, IN, OH)36”36–42”
Northern Midwest (MN, WI)48–60”48–60”
Mountain West36–48”42–54”

Always go below the frost line. A post above the frost line will heave out of the ground when soil freezes and expands — this is the leading cause of leaning pergolas.

Digging the Holes

  • Diameter: 10–12 inches for a 4x4 post, 12–16 inches for a 6x6
  • Use a rented gas auger for most installs — hand digging 4–6 holes is exhausting and imprecise
  • Add 4 inches of compacted gravel to the bottom of each hole for drainage

Setting in Concrete

For in-ground posts:

  1. Fill hole 4–6 inches with gravel and tamp
  2. Set post in hole, check plumb in two directions with a post level
  3. Brace post with temporary 2x4 stakes driven into ground at 45°
  4. Pour fast-setting concrete dry into the hole — do not pre-mix (Quikrete Fast-Set works this way)
  5. Add water per bag instructions — 1 quart per 50-lb bag, poured slowly
  6. Let cure 24 hours before applying load

For surface-mount post anchors (concrete pad or deck frame):

  • Anchor must be rated for the post size and load
  • Set anchors in wet concrete before it cures, or use expansion anchors in cured concrete
  • Post anchor brackets keep posts above the slab surface, eliminating rot at the base

Plumb Check

After concrete sets, check plumb in both directions with a 4-foot level. Minor corrections can be made in the first 30 minutes while concrete is still plastic. After curing, posts are permanent.

Cut Posts to Height

Once all posts are set and cured, snap a chalk line at the finished height. Cut posts to uniform height with a circular saw. Use a string line at the correct height and a speed square to mark each post — cutting one post too short is not fixable without a post extension block.

Installing Beams

For Freestanding Pergolas

Beams span between post tops on all four sides. Common detail: notch the post top to receive the beam, then through-bolt with 1/2” galvanized carriage bolts.

Notching posts:

  • Mark notch depth equal to beam depth on each post top
  • Notch depth should allow beam to sit flush with post top or slightly above
  • Cut notch with circular saw and chisel clean

Securing beams:

  • Set beam in notch
  • Drill through post and beam with a 1/2” spade bit
  • Install carriage bolt, washer, and nut
  • Two bolts per beam-post connection minimum

Galvanized carriage bolts — use hot-dipped galvanized or stainless for outdoor exposure.

For Attached Pergolas (Ledger Board)

An attached pergola replaces the rear pair of posts with a ledger board fastened to the house.

  1. Determine ledger location and height — marks where the beam will attach
  2. Remove exterior siding in a strip 1 inch taller than the ledger
  3. Install metal z-flashing behind siding and over ledger top to direct water away from wall
  4. Through-bolt or lag-screw ledger into rim joist or structural framing — one 1/2” lag every 16 inches
  5. Caulk all penetrations with exterior polyurethane caulk

Never fasten a ledger into cantilevered siding, stucco, or EIFS (synthetic stucco) alone — always reach structural framing.

Installing Rafters and Top Slats

Rafters

Rafters run perpendicular to the beams, spanning the open space.

  • Sizing: 2x6 for spans up to 10 feet, 2x8 for 10–14 feet
  • Spacing: 12–24 inches on center depending on desired shade and visual weight
  • Connection: Use post cap / rafter-to-beam connectors, or toenail with structural screws — metal connectors are far stronger

Decorative cuts: Many pergola plans call for the rafter tails to be cut in a decorative curve or notch at each end. Mark the template on one rafter, cut it, then use it as a template for all remaining rafters before installing.

Pergola hardware kit with rafter brackets — metal connectors make rafter installation faster and stronger than toenailing.

Top Slats

Slats run perpendicular to rafters across the top of the structure.

  • Sizing: 2x2 or 2x4 cedar
  • Spacing: 4–8 inches apart (tighter = more shade, heavier look)
  • Fastening: 2-1/2” exterior screws from above, pre-drill to prevent splitting
  • Overhang: Slats typically overhang the outer rafter by 12–18 inches on each end

For a cleaner look, predrill all slat ends before installation — cedar splits easily at screw ends without it.

Finishing

Stain and seal immediately after construction — do not wait until the following season.

Fresh cedar weathers quickly in UV and rain exposure. Unstained cedar turns gray within 60–90 days outdoors. Staining within the first 2–4 weeks of installation gives the best penetration and longest life.

Stain selection:

  • Use a penetrating oil-based semi-transparent exterior stain
  • Semi-transparent shows wood grain and feels natural; solid stains obscure grain and peel over time on textured lumber
  • Popular options: Ready Seal, Cabot Australian Timber Oil, TWP (Total Wood Preservative)

Application:

  1. Apply with a brush, roller, or pad applicator — work with the grain
  2. Back-brush any drips or runs immediately
  3. One coat is typical for new cedar; two coats if the wood is very dry or porous
  4. Allow 24–48 hours dry time before use

Exterior wood stain for deck and pergola — look for products rated for decks and fences, which share similar UV and moisture exposure.

Reapply stain every 2–3 years. Scrub with a deck cleaner before recoating to remove mildew and oxidized finish.

⏰ PT8H 💰 $800–$2,500 🔧 Pressure-treated lumber, Exterior screws or nails, Post hole digger, Concrete mix, Exterior wood sealer or stain
  1. Setting Posts

    Post setting is the most critical step. Posts that aren't plumb or set deep enough will produce a leaning structure within a few years.

  2. Installing Beams

    Mark notch depth equal to beam depth on each post top Notch depth should allow beam to sit flush with post top or slightly above

  3. Installing Rafters and Top Slats

    Sizing: 2x6 for spans up to 10 feet, 2x8 for 10–14 feet Spacing: 12–24 inches on center depending on desired shade and visual weight

  4. Finishing

    Stain and seal immediately after construction — do not wait until the following season.

Free: 10-Point Home Maintenance Checklist

Prevent costly repairs with this seasonal checklist. Save hundreds every year by catching problems early.

Free instant download + weekly home tips. Unsubscribe anytime.