Fitting out a shed? Shelving, hooks and bike racks on Amazon (opens in a new tab)

Pergola Calculator

Work out the posts, beams, rafters and top slats for a pergola, and how much shade it casts at different times of day.

ft
ft
in
Shade under the pergola —
Lumber list

How to use the pergola calculator

  1. Enter the length along the beams and the width the rafters span, both measured post to post, and the overhang past the posts.
  2. Choose the beam size. Deeper beams let the posts stand farther apart.
  3. Choose the rafter size and spacing, and whether to add 2×2 top slats.
  4. Pick a sun height for the shade estimate.

The result shows how much shade the pergola gives, with a lumber list and a plan drawn to scale.

Posts, beams and rafters

  • Posts: 6×6 for most pergolas. A doubled 2×8 beam can span about 10 ft between posts on an open pergola, a doubled 2×10 about 12 ft and a doubled 2×12 about 14 ft. Longer pergolas need posts in the middle.
  • Rafters: 2×6 rafters look and stay straight up to about a 10 ft span, 2×8 up to about 14 ft and 2×10 up to about 16 ft. Spacing of 12 to 24 in is usual.
  • Overhang: beams and rafters usually run 12 to 24 in past the posts, often with a decorative cut on the ends.

Rafters = (length + 2 × overhang) × 12 ÷ spacing + 1

These sizes are for an open pergola. Adding a solid roof, a retractable canopy, a swing or a heavy vine changes the loads; for those, follow the maker’s instructions or local span tables.

How much shade does a pergola give?

When the sun is directly overhead, a 1-1/2 in rafter every 16 in shades less than 10% of the ground. Shade comes from the depth of the rafters: as the sun gets lower, each rafter casts a shadow as wide as its thickness plus its depth ÷ tan(sun height).

Shade = (1.5 in + rafter depth ÷ tan(sun height)) ÷ spacing

Example: 2×8 rafters (7-1/4 in deep) every 16 in, with the sun 45° up, cast shadows 8-3/4 in wide, so they shade 55% of the ground when the sun shines across them. When the sun shines along the rafters, only the 1-1/2 in thickness counts, about 9%. Top slats across the rafters fill that gap.

Point the rafters to suit the time you use the space. Rafters that run north–south block the low sun of mornings and late afternoons best; rafters running east–west do more around midday. For full shade, add a shade cover or plant a vine.

Frequently asked questions

What size should a pergola be?

Size it like a room: a table for four needs about 10 × 10 ft, and a seating group about 12 × 12 ft. Keep the beams at least 8 ft above the floor. The pergola vs gazebo vs pavilion guide compares the options.

How many posts does a 12 × 12 pergola need?

Four 6×6 posts with doubled 2×10 or 2×12 beams. With doubled 2×8 beams, add a middle post on each side.

How deep should pergola posts go?

Either set them on concrete footings with metal post bases, or bury them about a third of their above-ground height, below the frost line, in concrete. Post bases keep the wood out of the wet and are easier to replace.

More shed and shelter calculators