Pergola Calculator
Enter your pergola dimensions, rafter spacing, and shade slat spacing to calculate the number of posts, beams, rafters, slats, and total linear feet of lumber needed for a standard rectangular pergola.
Estimate only — not professional advice. Always verify results independently before purchasing materials or beginning work. Terms of Use
What is Pergola?
A pergola calculator estimates the structural components and total lumber required to build a freestanding rectangular pergola. Pergolas are open-air structures with posts, overhead beams, rafters, and optional shade slats that provide partial shade and define an outdoor living space. Knowing the exact material quantities before you start saves trips to the lumber yard and prevents over- or under-ordering. A standard rectangular pergola has four posts, one at each corner. The posts are the vertical structural members that carry the entire load and are typically 6x6 pressure-treated lumber or cedar for decay resistance. Post height is measured from the top of the footing or mounting bracket to the underside of the beam, and 8 feet is the most common residential height providing comfortable overhead clearance. Two beams run along the length of the pergola, one on each side, resting on top of the posts. Beams are the primary horizontal load-bearing members and are typically 2x8, 2x10, or doubled 2x6 lumber depending on span. Each beam equals the full length of the pergola, so total beam lumber is twice the pergola length. Rafters span the width of the pergola perpendicular to the beams. They are spaced evenly along the length, with one rafter at each end and additional rafters between them at the specified spacing. Common rafter spacing is 16 to 24 inches on center. The number of rafters equals the length divided by rafter spacing, rounded up, plus one for the starting rafter. Rafters are typically 2x6 or 2x8 lumber. Shade slats are the topmost layer, running perpendicular to the rafters (parallel to the beams) along the length. They are smaller dimensional lumber, typically 2x2 or 1x2, spaced closely together to create filtered shade. The closer the spacing, the more shade coverage and the more lumber required. At 4-inch spacing, slats provide approximately 50 percent shade coverage. At 2-inch spacing, coverage increases to about 67 percent. Each slat spans the full width of the pergola. The total lumber output sums all components into linear feet, making it easy to create a purchase list. When converting to board feet for cost estimation, remember that a 2x6 is 1 board foot per linear foot, and a 6x6 post is 3 board feet per linear foot.
How to Calculate
- Decide on the overall pergola length and width in feet
- Choose the post height (8 ft is standard, 9-10 ft for a grander feel)
- Set the rafter spacing (16 in for dense shade, 24 in for moderate shade)
- Set the shade slat spacing (2-4 in for good shade, 6-8 in for light dappled shade)
- Review the component counts: posts, total beam length, rafters, and slats
- Use the total lumber figure to estimate cost by multiplying by your local lumber price per linear foot
- Add 10-15% to your order for cutting waste and defective boards
Formula
Posts = 4 (standard rectangular pergola) Total Beam Length = 2 x Pergola Length (one beam per side) Number of Rafters = ceil(Pergola Length / (Rafter Spacing / 12)) + 1 Number of Shade Slats = ceil(Pergola Length / (Slat Spacing / 12)) + 1 Each rafter spans the width; each slat spans the width. Total Lumber (linear ft) = (Posts x Post Height) + Total Beam Length + (Rafters x Width) + (Slats x Width)
Example Calculation
A 12 ft x 10 ft pergola, 8 ft post height, 24 in rafter spacing, 4 in slat spacing: Posts = 4 Total Beam Length = 2 x 12 = 24 ft Rafters = ceil(12 / 2) + 1 = 6 + 1 = 7 rafters Slats = ceil(12 / 0.333) + 1 = 36 + 1 = 37 slats Post Lumber = 4 x 8 = 32 ft Beam Lumber = 24 ft Rafter Lumber = 7 x 10 = 70 ft Slat Lumber = 37 x 10 = 370 ft Total Lumber = 32 + 24 + 70 + 370 = 496 linear ft
Frequently Asked Questions
What size lumber should I use for pergola posts?
6x6 posts are the standard for freestanding pergolas up to 12 feet in any direction. For larger pergolas or those supporting heavy vines, 8x8 posts provide additional strength. Posts should be pressure-treated lumber, cedar, or redwood for rot resistance. If using steel post bases above grade, the post does not need ground-contact treatment.
How far apart should pergola rafters be?
Rafter spacing of 16 to 24 inches on center is standard for most residential pergolas. Closer spacing (16 inches) provides more shade and a more substantial appearance. Wider spacing (24 inches) creates a lighter, more open feel. For rafters spanning more than 10 feet, use 2x8 or larger lumber and keep spacing at 16 inches to prevent sagging.
Do pergola posts need concrete footings?
Yes. Each post should sit on a concrete footing that extends below the frost line in your area (typically 24-48 inches deep). Footings are usually 12-18 inches in diameter. Use a post-hole calculator to determine the concrete needed for each footing. In frost-free areas, a 12-inch deep gravel pad with a post anchor bolted to a concrete pier is sufficient.
How much shade does a pergola provide?
Shade coverage depends on slat spacing and orientation. At 4-inch slat spacing with 2-inch wide slats, coverage is roughly 33 percent. Closer spacing increases shade. The pergola's orientation also matters: east-west beams with north-south rafters provide more midday shade. For maximum shade, add a retractable canopy or grow climbing plants like wisteria or grape vines.
Should I add extra lumber to my order?
Yes, add 10-15 percent to the total lumber figure. This covers cutting waste (end cuts, angle cuts), boards with defects like large knots or warping that cannot be used, and the occasional measuring mistake. For cedar and redwood, which have higher defect rates than pressure-treated pine, add a full 15 percent.
Does this calculator account for overhang?
The calculator uses your entered dimensions for the overall pergola footprint. Most pergolas have rafters and beams that extend 12-18 inches beyond the posts for aesthetic overhang. If you want 12-inch overhangs, add 2 feet to both your length (for rafter overhang) and width (for beam overhang) before entering the dimensions.