CalcGallery

Pergola Calculator

Count the posts, beams, rafters and purlins a pergola needs from its footprint, spacing and overhang, with each cut length.

Built by AbhiLast reviewed November 6, 2026

Units
Length, post centre to post centre

Your measurements

The side the beams run along.

From your plan or local rules. A long pergola needs more posts.

Leave at 0 for no purlins on top of the rafters.

Result

Buy 4 postsEstimate

Two rows, one post at each end of every bay

Nothing is added. Cut lengths are as drawn, so allow for trimming when you pick stock lengths.

Beams
2
Beam length
14 ft (168 in, 4.27 m)
Rafters
7Estimate
Rafter length
12 ft (144 in, 3.66 m)
Beams, rafters and purlins, total length
112 ft (1,344 in, 34.14 m)
Report a problem with this calculator
Your entries are kept on this device only.

Results are estimates for planning only. Actual needs vary with site conditions, products and workmanship. Always confirm quantities with your supplier and follow local building codes and manufacturer instructions. Read the full disclaimer

How to use the Pergola Calculator

  1. Enter the footprint from post centre to post centre.
  2. Set the largest post spacing, rafter spacing and overhang from your plan.
  3. Add a purlin spacing if smaller members run across the top.
  4. Use the counts and cut lengths as your lumber list.

How the count works

Members at a set spacing always number one more than the gaps between them:

Posts   = 2 × (ceil(length ÷ post spacing) + 1)Rafters = ceil(length ÷ rafter spacing) + 1Purlins = ceil(width ÷ purlin spacing) + 1Beams   = 2, each length + 2 × overhang

Rafter length adds the overhang at both ends of the width. Purlins are cut to the beam length, so they sit on top across the full run.

Turning this into a lumber order

Round each cut length up to a stock length you can buy, and keep offcuts in mind: a 14 ft beam may need 16 ft stock. If you double the beams, one on each side of the post, enter the counts twice on your order.

Scope

Counts and lengths only. Post bases, footings, frost depth, bracing and wind uplift all depend on your site and code, and none of them are worked out here.

With your numbers

  1. Beams = 2 at 14 ft, the length plus an overhang at each end
  2. Rafters = 12 ft ÷ spacing, rounded up, plus 1 = 7
  3. Posts = 2 rows × (bays + 1) = 4 posts

Quick reference

Nothing is added. Cut lengths are as drawn, so allow for trimming when you pick stock lengths.

Common jobs, worked out with the options this calculator starts on for United States.
JobPosts
12 × 10 ft, rafters at 24 in4
10 × 10 ft, rafters at 16 in4
16 × 12 ft with purlins6
20 × 12 ft, 6 posts6
8 × 8 ft4
3.6 × 3 m4
6 × 3.6 m, 6 posts6

Common questions about the Pergola Calculator

How many posts does a 12 by 10 pergola need?
Four if your plan allows a 12 ft span between posts. Set a smaller post spacing and the page adds a post to each row for every extra bay.
What size beams and posts should I use?
This page does not size anything. Spans, footings and connections depend on the lumber, load and local code, so take those from an approved plan or your building department.
How many rafters at 24 inch spacing?
Divide the length by the spacing, round up, and add one. A 12 ft pergola at 24 in takes 7 rafters.
Does a pergola need a permit?
Often it depends on size, height and where it stands. Local rules vary, so ask your building department before you dig.

Report a problem with this calculator