Pergola Post & Beam Calculator
Posts, beams, rafters and purlins for a rectangular pergola from its size, spacings and overhang, with lengths, embedment and stock-length pieces to order.
Post count and actual spacing, beam and rafter lengths with overhang, purlin count, a linear take-off per member and the pieces of your stock length each needs.
Example: A 16 × 12 ft pergola with posts every 8 ft, rafters and purlins 2 ft o.c. and 1 ft overhangs: 6 posts, two 18 ft beams (spliced over a post with 16 ft stock), 9 rafters of 14 ft, 7 purlins.
Posts, beams, rafters —
counted, not sized.
How members are counted and measured, stock pieces, and what stays with you.
Counting
Posts per side = ⌈length ÷ post spacing⌉ + 1, so the end posts land on the corners and the actual spacing is length ÷ (posts − 1); posts in total = 2 × per side. Rafters = ⌈length ÷ rafter spacing⌉ + 1 across the width; purlins = ⌈width ÷ purlin spacing⌉ + 1 along the length. Beam and purlin lengths are length + 2 × overhang; rafters are width + 2 × overhang; posts are height + embedment.
Stock pieces
Pieces of your stock length = ⌈member length ÷ stock⌉ × count, so a beam longer than the stock is counted as two pieces and flagged: splice it over a post.
Not decided
Member sizes for the span and spacing, footing size, uplift, connections and any permit are design questions the page does not answer. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.
SOURCES
- Counting arithmetic: members at the spacing you enter, lengths with overhang, stock pieces rounded up (no member sizes or spans)
Last reviewed 20 September 2026. How results are checked: How we verify.