Pergola Calculator
- Rafters run across the 10 ft width and are spaced along the 12 ft length: 144 inches of length / 16 inches of spacing = 9 spaces, and spaces + 1 gives the rafter count for the pergola: 10.
- Each rafter is cut at 11 ft — the 10 ft span plus 6 inches of decorative overhang at each end. The two beams that carry them run the other way: 2 × 13 ft = 26 ft of beam lumber in total.
- Posts: 4. Four carry a pergola up to 16 ft long; beyond that a middle pair keeps the beams from sagging, and each post footing takes about two 80 lb bags of concrete — 8 bags.
- This is a materials estimate for a classic flat-top pergola, not a structural design: snow load, wind uplift and local code decide real member sizes, and most builders add 10% to the lumber list for cuts and defects.
The Pergola Calculator turns your pergola's length, width and rafter spacing into a materials list you can take to the lumberyard. It counts rafters the way builders do: divide the length in inches by the rafter spacing, round down, and add one for the end rafter, because rafters are counted as spaces plus one. A worked check shows how it works: a 12 × 10 ft pergola with 16 in rafter spacing needs 10 rafters, each cut at 11 ft with 6 in of overhang at both ends. The calculator also sizes the post layout. Four posts carry a pergola up to about 16 ft long; beyond that, a middle pair of posts keeps the beams from sagging, so a 20 ft pergola takes 6 posts. It estimates concrete too: each post footing takes roughly two 80 lb bags, so the worked check needs 8 bags.
This method is the accepted standard for this kind of calculation because it mirrors how pergola rafters are actually laid out and counted on site: spacing sets the number of spaces, and the end rafter makes one more rafter than spaces. The page shows the formula, step-by-step workings, worked examples and sources, so you can check every number yourself rather than trust a black box. One important limit: the count is a materials estimate for a classic flat-top pergola, not a structural design. Snow load, wind uplift and local code set real member sizes, so confirm dimensions and footing requirements with your building department or a qualified designer before you build.
Worked examples
Primary result: 10
Primary result: 10 — At 16 in spacing the rafter count is 10. (12 · 10 · 16)
| Rafters needed | 10 |
| Rafter length (each) | 11 ft |
| Posts | 4 |
| Beam lumber total | 26 ft |
| Concrete bags (80 lb) | 8 |
Primary result: 9
Primary result: 9 — Wider spacing cuts the rafter count to 9. (16 · 12 · 24)
| Rafters needed | 9 |
| Rafter length (each) | 13 ft |
| Posts | 4 |
| Beam lumber total | 34 ft |
| Concrete bags (80 lb) | 8 |
Primary result: 16
Primary result: 16 — Past 16 ft a middle pair of posts joins — and 16 rafters. (20 · 14 · 16)
| Rafters needed | 16 |
| Rafter length (each) | 15 ft |
| Posts | 6 |
| Beam lumber total | 42 ft |
| Concrete bags (80 lb) | 12 |
How many rafters does a pergola need?
Rafter count on a pergola follows a simple rule: spaces plus one. You divide the length of the pergola in inches by the rafter spacing, round down to the nearest whole number, and add the end rafter. That end rafter is why the total is one more than the number of spaces between rafters. A pergola calculator runs this same division for you, so you can compare layouts without doing the arithmetic by hand.
Spacing is the main choice you make, and the common options are 12, 16 and 24 inches on center. Closer spacing means more rafters, more lumber and more cuts, but it also means more shade, because each rafter casts a shadow band across the top. Wider spacing at 24 inches uses fewer rafters and costs less, but the gaps between them are larger and the pergola gives less shade at midday. The 12-inch layout is the densest of the three and the 24-inch layout the most open. Decide how much shade you want over the seating area before you settle on a spacing, since that choice drives the rafter count more than anything else.
Here is the worked check to see the rule in action. Take a 12 × 10 ft pergola with 16-inch rafter spacing, running the rafters across the 12 ft dimension. Twelve feet is 144 inches; 144 divided by 16 is 9, and 9 plus the end rafter gives 10 rafters. Each rafter is cut at 11 ft, which provides 6 inches of overhang at both ends. That is the whole calculation: one division, one rounding, one added rafter.
The rafter count is only part of the materials list. Posts matter too. Four posts carry a pergola up to about 16 ft long; beyond that, a middle pair of posts keeps the beams from sagging, so a 20 ft pergola takes 6 posts. Footings add concrete to the estimate: each post footing takes roughly two 80 lb bags, so the worked check above, with its four posts, needs 8 bags. Run the same logic on your own dimensions and you can price lumber, posts and concrete before you buy.
Treat the count as a materials estimate for a classic flat-top pergola, not a structural design. Snow load, wind uplift and local code set the real member sizes, and those factors can change what you actually build. Use the number to plan your shopping list, then confirm sizes and connections against your local requirements before cutting lumber.
Posts, beams and footings
Posts are the part of a pergola plan most people underestimate. Four posts carry a pergola up to about 16 ft long. Beyond that, a middle pair of posts keeps the beams from sagging, so a 20 ft pergola takes 6 posts. If you are sizing a longer structure, let the pergola calculator settle the post count before you dig: the 16 ft threshold is the line where the plan changes from a simple four-corner frame to a six-post layout, and every footing you add has a concrete cost attached to it.
Beam lengths follow from the post layout plus overhang. The beam has to span between post centers and then run past each end far enough to carry the rafters that sit outside the posts. Work out the post spacing first, add the overhang you want at both ends, and you have your beam length. The same overhang logic applies overhead: in the worked check, a 12 × 10 ft pergola with 16 in rafter spacing needs 10 rafters, each cut at 11 ft with 6 in of overhang at both ends. Notice the rafter length is not the 10 ft depth — the extra foot comes from the two 6 in overhangs.
Footings are where the material list gets heavy. Each post footing takes roughly two 80 lb bags of concrete, so the worked check needs 8 bags for its four posts. A 20 ft pergola with 6 posts would call for about 12 bags on the same rule of thumb. Buy a little extra rather than run short mid-pour, and check the bag yield against the hole size you actually dig, since a wider or deeper footing takes more mix.
Rafter count is the other number worth knowing before you order lumber. Rafters on a pergola are counted as spaces plus one: divide the length in inches by the rafter spacing, round down, and add the end rafter. That is how the 12 ft run at 16 in spacing lands on 10 rafters rather than 9.
Treat all of this as a materials estimate for a classic flat-top pergola, not a structural design. Snow load, wind uplift and local code set real member sizes, and those can push beam depths and post dimensions past what a simple count suggests. Use the numbers here to plan your shopping list and your weekend, then confirm member sizes with your building department or an engineer before you cut.
Rafter length and overhang
Rafter length is where the pergola calculator earns its keep, because the number you order and the number you cut are rarely the same. The span you need to cover is the width of the pergola, but a classic flat-top pergola doesn't stop its rafters flush with the beams. The traditional detail is a decorative tail: the rafter runs past the beam at each end, giving the structure its familiar silhouette. Add 6 inches at each end, and a 10 ft width becomes an 11 ft cut. That is the figure to hand the saw — and the figure to hand the lumber yard.
Tail style is a matter of taste, and it changes the cut length. A simple square cut is the plainest option. A shaped tail — an angled or curved profile cut into the projecting end — uses the same extra length but takes more layout work, and the profile has to be marked consistently across every rafter or the row will look uneven from below. Decide the tail style before you order, because the overhang allowance is what sets the length of every piece in the run.
Rafters are ordered long for a practical reason: it is easy to trim a board and impossible to stretch one. Cutting the tails after the rafters are in place, or at least after a test fit, lets you line up the tails by eye and keep the row straight. Ordering to the finished length leaves no room for a beam that sits a little proud, a slightly out-of-square frame, or a tail profile you decide to deepen once you see it installed. The extra inches are cheap insurance.
The rafter count follows the same logic as the rest of the pergola calculator. Rafters are counted as spaces plus one: divide the length in inches by the rafter spacing, round down, and add the end rafter. As a worked check, a 12 × 10 ft pergola with 16 in rafter spacing needs 10 rafters, each cut at 11 ft with 6 in of overhang at both ends. That is the 10 ft width plus 6 in per end — the classic decorative tail applied to every rafter in the run.
Two cautions belong with these numbers. First, the count is a materials estimate for a classic flat-top pergola, not a structural design — snow load, wind uplift and local code set real member sizes, so the depth and grade of the rafter may need to be larger than a simple count suggests. Second, length has limits: four posts carry a pergola up to about 16 ft long, and beyond that a middle pair of posts keeps the beams from sagging — a 20 ft pergola takes 6 posts. Each post footing takes roughly two 80 lb bags of concrete, so the worked check needs 8 bags.
Before you order lumber
A pergola calculator gives you a materials count, not a permit. Before you order lumber, treat the numbers as a starting point that still needs a 10% waste allowance and a check against your local building department. The 10% cushion covers the cuts that go wrong, boards that arrive warped or short, and the extra piece you buy when a knot lands in the wrong spot. Add it to every length you plan to buy, not just the long beams. It is cheaper to have a spare board on the rack than to make a second trip mid-build with the posts already set.
The rafter count is the place where the waste allowance earns its keep. Rafters on a pergola are counted as spaces plus one: divide the length in inches by the rafter spacing, round down, and add the end rafter. As a worked check, a 12 × 10 ft pergola with 16 in rafter spacing needs 10 rafters, each cut at 11 ft with 6 in of overhang at both ends. Those 11 ft cuts leave offcuts you may be able to reuse for blocking, but plan on the 10% anyway. Post count follows the span: four posts carry a pergola up to about 16 ft long; beyond that a middle pair of posts keeps the beams from sagging, so a 20 ft pergola takes 6 posts. Concrete is easy to underestimate, too. Each post footing takes roughly two 80 lb bags of concrete, so the worked check needs 8 bags.
Permits and code come before the lumber yard, not after. Call your local building department and ask what a detached pergola needs in your area: a permit, a site plan, setback distances from the property line, and footing depth. Rules vary by town, and a structure that is fine in one place may need a permit a few miles away. Ask specifically about frost depth for the footings and about any height limit for an open structure. Getting these answers first can change your post layout or footing size before you have cut anything.
Finally, understand what this estimate is not. The count is a materials estimate for a classic flat-top pergola, not a structural design. Snow load, wind uplift and local code set real member sizes. A calculator cannot see your roof snow, your wind exposure, or the species and grade of the lumber you buy. Use the pergola calculator to plan your shopping list and your budget, then have the beam, rafter and post sizes confirmed by a qualified person or your building department for your location. Ordering lumber is the last step, not the first.
FAQs
How many rafters do I need for a 12 × 10 pergola?
For a 12 × 10 pergola with rafters at 16 inches on center, plan on 10 rafters. The 144 inches of length divides into 9 spaces, and spaces plus one gives the rafter count. So 9 spaces at 16 inches plus one extra rafter equals 10 rafters.
How far apart should pergola rafters be?
Pergola rafters are commonly spaced 12 to 24 inches apart. Closer spacing gives more shade and a heavier look, while wider spacing gives a lighter, cheaper roof. Choose within that range based on how much shade you want and your budget.
When does a pergola need six posts instead of four?
Once the length passes about 16 ft, a middle pair of posts keeps the beams from sagging under their own span. So a four-post design works up to roughly 16 ft of length; beyond that, add a middle pair for six posts total.
How much concrete does each pergola post need?
Plan on roughly two 80 lb bags of concrete per footing for a typical post hole. For a four-post pergola, that works out to 8 bags total. Check your post hole size and the bag yield to confirm before you buy.
How long should pergola rafters be cut?
Cut rafters to the width plus about 6 inches of overhang at each end. For a 10 ft wide pergola, that means 11 ft rafters. Add the overhang on both ends so the rafter tails extend past the beams evenly on each side.
Does this calculator size the lumber structurally?
No. This calculator counts pieces for a classic design; it does not size the lumber structurally. Snow load, wind and local code decide the actual member sizes, so have a qualified person confirm them. Adding a 10% waste allowance to your piece count is wise.