CalcSeed

Pergola Calculator

Enter the pergola dimensions and slat spacing to estimate the lumber count.

=
Quick answer: with the default inputs (12 ft, 10 ft, 16 in), the rafters needed is 9. At these inputs: top slats = 10, posts = 4. Change any input to update the result.
Rafters needed
—

What this calculator does

This calculator turns pergola dimensions into a lumber list. At the defaults—a 12 ft × 10 ft pergola with rafters spaced 16 in on center—you need 9 rafters across the width, 10 top slats across the length, and 4 posts plus beams. Add a waste margin and the full order is one shopping trip: 2×6 rafters, 2×4 slats, 6×6 posts and 2×10 beams, all cut to length.

How pergola lumber is counted

A pergola has four corner posts, beams spanning the length, and evenly spaced rafters across the width. Divide the width by the spacing and add one for the rafter count.

n=⌈W·12s⌉+1n=\lceil \frac{W\cdot 12}{s}\rceil + 1

The “plus one” is the detail people forget: a 10 ft (120 in) width at 16 in spacing has eight gaps between rafters, but nine rafters—one at each edge plus one between every pair of gaps. The same logic counts the slats along the length, which run perpendicular to the rafters and set the shade pattern overhead.

Worked example at the defaults

Rafters: 10 ft × 12 ÷ 16 = 7.5, ceiling to 8, plus 1 = 9 rafters. Slats: 12 ft × 12 ÷ 16 = 9, plus 1 = 10 slats. Posts are fixed at 4 for this size. The complete cut list: nine 2×6 boards at 12 ft (cut to the 10 ft span plus overhang), ten 2×4 slats at 12 ft, four 6×6 posts at 10 ft and four 2×10 beams at 12 ft—27 pieces of lumber in total, which lands near $1,200–$1,800 in pressure-treated pine at 2026 prices.

Rafter spacing and the count it produces

Spacing (on center)Rafters across 10 ftSlats across 12 ftShade density
12 in1113Dense shade, heaviest lumber bill
16 in910The standard balance
24 in67Open and airy, fewer pieces

Halving the spacing does not double the count—it raises it by roughly 40–50% because the edge members are shared. Tighter spacing also lets you drop to smaller stock: a 24 in layout carries fine on 2×6 rafters over a 10 ft span, while a 12 in layout with heavy shade cloth may want 2×8s to keep the line of the roof straight.

Common lumber sizes

PartTypical size
Posts4 × 4 or 6 × 6
Beams2 × 8 or 2 × 10
Rafters2 × 6

For a freestanding 12 × 10 pergola, 6×6 posts are worth the upgrade over 4×4s—the wider post resists racking and carries the beam on a flat bearing surface. Beams in pairs (one on each side of the post) doubled from 2×10s handle the 12 ft span; a single 2×8 works for spans under 10 ft. Remember that softwood dimensions are nominal: a 2×6 actually measures 1.5 × 5.5 in, which matters when you notch the beams to seat the rafters.

Anchor it properly

Set posts on concrete footings below the frost line and brace the frame for lateral stability. Larger spans need deeper beams and closer spacing — check a span table.

Four footings at 12 in diameter and 42–48 in deep (frost-line dependent) take about 1–1.5 cu ft of concrete each—roughly six to eight 60 lb bags per hole. Post anchors or simpson-style brackets keep the wood out of standing water; burying untreated posts in the pour cuts their life to 10–15 years, while bracket-mounted posts with the right hardware can pass 25.

What the project costs in 2026

Build it yourself from the cut list above and the lumber runs $1,200–$1,800 in treated pine or $2,500–$4,000 in cedar, plus $100–$200 of hardware and concrete. Prefabricated kits of the same size sell for $2,000–$6,000 delivered, and a contractor-built custom pergola lands at $5,000–$10,000 installed. The DIY route saves the most money on the simplest geometry—every extra corner, curve or attached-ledger detail is billed labor.

Common mistakes

  • Counting gaps instead of members—forgetting the plus one on each row
  • Setting posts without brackets and losing years to rot at the concrete line
  • Spanning 12 ft beams with single 2×8s that sag visibly within two summers
  • Skipping diagonal bracing on freestanding builds, which sway in the first big wind
  • Fastening to a house ledger without proper flashing, inviting rot into the wall

The lumber count itself rarely goes wrong once the plus-one rule is in place; the failures live underground and at the connections. Footings below frost line and hardware rated for the loads are what separate a pergola that stands for decades from one that leans after the third winter.

One finishing note belongs in the budget even though it is not lumber: seal or stain every surface, including the cut ends, before assembly. Cut ends wick water fastest, and the tops of the rafters—hidden after the slats go on—are the first place untreated wood fails. A gallon of penetrating stain covers roughly 250–400 sq ft, and the default 12 × 10 pergola exposes about 700 sq ft counting both sides of the rafters, so plan on two gallons and an afternoon with a roller and a brush.

Frequently asked questions

How many rafters does a pergola need?

Divide the width by the spacing and add one. A 10 ft width at 16 in spacing works out to 9 rafters; the same width at 24 in spacing needs only 6.

What spacing for pergola rafters?

Commonly 12 to 24 inches on center, with 16 in the standard choice. Tighter 12 in spacing gives denser shade and heavier lumber use; 24 in keeps the structure open and airy.

How many posts does a pergola need?

Usually four corner posts, more for very long structures. Anything longer than about 20 ft on a side benefits from six posts to keep the beam spans short.

What lumber sizes does a 12x10 pergola use?

A typical build uses 6×6 posts, doubled 2×10 beams, 2×6 rafters and 2×4 slats. The default spacing produces 9 rafters, 10 slats, 4 posts and 4 beams—27 pieces total.

How much does a DIY pergola cost in 2026?

The default 12 × 10 build in treated pine runs $1,200–$1,800 in lumber plus $100–$200 for concrete and hardware. Cedar raises the lumber bill to $2,500–$4,000, while contractor-built versions of the same size run $5,000–$10,000.

Why do I add one to the spacing calculation?

Spacing measures the gaps between members, and a row with n gaps has n+1 members. A 120 in width at 16 in spacing has 7.5 gaps (ceiling to 8), so 8 + 1 = 9 rafters.

Do pergola posts need concrete footings?

Yes, set them on footings below the frost line with post brackets, about 1–1.5 cu ft of concrete per hole. Burying posts directly in the pour cuts their life to 10–15 years versus 25 or more with brackets.

Can a 2x6 span 10 feet as a pergola rafter?

Yes at 24 in spacing, and comfortably at 16 in. The rafter carries only its own weight plus occasional shade cloth or vines, far less than a deck joist of the same span would see.

Should I use 4x4 or 6x6 posts?

For a freestanding 12 × 10 pergola, 6×6 posts are the better choice: they resist racking and provide a flat bearing face for the beam. 4×4s are acceptable only for small attached kits with short beam spans.

Method and sources

Calculation basis

Cost ranges reflect 2026 U.S. national averages for materials and labor; regional pricing varies, so use results as a planning baseline and confirm with local quotes.

Last updated: November 17, 2026
Formula & data sources
  • Pergola rafters = ceil(width × 12 ÷ spacing) + 1.

Cite this page

Reference formats
APA 7CalcSeed. (2026, November 17). Pergola Calculator. https://calcseed.com/c/home/pergola-calculator/
MLA 9"Pergola Calculator." CalcSeed, 17 Nov. 2026, calcseed.com/c/home/pergola-calculator/.
ChicagoCalcSeed. "Pergola Calculator." Last modified November 17, 2026. https://calcseed.com/c/home/pergola-calculator/

Related calculators

More Home & DIY calculators