Materials & Quantities

Pergola/Trellis Rafter Spacing Calculator

Calculate the number of rafters needed to span a pergola or trellis structure at a given on-center spacing.

  • Answers as you type
  • Every formula cited
  • Calculated in your browser
SettingsSettings for this calculationUS
Market
Imperial · sales tax
The overall width of the pergola or trellis in the direction the rafters span across.

Measure the span direction that the rafters run perpendicular to — i.e. the distance the rafters need to be spread across, not their individual length.

The maximum on-center spacing allowed between rafters per the design or span table.

Maximum rafter spacing depends on the rafter material, size, and any planned cover or planting load — confirm this figure against the specific rafter species/size's span table or a designer's calculation.

Rafters needed

8 rafters

High confidence

Maximum rafter spacing depends on the rafter material, size, and any planned cover/planting load — confirm the spacing against the specific rafter species/size's span table or a designer's calculation for your load case.

Bays across the pergola
7
Rafter centres, as laid out
1.86 ft
Then change the inputs to see how far the answer moves.

Show calculation logic

How this was calculated

Formula source(s)

  • Rafter count = ceil(Pergola Width ÷ Maximum Rafter Spacing) + 1 — the standard support-count method (identical in principle to this site's joist/stud spacing calculators) applied to pergola or trellis rafter layout.

Inputs used

Pergola/Trellis Width (Span Direction)
13 ft
Maximum Rafter Spacing (On-Center, per Design)
2 ft

Intermediate steps

Bays across the pergola
7
Rafter centres, as laid out
1.86 ft
Final result8 rafters

Confidence note: Maximum rafter spacing depends on the rafter material, size, and any planned cover/planting load — confirm the spacing against the specific rafter species/size's span table or a designer's calculation for your load case.

What this calculation does not cover

  • Only the two lengths you type enter the arithmetic — the width is divided by the maximum spacing and one rafter is added — so rafter thickness never appears and the count sets out centre lines rather than faces; if the two outer rafters must finish flush inside the beam ends instead of being centred on them, take one rafter thickness off the width before entering it.
  • The answer is the count on its own, and the tighter on-centre spacing that the rounding-up produces is not reported back, so mark the beams out by dividing your width by one less than the rafter count instead of stepping the maximum spacing along from one end and squeezing whatever is left into the last bay.
  • One width and one spacing describe a single straight run divided evenly end to end, so a doubled rafter at each end, a widened bay over a gate or path, and an L-shaped or multi-bay frame all have to be run through separately with the shared rafter at each junction counted once.
  • Nothing but the rafters is totalled here: the beams they sit on, the posts, the hangers and screws, and any lattice, battens or purlins laid across them on a trellis top are outside the figure.
  • Rafter length is never asked for and no waste percentage is applied, so the number is how many sticks stand in the finished frame rather than a timber order — multiply it by your own cut length and add your own allowance for off-cuts and warped or split lengths.

Estimated cost — your price

This site holds no price list for this material — local prices vary too much to publish honestly. Enter your supplier's price and the result is costed with it.

3 ft1 m13 ft3.96 m1.86 ft0.566 m

Computed in your browser — nothing you enter is uploaded. Presented in US customary units and US trade terminology. Where a formula follows a published standard, that standard and its edition are cited beside it on this page; where none governs, the page says so. Local amendments override model codes — verify against the code in force where you build.

Sources checked 2026-09-05 · in the site-wide review of 2026-09-06 · v1.0.1

Regulatory standards & verification citations1
  1. Rafter count = ceil(Pergola Width ÷ Maximum Rafter Spacing) + 1 — the standard support-count method (identical in principle to this site's joist/stud spacing calculators) applied to pergola or trellis rafter layout.
Cite this page

Your workspace

Most jobs need more than one number. Add the calculators you need next and they open right here, underneath this one — your figures stay on screen and nothing is lost to a page change.

Now that you have the number

These guides cover the work this quantity is for — the first ones run this calculator inside the section that raises the question.

  • Building a Pergolauses this calculator

    A pergola is read from underneath, so the rafter and purlin grids get settled against the yard's stock lengths before the first tail is cut.

  • A west elevation has no winter to trade against: December sun meets a horizontal screen at a steeper angle than July sun does, and blade spacing follows from that.

How to calculate Pergola/Trellis rafter spacing in 3 steps

  1. Pergola/Trellis Width (Span Direction)The overall width of the pergola or trellis in the direction the rafters span across.
  2. Maximum Rafter Spacing (On-Center, per Design)The maximum on-center spacing allowed between rafters per the design or span table.
  3. Rafters neededThe tool computes the rafters needed from those figures and shows the formula, its sources, and a confidence rating alongside it.

Rafters needed by pergola/trellis width (Span Direction)

Page defaults, not your figures above.

Pergola/Trellis Width (Span Direction)Rafters needed (rafters)
10 ft7
15 ft9
20 ft12
25 ft14

Frequently asked questions

Why does the calculator add 1 to the divided width?
A rafter is needed at both ends of the span as well as at every interior spacing interval, so the count is the number of spacing intervals (rounded up) plus one for the starting rafter.
Why round up the number of spacing intervals?
Rounding up (ceiling) ensures the actual on-center spacing never exceeds the maximum allowed — if the width doesn't divide evenly, the extra rafter tightens the spacing slightly rather than leaving a gap that's too wide.
What determines the maximum allowable rafter spacing?
The rafter material and size and any planned cover or planting load, read off the span table for that species and size or a designer's calculation for your load case. Always confirm the spacing against those rather than assuming a default.
Preliminary estimate, not certified engineering. This tool produces an indicative quantity calculation for planning purposes only — it is not a certified structural analysis, a guaranteed material takeoff, or a substitute for building department approval. Always verify measurements on-site and have a licensed contractor or structural engineer review any load-bearing, code-sensitive, or safety-critical work before purchasing materials or starting construction. Spotted an arithmetic or standards error? Report it to contact@craftquantities.com with your inputs — a confirmed fix gets a permanent check of its own, so the same mistake cannot come back.