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.
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.
Compared against the computed shade from rafter + slat geometry. Falls short? Tighten spacing or add slats.
Computed outputs
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.
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.
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).
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.
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.
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.
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.
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 Context12" 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.
Budget Open Slats
Edge Case24" 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).
Freestanding Span Master
Optimal Context16" 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.
Attached Ledger Pergola
Optimal ContextA 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.
Solid Cover Pergola
Edge CaseCorrugated 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.
High Wind Coastal
Edge Case120+ 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.
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
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.)
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 ft | Typical use case |
|---|---|---|---|---|
| 12" o.c. | 17 | 85% | 272 ft | Dining pergola, midday seating, solid-feel shade |
| 16" o.c. | 13 | 74% | 208 ft | Standard 16 ft patio pergola, decorative + partial shade |
| 24" o.c. | 9 | 67% | 144 ft | Walkway 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.
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.19° — for a 10 ft run, drop 2.5″
How to set the slope
- Set the high-side beam at its design height (e.g., 9 ft above grade).
- 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.
- Install rafters perpendicular to the beams — the slope is built into the beam heights, not the rafter cut.
- 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 size | Actual (inches) | Max rafter span (16" o.c.) | Typical pergola use |
|---|---|---|---|
| 2x6 | 1.5 × 5.5 | ~8 ft | Walkway pergola, budget, 24" o.c. |
| 2x8 | 1.5 × 7.25 | ~12 ft | Standard patio pergola, 16" o.c., 6x6 posts |
| 2x10 | 1.5 × 9.25 | ~16 ft | Long-span freestanding pergola, doubled beam |
| 2x12 | 1.5 × 11.25 | ~18 ft | Maximum clear span — high cost, large pergola |
| 4x6 | 3.5 × 5.5 | — | Attached pergola outer posts only |
| 6x6 | 5.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?▼
How far can a pergola rafter span between beams?▼
How does a pergola roof slope calculator work?▼
What pergola lumber size should I use for rafters?▼
How many rafters do I need for a 16 ft pergola at 16 inches on center?▼
What is the actual spacing between rafters vs. the on-center spacing?▼
What shade coverage will a 12 inch vs. 24 inch rafter spacing give?▼
Should I use 4x4, 4x6, or 6x6 posts for a pergola?▼
What is the minimum roof slope for a solid-cover pergola?▼
How much lumber do I need for a 16 ft by 10 ft pergola?▼
What is the difference between freestanding and attached pergola framing?▼
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...