Home › Home & Construction › Pergola Calculator
Pergola Calculator
Use this free pergola calculator to plan a pergola before you buy lumber. Enter the length, width, and height, choose your post and rafter spacing and wood type, and the calculator works out how many posts, beams, and rafters you need, the total board feet of lumber, the shade coverage, and the estimated cost including hardware.
Rafters get a 1 ft overhang on each side. Hardware, brackets, and screws are estimated at 15% of the lumber cost.
| Amount | Value |
|---|---|
| Posts (4×4) | 6 |
| Beams (2×8) | 2 |
| Rafters (2×6) | 8 |
| Board feet — posts | 64 |
| Board feet — beams | 32 |
| Board feet — rafters | 96 |
| Total board feet | 192 |
| Lumber cost | $1,248 |
| Hardware (15%) | $187 |
| Total cost | $1,435 |
| Shade coverage | 34% |
How it works
A pergola has three kinds of lumber: posts, beams, and rafters. Posts hold the whole structure up, beams run along the top of the posts on both long sides, and rafters run across the beams to form the open roof. The calculator counts each piece from your dimensions and spacing, converts the pieces to board feet, and prices the lumber by wood type.
Posts are counted along both long sides: divide the length by the post spacing, round down, add one post, and double it for the two sides. A 12 foot pergola with posts every 6 feet needs 3 posts per side, or 6 posts in total. Beams are simple: two beams, each as long as the pergola. Rafters are counted across the width: divide the width in inches by the rafter spacing, round down, and add one. A 10 foot wide pergola with rafters every 16 inches needs 8 rafters, and each rafter is the width plus a 1 foot overhang on each side, so 12 feet long.
Beams = 2, each the length of the pergola
Rafters = (width in inches ÷ rafter spacing, rounded down + 1), each width + 2 ft long
Board feet = thickness (in) × width (in) × length (ft) ÷ 12, per piece
Total cost = board feet × price per board ft × 1.15 (hardware)
Shade % = 5.5 in rafter width ÷ rafter spacing × 100
Board feet are how lumber is sold and priced. One board foot is a piece 12 inches long, 12 inches wide, and 1 inch thick, and the formula is thickness in inches times width in inches times length in feet, divided by 12. A 4 by 4 post 8 feet tall is 4 × 4 × 8 ÷ 12, or 10.67 board feet. A 2 by 8 beam 12 feet long is 16 board feet, and a 2 by 6 rafter 12 feet long is 12 board feet. Add all three groups together for the total, then multiply by the price per board foot: $3.50 for pressure-treated pine, $6.50 for cedar, and $8.50 for redwood. Hardware, brackets, bolts, and screws add about 15 percent on top.
Shade coverage comes from the rafters alone. Each rafter is 5.5 inches wide, so the share of the sky it blocks is 5.5 divided by the rafter spacing: 34 percent at 16 inch spacing and 46 percent at 12 inch spacing. That is the shade directly overhead at midday; angled morning and evening sun is blocked more. For more shade, add cross purlins on top, or a shade cloth in summer.
Two details matter more than the lumber list. First, set the posts properly: dig below the frost line where winters freeze, set the posts in concrete, and use post bases to keep the wood out of standing water. Second, keep the beam span sensible: 6 to 8 feet between posts is standard, and never more than 10 feet with a 2 by 8 beam, or the beam will sag. A pergola that is level, square, and well anchored will last for decades.
Worked example
You want a cedar pergola 12 feet long, 10 feet wide, and 8 feet high, with posts every 6 feet and rafters every 16 inches.
Step 1: Posts — 2 × (12 ÷ 6 + 1) = 6 posts, each 4×4 × 8 ft = 10.67 board ft, or 64 board ft in total.
Step 2: Beams — 2 beams, each 2×8 × 12 ft = 16 board ft, or 32 board ft in total.
Step 3: Rafters — (120 ÷ 16 rounded down) + 1 = 8 rafters, each 2×6 × 12 ft = 12 board ft, or 96 board ft in total.
Step 4: Total lumber — 64 + 32 + 96 = 192 board ft.
Step 5: Lumber cost — 192 × $6.50 = $1,248, plus 15% hardware, $187.20, giving $1,435.20.
Step 6: Shade — 5.5 ÷ 16 = 34.4%, or 34% shade.
The result is 6 posts, 2 beams, and 8 rafters, 192 board feet of cedar, and a total cost of $1,435 with 34% shade coverage.
FAQ
How much does it cost to build a pergola?
A 12 by 10 foot cedar pergola costs about $1,435 in lumber and hardware if you build it yourself, and roughly double that with professional labor. Pressure-treated pine is the cheapest wood at about $3.50 per board foot, cedar runs about $6.50, and redwood about $8.50. A larger pergola, a solid roof, or a kit with decorative brackets all push the price up, while a smaller pine pergola can come in under $800 in materials.
How far apart should pergola posts be?
Pergola posts are usually spaced 6 to 8 feet apart along each side. Six feet is the safer spacing for a heavy beam or a snowy climate, because the beams span less distance and sag less over time. Eight feet works for a light pine pergola in a mild climate. Never span more than 10 feet between posts with a standard 2 by 8 beam, or the beam will sag in the middle within a few seasons.
How much shade does a pergola give?
A pergola with rafters spaced 16 inches apart gives about 34 percent shade, because each 5.5 inch wide rafter blocks that share of the sky. Spacing the rafters 12 inches apart raises the shade to about 46 percent, and adding cross purlins on top can reach 60 percent or more. A pergola is not a roof: it filters the sun and feels cooler underneath, but it will not keep you dry in rain unless you add a solid cover.
What is the best wood for a pergola?
Cedar is the best all-round choice for most pergolas: it resists rot and insects naturally, looks good without stain, and is lighter than pressure-treated pine. Pressure-treated pine is the cheapest option and lasts well, but it is heavy, can twist as it dries, and needs a year before you stain it. Redwood is beautiful and durable but costs the most and is hard to find in some regions. Whichever wood you pick, use hot-dipped galvanized or stainless hardware so it does not rust and stain the wood.
How tall should a pergola be?
Eight feet is the standard pergola height: tall enough to walk under comfortably and to hang a light or a fan, but low enough to feel sheltered. Seven feet feels cramped for taller people, and nine or ten feet suits a large patio or a pergola over a hot tub. If the pergola attaches to the house, the beam on the house side usually sits at 8 feet and the outer beam a few inches lower, so rain runs off the top.