🌿

Pergola Rafter Calculator

Free pergola rafter spacing, span, slope, and lumber estimator for freestanding or attached pergolas. Match your framing scenario to a principle card, then compute rafter count, actual spacing, shade coverage, and minimum roof slope for 12, 16, or 24 inch on-center layouts.

Interactive Tool

Pergola Rafter Calculator

Enter your beam span, pergola length, rafter spacing, and lumber depth. The calculator returns rafter count, actual evenly distributed spacing, rafter span, shade coverage, minimum roof slope, total linear feet, and the recommended post size — all live, no signup.

Inputs

Distance between the two beams rafters cross. Default 10 ft.

Total run along the beam. Default 16 ft.

Toggle on for a water-shedding roof — slope calc activates.

50% (decorative)70% (standard)90% (dining)

Compared against the computed shade from rafter + slat geometry. Falls short? Tighten spacing or add slats.

Computed outputs

Rafter count
13
ceil((length × 12)/spacing) + 1
Actual spacing
16.00"
evenly distributed, center-to-center
Rafter span
10 ft
post-to-post (beam span)
Shade coverage
80%
meets 70% target
Minimum slope
0″/ft
open slats — slope optional
Lumber total
208 ft
rafter linear ft (2x8)
Recommended post size
6x6 minimum (5.5" × 5.5")
2x8 can clear 10 ft ✓
💡 Hidden insight

Going from 16" o.c. to 24" o.c. saves 4 rafters on a 16 ft pergola but drops shade from ~74% to ~67% — an 18% shade coverage loss that the rafter-count saving hides. The breakeven is 16" o.c. for any seating use.

Scenario Principle Cards Grid

Filter cards by framing scenario. Highlighted cards match all checked boxes; unmatched cards dim.

🌳
Optimal Context

Max Shade Retreat

12" o.c. rafters with a 2x8 top layer drop ~85% of direct sun — enough to host an outdoor dining table under the structure without retrofitting shade cloth. The trade is 50% more rafter linear footage than a 24" o.c. layout.

Spacing
12" o.c.
Rafter
2x8 (1.5×7.25)
Shade
85%
Span
10 ft beam
Shade coverage85%
Material efficiency62%
FreestandingMax Shade
💰
Edge Case

Budget Open Slats

24" o.c. with 2x6 rafters and 2x4 slats on top blocks 67% of sun — comfortable for a walkway pergola or a north-facing patio, but not enough shade for a seating area at midday. Lowest rafter count for a 16 ft run (9 rafters).

Spacing
24" o.c.
Rafter
2x6 (1.5×5.5)
Shade
67%
Span
8 ft beam
Shade coverage67%
Material efficiency88%
FreestandingBudget
🌉
Optimal Context

Freestanding Span Master

16" o.c. 2x10 rafters clear a 14 ft post-to-post span between beams without intermediate support — the longest practical pergola span before engineered LVL or glulam beams are required. Use doubled 2x10 beams.

Spacing
16" o.c.
Rafter
2x10 (1.5×9.25)
Shade
74%
Span
14 ft beam
Shade coverage74%
Material efficiency70%
FreestandingMax Shade
🏠
Optimal Context

Attached Ledger Pergola

A house-mounted 2x8 ledger replaces one beam and one row of posts, so rafters run perpendicular from the wall to an outer 4x6-supported beam. Saves one beam and ~25% of the post cost vs. a freestanding equivalent.

Spacing
16" o.c.
Rafter
2x8 (1.5×7.25)
Shade
76%
Span
12 ft beam
Shade coverage76%
Material efficiency82%
AttachedMax Shade
🌧️
Edge Case

Solid Cover Pergola

Corrugated polycarbonate or metal panels over 16" o.c. 2x8 rafters deliver ~95% shade and weather shedding, but require a 1/4:12 (2%) minimum slope for water runoff. A flat solid-cover pergola will pond water and rot fasteners.

Spacing
16" o.c.
Rafter
2x8 + panel
Shade
95%
Slope
1/4:12 min
Shade coverage95%
Material efficiency60%
AttachedSolid CoverMax Shade
🌊
Edge Case

High Wind Coastal

120+ mph coastal exposure tightens rafters to 12" o.c., ups posts to 6x6 minimum, and requires Simpson H4 or H10 hurricane ties at every rafter-to-beam and post-to-beam connection. Verifies with site-specific engineering only.

Spacing
12" o.c.
Rafter
2x8 + H-tie
Shade
82%
Posts
6x6 min
Shade coverage82%
Material efficiency58%
FreestandingHigh WindMax Shade

Pergola Scenario Deconstruction

Each scenario card expands into its underlying rafter behavior, bottleneck, and the framing decision it forces. Read top to bottom or click a card above to jump straight to its analysis.

🌳

Max Shade Retreat

Optimal Context

12" o.c. rafters with a 2x8 top layer drop ~85% of direct sun — enough to host an outdoor dining table under the structure without retrofitting shade cloth. The trade is 50% more rafter linear footage than a 24" o.c. layout.

Spacing
12" o.c.
Rafter
2x8 (1.5×7.25)
Shade
85%
Span
10 ft beam
Shade coverage85%
Material efficiency62%
💰

Budget Open Slats

Edge Case

24" o.c. with 2x6 rafters and 2x4 slats on top blocks 67% of sun — comfortable for a walkway pergola or a north-facing patio, but not enough shade for a seating area at midday. Lowest rafter count for a 16 ft run (9 rafters).

Spacing
24" o.c.
Rafter
2x6 (1.5×5.5)
Shade
67%
Span
8 ft beam
Shade coverage67%
Material efficiency88%
🌉

Freestanding Span Master

Optimal Context

16" o.c. 2x10 rafters clear a 14 ft post-to-post span between beams without intermediate support — the longest practical pergola span before engineered LVL or glulam beams are required. Use doubled 2x10 beams.

Spacing
16" o.c.
Rafter
2x10 (1.5×9.25)
Shade
74%
Span
14 ft beam
Shade coverage74%
Material efficiency70%
🏠

Attached Ledger Pergola

Optimal Context

A house-mounted 2x8 ledger replaces one beam and one row of posts, so rafters run perpendicular from the wall to an outer 4x6-supported beam. Saves one beam and ~25% of the post cost vs. a freestanding equivalent.

Spacing
16" o.c.
Rafter
2x8 (1.5×7.25)
Shade
76%
Span
12 ft beam
Shade coverage76%
Material efficiency82%
🌧️

Solid Cover Pergola

Edge Case

Corrugated polycarbonate or metal panels over 16" o.c. 2x8 rafters deliver ~95% shade and weather shedding, but require a 1/4:12 (2%) minimum slope for water runoff. A flat solid-cover pergola will pond water and rot fasteners.

Spacing
16" o.c.
Rafter
2x8 + panel
Shade
95%
Slope
1/4:12 min
Shade coverage95%
Material efficiency60%
🌊

High Wind Coastal

Edge Case

120+ mph coastal exposure tightens rafters to 12" o.c., ups posts to 6x6 minimum, and requires Simpson H4 or H10 hurricane ties at every rafter-to-beam and post-to-beam connection. Verifies with site-specific engineering only.

Spacing
12" o.c.
Rafter
2x8 + H-tie
Shade
82%
Posts
6x6 min
Shade coverage82%
Material efficiency58%

Pergola Framing Diagrams

Two inline schematic SVGs: the framing overview (posts, beams, rafters) and a side-by-side 12 vs. 16 vs. 24 inch on-center spacing comparison with shade bars.

1. Pergola framing overview

16"beam spanrafters + slatsdoubled beam6x66x6

Two 6x6 posts carry a doubled 2x10 beam; rafters run perpendicular across the beam at 16" o.c.; a 2x4 slat layer on top adds the partial shade layer that brings coverage from ~45% (rafters only) to ~74%.

2. Rafter spacing comparison (12 vs 16 vs 24" o.c.)

12" o.c.85%16" o.c.74%24" o.c.67%shade bar width = shade coverage

Visually, 24" o.c. loses only 4 rafters over a 16 ft run but the shade bar shrinks from 85% to 67% — a hidden 18% coverage loss that the rafter-count saving masks.

Pergola Rafter Spacing Chart (16 ft run)

Reference numbers for a 16 ft pergola length across the three common on-center spacings. Use the calculator above for any other length.

Spacing o.c.Rafter count (16 ft)Shade %Material linear ftTypical use case
12" o.c.1785%272 ftDining pergola, midday seating, solid-feel shade
16" o.c.1374%208 ftStandard 16 ft patio pergola, decorative + partial shade
24" o.c.967%144 ftWalkway pergola, budget, north-facing, ornamental

Assumes 2x8 rafters (actual 1.5" × 7.25") with a 2x4 slat layer at matching spacing. Actual shade varies with slat thickness, sun angle, and orientation. Verify span against local snow and wind load before ordering lumber.

Freestanding vs. Attached Pergola Framing

The pergola type changes the rafter span, post size, and the number of beams. Pick the layout that matches your site constraints before running the calculator.

Freestanding Pergola

  • •Posts: four or more 6x6 (actual 5.5" × 5.5") minimum.
  • •Beams: two parallel doubled 2x10 beams, one per side.
  • •Rafter span: post-to-post distance, typically 10–14 ft with 2x8 or 2x10.
  • •Best for: yards away from the house, garden patios, hot-tub shade.
  • •Cost driver: 4 extra posts + 1 extra beam adds ~25% to lumber vs. attached.

Attached (Ledger) Pergola

  • •Posts: two or more 4x6 (actual 3.5" × 5.5") on the outer side only.
  • •Beams: one outer doubled 2x8 or 2x10 beam; the inner side is a house-mounted 2x8 ledger.
  • •Rafter span: house-to-beam distance, typically 10–12 ft with 2x8.
  • •Best for: patios adjacent to the house, sliding-door shade.
  • •Cost driver: through-bolting into the house rim joist or studs — never just lag screws into siding.

Minimum Roof Slope for a Pergola

Slope depends entirely on whether your pergola is an open-slat shade structure or a solid-cover rain-shedding roof.

Open-slat pergola

No continuous roof plane, so slope is optional. Rain falls straight through the gaps between rafters and slats. You can build the beams perfectly level — most decorative pergolas do.

0″ per foot

Slope optional — level beams OK

Solid-cover pergola

Corrugated polycarbonate, metal, or plywood + shingles form a roof plane that must shed water. Minimum slope is 1/4 inch of rise per foot of run — below this, water ponds and corrodes fasteners.

1/4″ per foot (2.08%)

~1.19° — for a 10 ft run, drop 2.5″

How to set the slope

  1. Set the high-side beam at its design height (e.g., 9 ft above grade).
  2. Set the low-side beam lower by (slope in inches per foot × rafter span). For a 10 ft span at 1/4:12, drop the low beam by 2.5 inches.
  3. Install rafters perpendicular to the beams — the slope is built into the beam heights, not the rafter cut.
  4. Run corrugated panels downslope, lapping each sheet by at least one corrugation.

Standard Pergola Lumber Size Guide

Reference maximum spans and post sizes for SPF #2 framing lumber. Use the calculator above to confirm your specific span and spacing combination.

Nominal sizeActual (inches)Max rafter span (16" o.c.)Typical pergola use
2x61.5 × 5.5~8 ftWalkway pergola, budget, 24" o.c.
2x81.5 × 7.25~12 ftStandard patio pergola, 16" o.c., 6x6 posts
2x101.5 × 9.25~16 ftLong-span freestanding pergola, doubled beam
2x121.5 × 11.25~18 ftMaximum clear span — high cost, large pergola
4x63.5 × 5.5—Attached pergola outer posts only
6x65.5 × 5.5—Freestanding pergola posts, high-wind sites

Reference maximums assume SPF #2, 20 psf live + 10 psf dead load, simple span. Always verify against your local building code and snow/wind load region — IRC prescriptive spans and engineered designs differ.

Pergola Framing Callouts

Three framing guardrails: an underlying insight, a hardware limit, and a mismatch taboo.

💡

Tip — the 16" o.c. breakeven

16" o.c. is the shade-vs-cost breakeven for any seating pergola. Going tighter to 12" o.c. costs 50% more rafter linear footage but adds only ~11% shade coverage (74% → 85%) — most of which the slat layer already provides. Going wider to 24" o.c. saves 4 rafters on a 16 ft run but drops shade to 67% and the gap between rafters widens to 22.5", too wide for 2x4 slats spanning without sag.

⚠️

Warning — through-bolt or fail

Every post-to-beam and rafter-to-beam connection on a freestanding pergola must use 1/2" or 5/8" through-bolts with washers — never just lag screws or deck screws. A 6x6 post carries 800+ lbs of rafter and beam load; lag screws in end-grain pull out at ~250 lbs. For attached pergolas, the house ledger must through-bolt into the rim joist or wall studs every 16" — lag-screwing into siding or sheathing alone will pull free in the first windstorm.

❌

Don't — 24" o.c. under a solid cover

Never install corrugated panels over 24" o.c. rafters. Most polycarbonate and metal panel manufacturers specify a maximum purlin spacing of 24" for residential loads — but that assumes purlins perpendicular to rafters, not rafters themselves at 24". Panels installed directly on 24" o.c. rafters span 22.5" clear and will sag under snow or deflect under wind uplift. Use 16" o.c. maximum under any solid cover, or add perpendicular 2x4 purlins at 24" on top of 24" o.c. rafters.

Pergola Rafter FAQ

Eleven questions covering pergola rafter spacing, span, slope, and lumber sizing — every answer includes specific numbers.

What does a pergola rafter spacing calculator do?▼
A pergola rafter spacing calculator takes the pergola length in feet, the desired on-center spacing (12", 16", or 24"), the rafter depth (2x6, 2x8, 2x10, or 2x12), and the post spacing that defines the rafter span, then returns rafter count = Math.ceil((pergola_length × 12) / spacing) + 1. For a 16 ft pergola at 16" o.c. that is Math.ceil(192/16)+1 = 13 rafters. The estimator on this page also returns actual evenly distributed spacing, shade coverage %, lumber linear feet, minimum roof slope, and the recommended post size.
How far can a pergola rafter span between beams?▼
Pergola rafter span depends on the rafter depth and the load it carries. Typical reference maximums for SPF #2 rafters under a 20 psf live + 10 psf dead load are 2x6 ≈ 8 ft, 2x8 ≈ 12 ft, 2x10 ≈ 16 ft, and 2x12 ≈ 18 ft between beam centers. For a 14 ft clear span between beams, choose 2x10 rafters at 16" o.c. with a doubled 2x10 beam. Anything beyond 18 ft requires engineered LVL or glulam rafters — verify with local building code for snow and wind loads.
How does a pergola roof slope calculator work?▼
A pergola roof slope calculator converts a slope ratio such as 1/4:12 (one quarter inch of rise per foot of run) into a slope percentage (2.08%) and an angle in degrees (1.19°). For a 10 ft run, a 1/4:12 slope drops 2.5 inches from the high side to the low side. Solid-cover pergolas need a minimum 1/4:12 (2%) slope for water runoff; open-slat pergolas do not require slope because there is no roof plane to shed water. The calculator on this page reports the minimum slope automatically based on whether you choose an open or solid cover.
What pergola lumber size should I use for rafters?▼
Pergola lumber sizing follows the post-to-post beam span. For 2x8 rafters (actual 1.5" × 7.25") at 16" o.c., use up to a 12 ft beam span. For 2x10 rafters (actual 1.5" × 9.25") at 16" o.c., you can clear up to a 14 ft span. For 2x6 rafters (actual 1.5" × 5.5"), keep beam span at 8 ft or less. 2x12 (actual 1.5" × 11.25") lets you reach an 18 ft span but at higher cost. Most residential pergolas use 2x8 at 16" o.c. with 6x6 (actual 5.5" × 5.5") posts — a balanced baseline.
How many rafters do I need for a 16 ft pergola at 16 inches on center?▼
Rafter count = Math.ceil((pergola_length × 12) / spacing) + 1. For a 16 ft pergola at 16" o.c.: Math.ceil((16 × 12) / 16) + 1 = Math.ceil(192/16) + 1 = 12 + 1 = 13 rafters. The two end rafters sit at 0 and 192 inches; the 11 interior rafters fall every 16 inches in between. Total lumber for a 16 ft run = 13 rafters × 16 ft = 208 linear feet of 2x8.
What is the actual spacing between rafters vs. the on-center spacing?▼
On-center (o.c.) spacing is measured from the centerline of one rafter to the centerline of the next. Actual clear spacing is o.c. minus the rafter thickness. For 16" o.c. with 2x8 rafters (actual 1.5" thick), the clear gap is 16 - 1.5 = 14.5 inches. For 24" o.c. with 2x6 (1.5" thick), the clear gap is 22.5 inches. If rafters cannot divide the pergola length evenly, the calculator reports the actual evenly distributed spacing, which is pergola_length_inches / (rafter_count - 1).
What shade coverage will a 12 inch vs. 24 inch rafter spacing give?▼
Shade coverage from rafters alone is roughly (rafter_actual_width / actual_spacing) × 100. For 2x8 (actual 7.25") at 16" o.c., rafters alone block about 45% of sun. Add a 2x4 slat layer on top at 16" o.c. and the slats add about 25% more for a total of 70%. 12" o.c. rafters plus slats reach about 85% shade, while 24" o.c. rafters with slats reach about 67%. The hidden cost of 24" o.c. is that it loses about 18% shade coverage versus 12" o.c. — visible only when you compute the slat-gap geometry, not the rafter count.
Should I use 4x4, 4x6, or 6x6 posts for a pergola?▼
Use 6x6 (actual 5.5" × 5.5") posts as the minimum for freestanding pergolas because the post must resist bending from rafter loads and lateral wind. 4x4 posts (actual 3.5" × 3.5") are not recommended for freestanding pergolas — they fail under wind. For attached pergolas mounted to a house ledger, a 4x6 (actual 3.5" × 5.5") outer post is acceptable because the ledger carries the other side. For high-wind coastal sites (120+ mph exposure), use 6x6 minimum with hurricane ties (Simpson H4 or H10) at every post-to-beam and rafter-to-beam connection.
What is the minimum roof slope for a solid-cover pergola?▼
A solid-cover pergola (corrugated polycarbonate, metal, or plywood + shingles) needs a minimum 1/4 inch of rise per foot of run (1/4:12), which is 2.08% slope or about 1.19 degrees. For a 10 ft run, that is a 2.5 inch drop from the high beam to the low beam. Open-slat pergolas do not require slope because there is no roof plane to shed water. Going below 1/4:12 risks water ponding and fastener corrosion — verify the slope is built into the beam heights before installing panels.
How much lumber do I need for a 16 ft by 10 ft pergola?▼
For a 16 ft × 10 freestanding pergola at 16" o.c. with 2x8 rafters: 13 rafters × 16 ft = 208 linear ft of 2x8 for rafters, plus two 16 ft doubled 2x10 beams = 4 × 16 = 64 linear ft of 2x10, plus four 6x6 posts at 10 ft each = 40 linear ft of 6x6, plus 2x4 slats at 16" o.c. across the 16 ft run = 13 slats × 16 ft = 208 linear ft of 2x4. Material total ≈ 520 linear ft of framing lumber plus hardware (through-bolts, lag screws, post bases, and hurricane ties).
What is the difference between freestanding and attached pergola framing?▼
A freestanding pergola uses four or more 6x6 posts and two parallel beams, with rafters spanning between the beams. An attached pergola bolts a 2x8 or 2x10 ledger to the house wall and runs rafters perpendicular from the ledger to one outer beam supported by 4x6 or 6x6 posts. The attached design saves one beam, one row of posts, and ~25% of the post cost, but it requires through-bolting into the house rim joist or studs (never just lag screws into siding). Freestanding is required if the house wall cannot carry the load or if you want the pergola away from the building.

Planning estimate, not engineering. This page is a homeowner/DIY planning guide. Rafter spans, shade percentages, slope minimums, and post sizes are typical educative references that vary by lumber species, grade, fastener schedule, snow load region, and wind exposure. Pergolas in 120+ mph wind zones or 40+ psf snow zones require site-specific engineering. Confirm every value with your local building code and a licensed contractor before ordering lumber or drilling into your house.

Plan your pergola framing with confidence

Run the calculator above with your real beam span and pergola length, then cross-check the scenario card that matches your site. When in doubt, pick the tighter spacing — the lumber cost is small and the shade gain is real.

Browse all rafter calculators →

Related Calculators

🪵

Floor Joist Span Calculator

Interactive floor joist span lookup with reference span char...

📐

Roof Pitch Calculator

Interactive roof pitch calculator: convert X/12 to degrees, ...

🔺

Roof Truss Calculator

Roof truss span estimator and selection guide comparing King...

🪚

Rafter Lumber Size Calculator

Free rafter lumber size calculator for rafters, joists & bea...

🏠

Roofing Calculator

Free roofing calculator to estimate roof materials, pitch, r...

🏔️

Roof Height Calculator

Free roof height calculator: enter span and pitch to get rid...

✂️

Rafter Angle Calculator

Free rafter angle calculator: get plumb cut, seat cut, and b...

⛰️

Roof Ridge Height Calculator

Roof ridge height calculator compares Gable, Hip, and Shed r...

🪜

I-Joist Span Calculator

I-joist span calculator with TJI span tables by series, spac...

💲

Roof Truss Cost Calculator

Roof truss cost calculator estimates truss prices per type. ...

📐

Lean-to Roof Calculator

Lean-to roof calculator finds rafter length, pitch, and slop...

🔺

Gable Roof Calculator

Gable roof calculator computes rafter length, plumb cut, roo...

📏

Roof Overhang Calculator

Roof overhang calculator finds eave length, fascia height, a...

🔩

Metal Roof Calculator

Metal roof calculator estimates panel count, panel length, a...

❄️

Rafter Load Calculator

Rafter load calculator converts snow, dead, and live loads i...

🔗

Rafter Tie Calculator

Rafter tie calculator finds horizontal thrust, tie tension, ...

🏚️

Gambrel Rafter Calculator

Gambrel rafter calculator computes upper and lower rafter le...

⛱️

Gazebo Rafter Calculator

Gazebo rafter calculator sizes hip and common rafters for he...

🏗️

Ridge Beam Calculator

Ridge beam calculator compares ridge board vs structural rid...

📋

Rafter Tables

Rafter table calculator: length factors for 1/12 to 24/12 pi...

🧊

Rafter Insulation Calculator

Calculate insulation R-value, batt depth, and vent baffle ga...

🪵

Board Feet Calculator

Board feet calculator with the bd ft = (T×W×L)/12 formula, n...

📐

Linear to Square Feet Calculator

Convert linear feet to square feet and back with material wi...

🪜

Stair Calculator

Stair calculator finds riser height, tread depth, stringer l...

🏢

Flat Roof Rafter Calculator

Flat roof rafter calculator for low-slope roofs: reference 2...

🪟

Dormer Rafter Calculator

Dormer rafter calculator for shed and gable dormers: rafter ...

🏗️

LVL Beam Span Calculator

LVL beam span calculator with reference span charts by depth...

🚪

Header Size Calculator

Size a door or window header with our free calculator. Door ...

🧱

Wall Stud Calculator

Free wall stud calculator and estimator: stud count with ope...