How this calculator works
A freestanding pergola has a row of posts on each of two sides, a doubled beam across the top of each row, rafters across the beams, and, if you want shade, slats across the rafters. The calculator places enough posts so that no beam spans farther than you choose, picks standard board lengths, and sets the rafters at your spacing. The footings run through our post concrete calculator.
Worked example: a 12 × 10 ft pergola, 8 ft high, needs 4 posts of 6×6 (10 ft long), 4 boards of 2×10 for the doubled beams, 8 rafters of 2×6 at 24 inch centers, 27 slats of 2×2 and 18 bags of concrete for the 4 footings. Without slats it needs none of the 2×2s, and with slats at 6 inches 52. A 20 ft wide pergola needs 6 posts.
Lumber for common pergola sizes (8 ft high, 24 in rafters, 2×2 slats at 12 in)
Freestanding, with doubled beams on each side.
| Pergola | Posts | Beam boards | Rafters | Slats (8 ft) | Footing bags |
|---|---|---|---|---|---|
| 10 × 10 ft | 4 | 4 | 7 | 24 | 18 |
| 12 × 10 ft | 4 | 4 | 8 | 27 | 18 |
| 12 × 12 ft | 4 | 4 | 8 | 31 | 18 |
| 14 × 12 ft | 6 | 4 | 9 | 36 | 26 |
| 16 × 12 ft | 6 | 4 | 10 | 40 | 26 |
| 20 × 12 ft | 6 | 8 | 12 | 49 | 26 |
Tips before you buy
- Set the posts in holes dug to your frost depth, or use footings and post bases that your code accepts, and check they are plumb and level before the concrete sets.
- Cut the rafter ends with a pattern, so they all match, and make the overhangs equal at both ends.
- Use a stain or sealer on all sides of the lumber, including the cut ends, before you assemble it.
- Bolt the beams to the posts rather than only nailing them, and tie the rafters to the beams with clips against the wind.
- A longer span needs bigger lumber or an extra pair of posts. Never stretch a beam beyond the span table for the size you choose.
Tools & materials for this project
As an Amazon Associate we earn from qualifying purchases. These links do not change what you pay.
Frequently asked questions
How much lumber do I need for a 12x12 pergola?
A 12 × 10 ft pergola needs 4 posts, 4 beam boards and 8 rafters. Run the calculator with your own size for the full list.
How many posts does a pergola need?
Four for a pergola up to about 12 feet wide, and one more on each side for every extra span of 8 to 12 feet: a 20 ft pergola takes 6.
How far apart should pergola rafters be?
Usually 16 to 24 inches on center. Closer spacing gives more shade and a stiffer roof; wider spacing saves lumber.
How much concrete does a pergola need?
Each post sits on a footing, which for a 12 inch hole 3 feet deep takes about 4.5 bags of 80 lb mix. A 12 × 10 ft pergola takes 18 bags in all.
Do I need a permit to build a pergola?
Often yes if it is attached to the house or larger than a set size (commonly 120 to 200 square feet), and many places need footings to a set depth. Check with your building department before you start.
Add this calculator to your website
Running a blog, a contractor site or a class page? You can put this calculator on it for free. Copy the code below, and please leave the link underneath the calculator in place. The small script just resizes the frame to fit the results; if your site strips scripts, the calculator still works inside a scrolling frame.
Related calculators & guides
Estimates only. Results assume standard materials and simple shapes. Supplier products vary, and the final call on quantity, structure and safety is yours. Check your local code and your supplier's guidance before ordering.