Roof Truss Calculator: How to Size Rafters and Spans for Your Build

Use this roof truss calculator to estimate the number of trusses needed, along with the rafter length and ridge height. Enter the roof span, length, pitch, spacing, and overhang to get a quick estimate.
Table of Contents
How do I size rafters and space roof trusses?
Rafter and truss geometry comes from three numbers: span (wall to wall), pitch (rise per 12″ of run), and overhang. For a 28 ft span at a 6/12 pitch, the ridge sits about 7 ft above the wall plates, and each rafter runs roughly 15.6 ft including a 1 ft overhang. Truss count follows a separate formula — building length ÷ on-center spacing, plus one. Lumber size for stick-built rafters is a different question entirely: it depends on species, grade, spacing, and your local snow load, and should always be checked against your adopted IRC/IBC span table or a licensed engineer before you cut anything. Enter your numbers below for both.
Planning estimates only. Final rafter/truss sizing must follow your local building code’s adopted span tables or be specified by a licensed engineer or truss manufacturer.
Roof geometry
Truss count
Rafter length (with overhang)
15.7 ft
28 ft span, 6/12 pitch, 1 ft overhang
- Run (half-span)14.0 ft
- Rise (theoretical height)7.0 ft
- Ridge height above wall plate7.0 ft
- Common trusses needed21
- Total trusses (incl. gable ends)23
Your rafter
Maximum allowable span
13′-11″
✓ This size works for a 13 ft span
- Rafter size2×8
- Species / gradeSPF #2
- Spacing16″ o.c.
- Design load30 psf snow + 10 psf dead

In this guide
- Why "close enough" doesn't work for framing
- Rafter vs. truss — and why it matters here
- Working out span, rise, and rafter length
- A worked example
- How many trusses does a roof need?
- Roof load, and why span tables exist
- Rafter span calculator: reading the table
- Choosing truss or rafter spacing
- Mistakes that undersize a roof
Why "close enough" doesn't work for framing
With most parts of a build, a rough estimate gets you close enough to order materials and adjust later. Framing isn't that forgiving. Order a rafter that's a size too small, or space your trusses too far apart for the load they'll actually carry, and you don't find out until the roof is sagging, bouncing underfoot, or failing an inspection — none of which are cheap to fix after the fact. On the other hand, over-engineering every rafter to the largest lumber you can find wastes money on a house that will never see it.
A roof truss calculator exists to sit between those two mistakes. This one handles both halves of the problem: the geometry (how long is the rafter, how tall is the ridge, how many trusses does the roof need) and the structural side (does this lumber size actually span the distance you need it to, given your spacing and snow load). Most calculators online only do one or the other — this one does both, and treats species, grade, spacing, and load as separate inputs instead of burying them in a single "roof size" field.
Rafter vs. truss — and why it matters here
A rafter is a single sloped beam running from the ridge to the wall plate, cut and installed on site — "stick framing." A truss is a pre-engineered triangular assembly of top chord, bottom chord, and internal webs, built in a factory to span the full width of the building without a center support wall. Trusses have mostly replaced site-built rafters on new residential construction because they go up faster, span farther without interior bearing walls, and come with an engineer's stamp already attached.
That last point matters for this guide: engineered trusses are custom-designed per project by the truss manufacturer, and their internal member sizes aren't something a general calculator can responsibly reproduce. What this tool can do reliably is the geometry both systems share (rafter length, ridge height, on-center spacing and count) and a simplified span/size reference for stick-built common rafters, which are still very much used for additions, porches, sheds, and cathedral ceilings.
Working out span, rise, and rafter length
Rafter geometry is just a right triangle. The building's span (wall to wall) splits into two equal runs meeting at the ridge; pitch tells you how much the rafter rises for every 12 inches of that run.
Fig. 1 — Run, rise, and rafter length form a right triangle; pitch sets the ratio between run and rise
The formulas
- Run = span ÷ 2
- Rise = run × (pitch ÷ 12)
- Pitch multiplier = √(1 + (pitch ÷ 12)²)
- Rafter length = (run × pitch multiplier) + (overhang × pitch multiplier)
- Ridge height above wall plate = rise (plus any raised heel, if used)
A worked example
Say you're framing a 28 ft span at a 6/12 pitch, with a 1 ft overhang on each side.
Step by step
- Run: 28 ÷ 2 = 14 ft.
- Pitch multiplier at 6/12: √(1 + 0.5²) ≈ 1.118.
- Rise: 14 × 0.5 ≈ 7 ft — that's your ridge height above the wall plate.
- Core rafter length: 14 × 1.118 ≈ 15.65 ft.
- Overhang add-on: 1 × 1.118 ≈ 1.12 ft.
- Total rafter length: 15.65 + 1.12 ≈ 16.8 ft — round up to the next standard lumber length (18 ft stock, in this case).
Steeper pitches push that rafter length up quickly — an 8/12 pitch on the same 28 ft span adds almost a full foot of rafter length over 6/12, even though the span hasn't changed at all.
How many trusses does a roof need?
Truss count is a separate calculation from rafter geometry, and it's simpler: divide the building's length by your on-center spacing, round up, and add one for the extra truss at the far end.
Truss count formula
- Common trusses = ceil(building length ÷ spacing in feet) + 1
- Add 2 more for standard gable-end trusses (a typical gable roof)
- Add extras separately for hips, valleys, or girder trusses at openings — these aren't part of the standard spacing run
For a 40 ft long building at 24" o.c.: ceil(40 ÷ 2) + 1 = 21 common trusses, plus 2 gable ends = 23 total. Switch to 16" o.c. and that jumps to ceil(40 ÷ 1.333) + 1 = 31 common trusses — roughly 50% more material for a spacing change alone, which is exactly why spacing decisions belong in the budget conversation early, not after the truss package is already ordered.
Roof load, and why span tables exist
A rafter (or truss chord) isn't just holding up its own weight — it's carrying dead load (the permanent weight of roofing, sheathing, and insulation, typically 10–15 psf) plus live load, which for a roof is mostly snow, expressed as a ground snow load in pounds per square foot that your local code specifies. A roof load calculator, in practice, is really answering one question: given this species, grade, spacing, and load, what lumber size do I need to safely cover this span without excessive bending or deflection?
Rafter span calculator: reading the table
Here's a simplified reference for common 2× rafter sizes, Spruce-Pine-Fir #2, at 16" on-center — the residential standard spacing.
| Size | No snow (20 psf) | Moderate snow (30 psf) | Heavy snow (50 psf) |
|---|---|---|---|
| 2×6 | 10'-6" | 9'-8" | 8'-3" |
| 2×8 | 13'-11" | 12'-10" | 11'-0" |
| 2×10 | 17'-9" | 16'-4" | 14'-0" |
| 2×12 | 21'-7" | 19'-11" | 17'-0" |
Rounded planning figures only — the calculator above lets you switch species, spacing, and load to check your exact combination against your required span.
Check your exact span and size
Run your numbers in the calculator above →Choosing truss or rafter spacing
16" on-center is the residential default for a reason: it lines up cleanly with 4×8 sheathing sheets and standard drywall fastening schedules, and it comfortably handles most moderate snow loads without pushing lumber size up. 24" on-center cuts material count by roughly a third and is common on engineered trussed roofs with lighter loads, but it typically requires thicker sheathing (⅝" minimum) and isn't code-permitted for every heavy-snow combination. 12" on-center shows up when 16" simply can't hit the required span — heavy snow load, a vaulted ceiling with a structural ridge, or a size constraint on the lumber being used.
Mistakes that undersize a roof
- ✕Using rafter length as the span. Span tables measure horizontal projection, not the sloped rafter length — using the wrong one gives an artificially generous number.
- ✕Applying a generic "20 psf" table in a snow region. Skipping the local ground snow load figure is the single most common way a roof ends up undersized on paper.
- ✕Mixing up species defaults. A span that works for Douglas Fir-Larch can fall short with Spruce-Pine-Fir at the same size and spacing — always match the table to the lumber you're actually buying.
- ✕Cutting or notching a truss member. Unlike a rafter, a truss is an engineered system — removing or altering any web or chord without the truss manufacturer's approval can compromise the whole assembly.
- ✕Skipping the local code check. Span tables vary by adopted code edition and jurisdiction amendment — a figure that's correct in one county can be non-compliant in the next.
Why trust this guide
Geometry formulas follow standard right-triangle roof framing math used industry-wide. Span reference figures are simplified, rounded approximations of published IRC/AWC-style span tables for #2-grade dimensional lumber and are intended for early planning only — they are not a substitute for your jurisdiction's adopted building code table or a stamped design from a licensed engineer or truss manufacturer, both of which account for your exact local snow load, wind exposure, and code edition.
Working through a tricky span or an odd roof shape this calculator doesn't quite cover? Drop your numbers in the comments — happy to help you think it through.
Frequently Asked Questions
Related Article: Roof Pitch Calculator: Complete Guide
Related Article: Roof Shingle Calculator
Related Article: Metal Roof Cost Calculator

