200+ free tools. No sign-up. No hidden fees.Explore the toolkit ↗
Find a tool ↗

Home›Pergola Calculator

Pergola Calculator

Work out the posts, beams, rafters and purlins for a pergola — and how much lumber to buy — before you cut a single board. A pergola is three stacked layers: two main beams span between the posts along the length, rafters run across the width, and light purlins cross the rafters. Count each layer separately and the shopping list writes itself.

Calculate your pergola

Units:

Keep post spacing inside the beam span limits: 8–10 ft at most, 6–8 ft recommended, and 25–35% less if you plan a solid roof. Posts are 6×6 for a freestanding pergola — a 4×4 looks undersized under a heavy beam. Post length includes 3 ft of burial.

Your results

–
posts
–
rafters
–
purlins
–
total lumber (lin ft)

How the pergola formula works

A pergola is a counting exercise in three stacked layers. Two main beams span between posts along the length, rafters run perpendicular across the width, and light purlins cross the rafters.

Posts per side: ceil(length ÷ max post spacing) + 1

Beams: 2 × (length + 2 × overhang)

Rafters: ceil(length × 12 ÷ rafter spacing) + 1, each width + 2 × overhang long

Purlins: ceil(width × 12 ÷ slat spacing) + 1, each length + 2 × overhang long

Post length: height + 3 ft burial

Concrete: posts × bags per post — about 2 bags of 80 lb mix per post

This is the CalcNest / NovaCalculator method, and it reproduces their published examples exactly: a 12 × 10 ft pergola, 9 ft tall, with 16 in rafter spacing and 12 in cross-beam spacing needs 4 posts (6×6, 12 ft long), 2 beams of 14 ft, 10 rafters of 12 ft, 11 purlins and 8 bags of concrete (NovaCalculator); a 16 × 12 ft pergola with 8 ft post spacing and 16 in rafter spacing needs 6 posts, 13 rafters, 32 ft of beams and 12 bags of concrete (CalcNest). CalcNest’s 236 lin ft total leaves the purlins out — this calculator counts them, because a real pergola has them.

Worked example

A 16 × 12 ft pergola, 8 ft posts, max post spacing 8 ft, rafters every 16 in, purlins every 12 in, 1 ft overhang, 2 bags of concrete per post:

Posts: ceil(16 ÷ 8) + 1 = 3 per side → 6 posts, 11 ft long (8 ft + 3 ft burial) = 66 lin ft

Beams: 2 × (16 + 2) = 36 lin ft

Rafters: ceil(192 ÷ 16) + 1 = 13 rafters × 14 ft = 182 lin ft

Purlins: ceil(144 ÷ 12) + 1 = 13 purlins × 18 ft = 234 lin ft

Total lumber: 66 + 36 + 182 + 234 = 518 lin ft · Concrete: 6 × 2 = 12 bags

Cost: 518 × $2.50 + 12 × $6.50 + $60 fixings = $1,295 + $78 + $60 = $1,433 materials

For the NovaCalculator example — a 12 × 10 ft pergola, 9 ft tall, max spacing 12 ft, 16 in rafters, 12 in purlins, 1 ft overhang: 4 posts, 2 beams of 14 ft (28 lin ft), 10 rafters of 12 ft (120 lin ft), 11 purlins of 14 ft (154 lin ft), posts 12 ft long (48 lin ft) — 350 lin ft in total, 8 bags of concrete, $987 materials. And with no overhang on the 16 × 12 ft pergola: 6 posts, 13 rafters of 12 ft (156 lin ft), 32 ft of beams and 12 bags — the CalcNest sub-counts exactly.

How much does a pergola cost? (US, 2026)

Prices are 2026 US ranges from Home Depot / Lowe’s listings. The calculator’s total is materials only — a pro build adds labour, and a kit is a different price again. Check local prices before ordering.

ItemTypical price
Pressure-treated lumber$1.50–$3.50 per lin ft
Cedar lumber$3–$7 per lin ft
6×6 post, 12 ft$30–$50 each
80 lb concrete mix$6–$8 per bag
Post bases, brackets & bolts$40–$120 per pergola
Wood pergola kit, 12×12 ft$1,500–$4,000
Pro-built wood pergola$3,000–$10,000+

Waste allowance

There is no waste percentage on a pergola — every member is counted exactly, and the overhang is already in the lengths. Add about 10% to the lumber order for cuts, knots and the odd board you will want to cut around, and one spare post if the yard has a slope. Pressure-treated lumber costs about half what cedar runs; cedar is lighter, dimensionally stable and takes a beautiful stain.

Frequently asked questions

How many posts do I need for a pergola?

Two per side for each span, plus one extra per side: posts per side = ceiling(length ÷ max post spacing) + 1. A 16 ft pergola with 8 ft post spacing needs 6 posts; a 12 ft pergola with 12 ft spacing needs 4.

How far apart should pergola posts be?

8–10 ft at most, 6–8 ft recommended. Doubled 2×8 beams span about 10–14 ft without sagging, and a double 2×12 reaches 20 ft. If you plan a solid roof, reduce the spacing by 25–35%.

How many rafters do I need for a pergola?

Ceiling(length in inches ÷ rafter spacing) + 1. A 16 ft pergola with rafters every 16 in needs 13 rafters; a 12 ft pergola needs 10. Each rafter is as long as the pergola is wide, plus the overhang on both ends.

How much lumber does a pergola take?

A 16 × 12 ft pergola with 1 ft overhang takes about 518 linear feet — 66 ft of posts, 36 ft of beams, 182 ft of rafters and 234 ft of purlins. A 12 × 10 ft pergola takes about 350 linear feet.

How much does it cost to build a pergola?

About $1,433 in materials for a 16 × 12 ft pressure-treated pergola at 2026 prices ($2.50 per lin ft of lumber, concrete and fixings). Cedar roughly doubles the lumber cost. A kit runs $1,500–$4,000 and a pro build $3,000–$10,000+.

Related calculators