Pergola Lumber Calculator
Estimate the posts, beams and rafters for a pergola from its footprint, height and rafter spacing.
How it works
Rafters = ⌊length (in) ÷ spacing⌋ + 1 · Rafter LF = rafters × width · Beam LF = 2 × length · Post LF = posts × height
A pergola is three layers of lumber: vertical posts, horizontal beams that carry the load along the two long sides, and the top rafters that span the width and give the structure its shade lines. Rafter count comes from dividing the run by the on-center spacing and adding one for the closing rafter. This gives lineal footage so you can price boards; step up post and beam sizes as the span grows to keep the roof from sagging.
Worked example
For a 12 × 10 ft pergola with rafters 16″ on center: ⌊144 ÷ 16⌋ + 1 = 10 rafters, each 10 ft long = 100 ft. Two 12 ft beams add 24 ft and four 8 ft posts add 32 ft, for 156 lineal feet total.
Frequently asked questions
How far apart should pergola rafters be?
Rafters are commonly spaced 12 to 20 inches on center. Closer spacing (12–16″) gives more shade and a heavier look; wider spacing (18–24″) uses less lumber and lets more light through.
What size posts does a pergola need?
Freestanding pergolas typically use 6×6 posts; 4×4 posts suit only small, low, attached structures. Taller posts and longer beam spans need the larger 6×6 to resist wind sway and sag.
Does this include hardware or slats?
No — this estimates the main posts, beams and rafters only. Add post bases, structural screws or bolts, and any thin top slats (purlins) separately based on the shade coverage you want.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.