Skip to main content
ponderloop

Pergola Lumber Calculator: Posts, Beams, Rafters and Purlins

A 12 × 10 ft pergola with 8 ft posts needs 41 boards, with 10% extra: 6 posts (4 × 4, no more than 8 ft apart, set in concrete), 4 beam boards (two doubled 2 × 8 beams with a 12 in overhang), 12 rafters (2 × 6 at 16 in on center) and 13 purlins (2 × 2 at 12 in on center), with 25 bags of 50 lb fast-setting concrete and 24 rafter ties. The lumber sizes are typical choices, not a design: beam and rafter sizes must follow the IRC span tables or your local code.

Figures based on the sources listed belowUpdated How we calculate

Extra boards

The finished height of the post above the ground or patio. Posts set in concrete are cut longer by the hole depth.
A maximum along each beam: the length is split into equal bays no longer than this. The right spacing depends on the beam size and your loads, so check it against a span table or your local code.
A typical choice, not checked against a design load. Use pressure-treated lumber rated for ground contact for posts set in concrete or soil.
Concrete holes add the hole depth to each post and count bags; post bases count one base per post.

Rule of thumb: about 3 times the post width, so 10 to 12 in for a 4 × 4 and about 16 in for a 6 × 6.

Check your code for the depth: it is often set by the frost line. The post runs to the bottom of the hole and the concrete is poured to the top.
Fast-setting mix is poured dry into the hole and watered; regular mix is mixed first. The bag count follows the yield of the bag you pick.
A typical choice. Each beam is two boards side by side. Check the span between posts against a span table or local code.

How far each beam extends past the corner post. It lengthens the beams, the purlins and the run the rafters are spaced along.
A typical choice. Rafters span the width, resting on the beams. Check the span against a span table or local code.
Closer rafters carry more but cost more; a decorative pergola often uses 16 to 24 in.

How far each rafter extends past the beam on each side. A longer overhang may need a larger rafter.
The slats on top of the rafters. A typical choice.
Closer slats give more shade. Spacing is centre to centre.
Each part is bought in the length from 8 ft up to this that needs the fewest linear feet. Beams and purlins longer than it are spliced.

Buy 41 boards.

Buy 41 boards

120 sq ft + 10% waste = 132 sq ft

  • Posts (4 × 4): 6 posts (each 10 ft), 3 per side, at most 8 ft apart
  • 4 × 4 boards for the posts: 7 boards (each 10 ft), 6 for the cut list, plus waste
  • Beam boards (doubled) (2 × 8): 4 pieces (each 14 ft), two boards per beam, two beams
  • 2 × 8 boards for the beam boards (doubled): 5 boards (each 14 ft), 4 for the cut list, plus waste
  • Rafters (2 × 6): 12 rafters (each 12 ft), 16 in on center
  • 2 × 6 boards for the rafters: 14 boards (each 12 ft), 12 for the cut list, plus waste
  • Purlins (top slats) (2 × 2): 13 purlins (each 14 ft), 12 in on center
  • 2 × 2 boards for the purlins (top slats): 15 boards (each 14 ft), 13 for the cut list, plus waste
  • Post cut list (4 × 4, first-fit, inches): 6 × 120 in on 10 ft boards (before waste)
  • Beam cut list (2 × 8, first-fit, inches): 4 × 168 in on 14 ft boards (before waste)
  • Rafter cut list (2 × 6, first-fit, inches): 12 × 144 in on 12 ft boards (before waste)
  • Purlin cut list (2 × 2, first-fit, inches): 13 × 168 in on 14 ft boards (before waste)
  • Concrete per post hole (hole less the post): 1.4 cu ft
  • Concrete bags (50 lb fast-setting mix (0.375 cu ft), with waste): 25 bags
  • Post bases: 0 bases, none: posts are set in concrete
  • Rafter ties (1 per rafter at each beam, estimate): 24 ties, some makers call for two per end: follow the connector’s instructions
  • Beam span between posts, centre to centre (2 × 8 doubled): 6' 0"
  • Rafter span between beams, centre to centre (2 × 6): 10' 0"
  • Purlin span between rafters (2 × 2): 1' 4"
  • Sizes are typical choices: Not checked against a span table: confirm beam, rafter and post sizes against the IRC span tables or your local code
How this number is calculated

120 sq ft + 10% waste = 132 sq ft ÷ 3.22 sq ft per board = 41 boards

Shopping list

  • Post bases for 4 × 4 or 6 × 6 posts
  • Hurricane / rafter ties
  • Structural wood screws
  • Fast-setting concrete mix (50 lb)
  • Post level
  • Carriage bolts for beams
Show diagram

Saved projects

No saved projects yet.

Posts by pergola length and largest post spacing

Four corner posts plus the intermediate posts on the two beam lines: the length is split into equal bays no longer than the spacing. Worked by this calculator.
LengthAt 6 ftAt 8 ftAt 10 ftAt 12 ft
8 ft6444
10 ft6644
12 ft6664
14 ft8666
16 ft8666
20 ft10866
24 ft10886

Rafters by pergola length and rafter spacing

Rafters spaced along the beams, which overhang each end post by 12 in, with one at each end. Worked by this calculator.
Length12 in on center16 in on center24 in on center
8 ft1196
10 ft13107
12 ft15128
14 ft17139
16 ft191510
20 ft231812
24 ft272114

Boards to buy by pergola size

With the page’s typical choices (4 × 4 posts 8 ft apart and 8 ft high set in concrete, doubled 2 × 8 beams, 2 × 6 rafters at 16 in, 2 × 2 purlins at 12 in, 12 in overhangs, 10% extra) and boards up to 20 ft. Each cell is the boards and the length that buys the fewest linear feet. Worked by this calculator.
SizePosts (4 × 4)Beams (2 × 8)Rafters (2 × 6)Purlins (2 × 2)Boards in all
8 × 8 ft5 × 10 ft5 × 10 ft10 × 10 ft13 × 10 ft33
10 × 10 ft7 × 10 ft5 × 12 ft11 × 12 ft15 × 12 ft38
12 × 10 ft7 × 10 ft5 × 14 ft14 × 12 ft15 × 14 ft41
12 × 12 ft7 × 10 ft5 × 14 ft14 × 14 ft17 × 14 ft43
16 × 12 ft7 × 10 ft5 × 18 ft17 × 14 ft17 × 18 ft46
20 × 12 ft9 × 10 ft9 × 12 ft20 × 14 ft33 × 12 ft71

Methodology & assumptions

Length and width are the pergola measured between post centres. Two beams run along the length, one on each long side, and each beam is two boards side by side (doubled). Posts: the length is divided into the fewest equal bays no longer than the largest post spacing, and each beam line has bays + 1 posts, so a 12 ft length at 8 ft is 2 bays and 3 posts a side, 6 posts, four of them at the corners. Beams: the length plus the overhang at each end (12 ft + 2 × 12 in = 14 ft), four boards in all. Rafters sit on the beams and run across the width, overhanging each beam: they are spaced along the beam length, ceil(168 in ÷ 16 in) + 1 = 12, each the width plus two overhangs (10 ft + 2 × 12 in = 12 ft). Purlins lie across the rafters, parallel to the beams, spaced along the rafter length and each as long as the beams: ceil(144 in ÷ 12 in) + 1 = 13. Posts set in concrete are cut longer than the height above ground by the hole depth (8 ft + 24 in = 10 ft). Buying: the pieces of each part are packed onto stock boards longest first, each into the first board with room, for every length from 8 ft up to the longest board you will buy, and the length that buys the fewest linear feet wins (the shorter board on a tie). A beam or purlin longer than the longest board is split into equal pieces, to be joined over a post or a rafter; posts and rafters are never spliced, and the page says so when one is too long. The extra percentage is added to each part's board count, rounded up. Saw kerf, notches and the cuts for a decorative rafter end are not modeled. Concrete uses the fence post logic: a round hole of the diameter and depth you enter, less the volume of the post, times the posts, with the extra percentage, divided by the yield of the bag (50 lb fast-setting mix is about 0.375 cu ft); a post 3.5 in square in a 12 in hole 24 in deep takes about 1.4 cu ft. Hardware: one post base per post when the posts stand on bases, none when they are set in concrete; rafter ties are counted at one per rafter at each beam, which is an estimate, because some connector makers call for two per end. Fasteners, carriage bolts and the fixings for the purlins are not counted. Spans are reported, not checked: the beam span between posts, the rafter span between beams and the purlin span between rafters are shown so you can look them up. The IRC has no prescriptive table for a pergola. The deck joist table in R507.6 (the one the deck joist span calculator uses) is written for a deck floor at 40 psf live load plus 10 psf dead load, and a pergola roof carries different loads, snow and wind among them. Use the lumber span tables with your design loads, such as the American Wood Council's span calculator or the AWC Prescriptive Residential Wood Deck Construction Guide (DCA 6) as a reference, and ask your building department whether a permit, an engineer or a particular post connection is required. Every lumber size on this page is a typical choice, not a recommendation for your site. The metric toggle shows lengths in m and the overhangs and hole size in cm.

How to estimate the lumber for a pergola

  1. Measure the footprint. Measure the length and the width between post centres and decide the post height above ground.
  2. Place the posts. Run two beams along the length. Divide the length into equal bays no longer than your largest post spacing and add one post per beam line, giving four corner posts plus any intermediate ones.
  3. Size the beams, rafters and purlins. Pick typical sizes, then check the beam span between posts and the rafter span between beams against the IRC span tables or your local code before buying.
  4. Count the pieces. Beams are doubled and overhang the end posts. Rafters are spaced along the beams and overhang each beam. Purlins are spaced along the rafters.
  5. Buy by cut list. Pack the pieces onto stock boards from 8 to 20 ft, add the extra percentage, and add concrete, post bases and rafter ties.

Worked examples

ProjectResult
12 × 10 ft pergola, 8 ft 4 × 4 posts at most 8 ft apart set in concrete, doubled 2 × 8 beams, 2 × 6 rafters at 16 in, 2 × 2 purlins at 12 in41 boards: 6 posts, 12 rafters, 13 purlins, 25 bags of concrete
The same pergola with 6 × 6 posts, 2 × 10 beams and 2 × 8 rafters41 boards: 6 posts, 12 rafters, 13 purlins, 21 bags of concrete
The same pergola on post bases on a patio41 boards: 6 posts, 6 post bases, 0 bags of concrete
An open look: 24 in rafters and 24 in purlins29 boards: 8 rafters, 7 purlins
16 × 12 ft pergola with posts up to 10 ft apart46 boards: 6 posts, 15 rafters, 15 purlins, 25 bags of concrete
20 × 12 ft pergola, 9 ft posts, boards no longer than 12 ft71 boards: 8 posts, 8 spliced beam pieces, 18 rafters, 15 purlins
A small 8 × 8 ft pergola with 5% extra32 boards: 4 posts, 9 rafters, 11 purlins

Frequently asked questions

How many posts does a pergola need?
Four at the corners, plus intermediate posts along the two beams so that no bay is longer than your largest spacing. A 12 ft length at 8 ft is 2 bays of 6 ft, so 3 posts a side and 6 in all; at 6 ft spacing it is also 2 bays, and at 12 ft it is 1 bay and 4 posts. The right spacing depends on the beam size and your loads, so treat the spacing you enter as a maximum to check against a span table or your local code.
What size beams, rafters and posts should a pergola have?
It depends on the span, the lumber species and grade, and the loads where you live, including snow and wind. The calculator offers typical choices (4 × 4 or 6 × 6 posts, doubled 2 × 8 or 2 × 10 beams, 2 × 6 or 2 × 8 rafters, 2 × 2 or 2 × 4 purlins) and does not check them. Beam and rafter sizing must follow the IRC span tables or your local code; the span lines under the result show the spans to look up.
Does the IRC have a span table for a pergola?
Not a prescriptive one for a pergola as such. The deck joist table in IRC R507.6, the one the deck joist span calculator uses, is written for a deck floor at 40 psf live load plus 10 psf dead load, and a pergola’s open roof carries other loads, snow and wind among them. Many builders size the members with the American Wood Council’s span calculator and the deck guide (DCA 6) and then ask the building department what it accepts. Your local code governs.
How are the boards chosen and cut?
Each part's pieces are packed onto stock boards longest first, for every length from 8 ft up to the longest board you will buy, and the length that buys the fewest linear feet wins. In the example the posts are cut 10 ft from 10 ft boards, the beam boards come from 14 ft boards (4 × 168 in) and the rafters from 12 ft boards. A beam or purlin longer than your longest board is spliced; with a 12 ft limit a 20 ft pergola needs 8 beam pieces instead of 4.
Why are the beams doubled, and how is that counted?
A doubled beam is two boards side by side, bolted or screwed together with the post between them or on top of it, and the calculator counts both: two beams make 4 boards. Whether you set the beam on top of the posts or bolt it to their sides, and how the boards are fastened, is a connection detail to take from the maker's instructions or your code.
How many bags of concrete do the posts need?
The concrete in each hole is the round hole less the post, using the fence post concrete logic. With 6 posts in 12 in holes 24 in deep, 4 × 4 posts and 10% extra, that is 25 bags of 50 lb fast-setting mix (about 0.375 cu ft each). Posts on post bases need no concrete in holes, so the count drops to 0. The depth often follows your frost line, so check your code.
How many post bases and rafter ties do I need?
One post base per post when the posts stand on bases (6 for the example) and none when they are set in concrete. Rafter ties are counted at one per rafter at each beam, 24 for 12 rafters; that is an estimate, because some connector makers call for two per end. Follow the instructions of the connector you buy for the count and the fasteners.
How many rafters and purlins do I need?
Rafters are spaced along the beams, including their overhang: 12 at 16 in on center for the example, 8 at 24 in. Purlins are spaced along the rafter length, including its overhang: 13 at 12 in on center, 7 at 24 in. Closer purlins give more shade and use more lumber.
Do the post and overhang lengths include the concrete depth?
Yes for posts set in concrete: the post is cut the height above ground plus the hole depth, 10 ft for an 8 ft post in a 24 in hole. On post bases it is the height you enter. Overhangs are measured past the post (beams) and past the beam (rafters), and they lengthen the parts they extend.

Related calculators