Pergola calculator
Put your pergola length, width, rafter spacing and overhang in: a 12 ft by 10 ft pergola at 16 in spacing needs 10 rafters, 12 ft rafters, 4 posts.
★ CONSTRUCTION · OUTDOOR · PERGOLAS
On the defaults — a 12 ft by 10 ft pergola, 16 in spacing, 12 in overhang — you need 10 rafters. This is the pergola tool: measure the pergola once, allow for the spacing, and order the rafters once — a half-framed pergola waits for no second delivery.
Put your pergola length, width, rafter spacing and overhang in: a 12 ft by 10 ft pergola at 16 in spacing needs 10 rafters, 12 ft rafters, 4 posts.
It means ten rafters frame a 12 ft by 10 ft pergola at 16 inch spacing. The rafters sit along the 12 ft length, and 12 feet is 144 inches; 144 divided by 16 is 9 spaces, and 9 spaces need 10 rafters, since a row of spaces always needs one more rafter than the spaces between them. Each rafter is 12 feet long, since the 10 ft width plus 12 inches of overhang at each end is 12 feet, and the pergola stands on 4 posts, one at each corner, since a pergola up to 16 feet long needs no middle posts. The total rafter stock is 120 feet, or ten 12 ft rafters, and the beams, posts and shade slats are counted separately.
| Output | Formula | What it means |
|---|---|---|
| Rafter count | ⌊(length × 12) ÷ spacing⌋ + 1 | 10 rafters — ⌊144 ÷ 16⌋ + 1. |
| Rafter length | width + 2 × (overhang ÷ 12) | 12 ft — 10 + 2 × 1. |
| Posts | 4 up to 16 ft long, else 6 | 4 posts — 12 ft is under 16 ft. |
First, check the spacing you are actually building: 16 in is the common pergola spacing, but 12 in spacing on the same pergola needs 13 rafters, and 24 in spacing needs only 7, so the spacing moves the count more than the length does. Second, remember the count follows the length, not the width: a wider pergola needs longer rafters, not more of them, and a pergola measured by the width under-counts the rafters. Third, judge the posts honestly: 4 posts fit a pergola up to 16 ft long, but a 20 ft pergola needs 6 posts, since a beam that long sags without a middle pair. Beams, shade slats and footings are bought separately — see the rafter calculator for the roof rafters on a roofed structure.
12 ft long, 10 ft wide, 16 in spacing, 12 in overhang. Rafter count: (12 × 12) ÷ 16 = 9 spaces, plus 1 end rafter = 10 rafters. Rafter length: 10 + 2 × (12 ÷ 12) = 12 ft. Posts: 4, since 12 ft is under 16 ft. Total rafter stock: 10 × 12 = 120 ft. In practice that means buying ten 12 ft rafters and four posts, and expecting the beams to run the full 12 ft length on top of the posts. If the same pergola used 24 in spacing instead, the need would fall to 7 rafters, but the pergola framed would be the same size.
With a 16 ft long pergola instead of 12 ft, the spaces rise to 12 and the need to 13 rafters, but the posts stay 4, since 16 ft is still under the middle-post line. With a 12 ft wide pergola, the rafter length rises to 14 ft but the need stays 10 rafters, since width never adds a rafter. With 24 in spacing, the spaces fall to 6 and the need to 7 rafters. With a 20 ft long pergola, the spaces rise to 15, the need to 16 rafters, and the posts to 6, since a beam that long needs a middle pair. Length, width, spacing and overhang each move the frame on their own, so a wrong spacing is as costly as a wrong measurement.
The length behind 10 rafters is 12 ft: at 10 ft the need is 8 rafters (10 ft long, 10 ft wide, 16 in spacing, 12 ft rafters, 4 posts); at 16 ft it is 13 rafters (16 ft long, 10 ft wide, 16 in spacing, 12 ft rafters, 4 posts). The spacing behind 10 rafters is 16 in: at 12 in the need is 13 rafters (12 ft long, 10 ft wide, 12 in spacing, 12 ft rafters, 4 posts); at 24 in it is 7 rafters (12 ft long, 10 ft wide, 24 in spacing, 12 ft rafters, 4 posts). The width behind 10 rafters is 10 ft: at 8 ft the need is 10 rafters (12 ft long, 8 ft wide, 16 in spacing, 10 ft rafters, 4 posts); at 12 ft it is 10 rafters (12 ft long, 12 ft wide, 16 in spacing, 14 ft rafters, 4 posts). Each reverse moves one input and holds the rest, so the step is exactly one dimension or one spacing change.
The defaults assume a 12 ft by 10 ft rectangular pergola, 16 in rafter spacing, and 12 in of overhang at each end. They do not assume beams, shade slats, footings or fasteners — a pergola that needs a roof counts its roofing separately, and the footings are bought by the post, not by the rafter.
The arithmetic is exact for the inputs entered; the judgement is the spacing and the posts. Real pergolas have beams that run long and posts that sit on footings, and the timber on the shelf overrides any planning figure; a pergola measured gross over-orders, and a spacing read off a different design under-orders. Treat 10 rafters as the planning order for a 12 ft by 10 ft pergola at 16 in spacing, and add a middle pair of posts past 16 ft of length.
Bright Side Kit, “Pergola Calculator: 10 Rafters for a 12x10 ft Pergola”, https://brightoolbox.com/pergola-calculator/, accessed 3 November 2026. Students and researchers: cite the calculator name, the page URL and the date you used it, and quote the defaults (12 ft × 10 ft pergola, 16 in spacing, 12 in overhang) so the 10-rafter result can be checked.
10 rafters at 16 in spacing. The length is 144 in; 144 ÷ 16 = 9 spaces, and 9 spaces need 10 rafters, since a row always needs one more rafter than its spaces.
Divide the length in inches by the spacing, round down, and add one end rafter. A 12 ft pergola at 16 in spacing is ⌊144 ÷ 16⌋ + 1 = 10 rafters.
The width plus twice the overhang. A 10 ft wide pergola with 12 in overhang each end needs 10 + 2 × 1 = 12 ft rafters.
4 posts up to 16 ft long, 6 posts past 16 ft, since a beam that long sags without a middle pair. A 12 ft pergola needs 4 posts.
No — this calculator counts rafters and posts only. Beams, shade slats and footings are counted separately, by the pergola.
Split it into rectangles, work out each section, and add them before ordering. The square footage calculator handles the area step section by section.