Pergola rafter calculator
A pergola is mostly a quantity problem with one design number hidden inside it: how much shade the rafters make. That number is the rafter width divided by the spacing, and it is the only thing separating a pergola you sit under from a pergola you sit beside.
Your pergola
How this is calculated
- Rafters = ⌈length in inches ÷ spacing⌉ + 1. The last rafter is added because a run that divides evenly still needs a member at each end.
- Rafter length = span + (2 × overhang). Overhang is added at both ends, which is the mistake most takeoffs make.
- Shade = rafter face width ÷ spacing. A 1½″ rafter at 16″ centres blocks 9.4% of the plan; a 3½″ at 12″ blocks 29%.
- Posts = beams × 2. A beam longer than the rafter span usually needs a mid post, which this tool does not place.
Worked example
16 ft long, 12 ft span, 16″ spacing, 1½″ rafters, 1 ft overhang each end, two beams:
- Rafters = ⌈192 ÷ 16⌉ + 1 = 13
- Length each = 12 + 2 = 14 ft
- Total = 13 × 14 = 182 linear feet
- Shade = 1.5 ÷ 16 = 9.4% — a frame, not a shelter
- Posts = 4
Note that 9.4% is not a defect. A pergola is a shade structure by degree, and most people who want more shade need either 2×4 laid flat at 12″ centres (29%) or a louvered roof.
Shade is a design decision with arithmetic attached
| Rafters | Spacing | Shade | Feel |
|---|---|---|---|
| 2×2 on edge, 1½″ face | 24″ | 6% | A frame with almost no shade |
| 2×6 on edge, 1½″ face | 16″ | 9% | The classic look; dappled at best |
| 2×4 flat, 3½″ face | 16″ | 22% | Noticeable shade at midday |
| 2×4 flat, 3½″ face | 12″ | 29% | A usable sitting area in summer |
| 2×6 flat, 5½″ face | 12″ | 46% | Half shade, half sun |
Orientation changes when you get the shade, not how much. Rafters running east–west shade the midday sun; north–south shade morning and evening and let the noon sun through. Decide which hours you use the space before choosing a spacing.
What the rafter count does not settle
- It does not size the rafters, beams or posts. Those are span-table questions with snow and wind loads attached, and a pergola is an unbraced frame that needs lateral design as well. See how span tables work.
- It does not place mid posts. A 24 ft beam needs them, and where they go is a beam-span decision.
- It does not count purlins or slats. A pergola with cross-slats is two runs, both needing this calculation.
- It does not check the post base detail. A pergola post carries uplift from wind, which is a different connection from a deck post carrying only downward load.
Questions people actually ask
How many rafters for a 16 foot pergola?
At 16″ on centre, 13 rafters — 12 spaces plus one. At 12″ it is 17, and at 24″ it is 9. The count grows with the length, not with the span.
What spacing gives the most shade?
The narrowest spacing with the widest face. Shade is face width divided by spacing, so 3½″ rafters at 12″ centres give 29% and 5½″ at 12″ gives 46%. Below about 8″ spacing a pergola starts to behave like a solid roof, including its wind and snow loads.
Should rafters run along the house or away from it?
Away from the house, usually, so the beams run along the house and the rafters span the shorter distance. It also decides when the shade falls: rafters perpendicular to the house shade the midday sun if they run east–west.
Do I need a permit for a pergola?
Often yes, particularly if it is attached to the house or over a certain height or area. An attached pergola loads the house frame, which makes it a structural addition rather than a piece of furniture.
Can a pergola sit on a deck?
Yes, but the posts need blocking in the deck frame and a base that transfers load into a joist or beam rather than into the decking. A post sitting on boards will crush them.