Pergola Calculator

How we build and test

Enter the pergola size from post to post, the rafter spacing and the overhang to get a cut list: how many posts, beams, rafters and top slats you need, how long each one is and the total linear feet of lumber.

The side the beams run along.

The direction the rafters span.

in
in

Applied to both ends of the beams, rafters and top slats.

in

Enter 0 for a pergola with no top slats.

Posts

The full length of each post, including any part set in the ground.

$ per linear ft

An average across the sizes you buy.

Rafters

Enter the pergola length and width, measured post to post.

What this calculator does

  • Rafters, beams, posts and top slats for a pergola
  • Lengths and stock sizes to buy for each part
  • Total lumber in linear feet and lumber cost

How to use the pergola calculator

  1. Enter the length and width measured between the outside faces of the posts. The beams run along the length and the rafters span the width.
  2. Set the rafter spacing on center and the overhang you want beyond the posts on every side.
  3. Enter the spacing of the top slats, or 0 to leave them off.
  4. Choose 4 posts, or 6 to add a middle post on each long side, and enter the full post length.
  5. Read the count, cut length and stock length for each member.

Formulas

Beam length = length + 2 × overhang
Beams = 4 (one on each face of the posts, both sides)
Rafter length = width + 2 × overhang
Rafters = beam length ÷ rafter spacing, rounded up, + 1
Top slat length = beam length
Top slats = rafter length ÷ slat spacing, rounded up, + 1
Total linear feet = sum of count × length for every member

This is the common freestanding layout: a doubled beam sandwiching the posts on each long side, rafters set on edge across the beams and optional 2×2 slats on top, at right angles to the rafters. Counts are rounded up so the actual spacing is never wider than the figure you entered, and the extra one is the member at the starting end. The on-center figure shown assumes 1 1/2 in thick members with the first and last set flush with the ends. Stock lengths are rounded up to the next 2 ft, the way dimensional lumber is sold.

Worked example: a 12 × 10 ft pergola with 12 in overhangs

  1. Beams: 12 ft + 2 × 1 ft = 14 ft each, and 4 beams make 56 linear ft.
  2. Rafters: each is 10 ft + 2 × 1 ft = 12 ft long. The beams are 168 in, and 168 ÷ 16 = 10.5, rounded up to 11, plus 1 = 12 rafters at about 15 1/8 in on center, or 144 linear ft.
  3. Top slats: 144 in of rafter ÷ 12 = 12, plus 1 = 13 slats, each 14 ft long, at about 11 7/8 in on center, or 182 linear ft.
  4. Posts: 4 posts 12 ft apart, 8 ft each, 32 linear ft.
  5. Total: 56 + 144 + 182 + 32 = 414 linear ft.

Rafters by pergola length

Length, post to post Beam length Rafters at 16 in Rafters at 24 in
10 ft 12 ft 10 7
12 ft 14 ft 12 8
14 ft 16 ft 13 9
16 ft 18 ft 15 10

The table assumes a 12 in overhang at each end.

Member sizes, footings and permits

This calculator counts and measures the pieces. It does not size them. The right post, beam and rafter sizes depend on the span between posts, the species and grade of the lumber, the wind and snow loads where you live and anything the pergola will carry, such as a shade cover, a swing or climbing plants. Posts need footings that reach below the local frost depth or approved post bases on a slab. A pergola attached to the house, or over a certain size or height, often needs a permit. Ask your building department, and follow the local code or an engineer’s sizing where they apply.

Questions

How many rafters do I need for a pergola?

Divide the beam length in inches by the rafter spacing, round up and add one. A 12 ft pergola with 12 in overhangs has 14 ft beams: 168 ÷ 16 = 10.5, so 11 spaces and 12 rafters.

How far apart should pergola rafters be?

Between 12 and 24 in on center is typical, and 16 in is a common choice. Closer rafters give more shade and a heavier look. Wider spacing uses less lumber.

How much overhang should a pergola have?

About 12 to 24 in past the posts is usual for both beams and rafters. A 12 in overhang on a 10 ft wide pergola makes each rafter 12 ft long, which is a stock length with no waste.

How much lumber do I need for a 12 × 10 pergola?

With 16 in rafter spacing, 12 in overhangs, 12 in slat spacing and 8 ft posts: four 14 ft beams, twelve 12 ft rafters, thirteen 14 ft top slats and four posts, about 414 linear ft in all.

Sources

  1. Prescriptive Residential Wood Deck Construction Guide (DCA 6, 2018, based on the 2015 IRC), American Wood Council.
    Used for: the principle that joist, beam and post sizes are set from tables based on span and species. It covers decks, so use it as background only for a pergola.
  2. Voluntary Product Standard PS 20-20, American Softwood Lumber Standard, National Institute of Standards and Technology.
    Used for: the 1 1/2 in dressed dry thickness of nominal 2 in dimension lumber (a dry 2 by 4 is surfaced to 1 1/2 by 3 1/2 in).

Related calculators