Roof Truss Calculator
Enter the building length, spacing, span and pitch and get how many trusses you need, the closing space, top chord length and rise.
Counts a truss at each gable end. The result updates as you type.
Trusses needed
21 trusses at 24 in on centre
14' 6-7/16" top chord each side · 6' 0" rise
| Spaces | 20 at 24 in |
| Bottom chord (span) | 24 ft |
| Top chord line length per side, incl. overhang | 14' 6-7/16" (14.53 ft) |
| Rise at the ridge | 6' 0" (72 in) |
| Roof angle | 26.57° |
What this page cannot tell you
Member sizes, webs, heel height, connector plates or whether a truss can carry your loads. Trusses are engineered products: the IRC requires truss design drawings approved before installation and forbids cutting or altering truss members without approval. Use this for counting and budgeting, and get the design from the truss manufacturer.
How to work out how many roof trusses you need
- Measure the building length. The wall length the trusses are spaced along, from gable end to gable end.
- Enter the spacing. On-centre spacing in inches; 24 in is common for trusses.
- Enter span and pitch. Used for the outline: top chord length and rise.
- Read the count. Includes a truss at each end and a shorter closing space if the length doesn't divide evenly.
10 situations where a roof truss calculator helps
Requesting a truss quote
Know the count, span and pitch before calling a truss supplier.
Pole barn or garage
Count trusses for a long building at 24 in or wider spacing.
Shed kits
Check a kit's truss count against your own length.
Budgeting
Multiply the count by a quoted price per truss.
Comparing spacings
See how many fewer trusses 24 in spacing needs than 16 in.
Delivery planning
The count and top chord length help plan how the load is handled on site.
Checking a closing space
When the length isn't a multiple of the spacing, see the size of the last bay.
Overhang decisions
See how the overhang lengthens each top chord.
Rise for headroom
The rise at the ridge shows how much attic height a pitch gives.
Comparing with stick framing
Use alongside the rafter length calculator for a stick-framed alternative.
What this calculates — and what only a truss designer can
The count is arithmetic: one truss at each end, one at every spacing along the length, and one extra when a shorter closing space is left so no space is wider than the spacing you entered. The outline uses the same right-triangle geometry as a common rafter: run = span ÷ 2, rise = run × pitch ÷ 12, and the top chord's line length per side = (run + overhang) × √(144 + pitch²) ÷ 12.
Trusses are engineered products. The 2021 International Residential Code requires truss design drawings to be provided to the building official and approved before installation (R802.10.1), requires wood trusses to be designed in accordance with accepted engineering practice, with metal-plate-connected trusses complying with ANSI/TPI 1 (R802.10.2), and prohibits cutting, notching, drilling, splicing or otherwise altering truss members without approval (R802.10.4).
So this page is for counting, budgeting and talking to a supplier. It does not size chords or webs, choose a truss type, set heel heights, check loads or produce anything a building official will accept.
Everything runs in your browser; nothing is sent or stored.
Sources
- 2021 International Residential Code — Chapter 8, Roof-Ceiling Construction (R802.10) — Truss design drawings, design, and alterations
Frequently asked questions
How many trusses do I need for a 40 ft building?
At 24 in on centre, 40 ft is 20 spaces, so 21 trusses including both ends.
How do I calculate truss count?
Divide the length in inches by the spacing, round down, add one, and add one more if there's a leftover shorter space.
Are gable end trusses included?
Yes, the count includes a truss at each end. Gable-end trusses are often a different design; tell your supplier.
What spacing are roof trusses?
24 in on centre is common, but the spacing is set by the truss design for your loads.
Can I design my own trusses with this?
No. The IRC requires engineered truss design drawings approved before installation.
What is the top chord length?
The sloped member from the heel to the peak, here including the overhang, measured along its line before cuts.
Related tools
Roof Pitch Calculator
Enter the rise and run and get the pitch as x-in-12, the angle, the slope percentage and the rafter length — plus which roof coverings the IRC allows at that slope.
Geometry, and the 2021 International Residential Code, Chapter 9
Hip Roof Calculator
Enter the building's length, width, pitch and overhang and get the hip roof's area in squares, the ridge length and the common and hip rafter lengths.
Roof geometry by pitch per 12 in of run; hip rafter method from Griffith, Carpentry §23
Gutter Coil Calculator
Turn a gutter coil's weight into feet, or feet of gutter into pounds of coil, for 11-3/4, 11-7/8 and 15 inch aluminum, copper and Galvalume coil, from a supplier's published yield chart.
Gutter Supply "Coil Yields" spec sheet (lb per ft and ft per lb)
Rafter Length Calculator
Enter the span, pitch, overhang and ridge board and get the common rafter length in feet and inches, the rise, the roof angle and the stock length that covers it.
Griffith, Carpentry §17 (common rafter length)
Gambrel Roof Calculator
Enter the span, the break point and the two pitches and get both rafter lengths, the rise at the break and ridge, the roof area in squares and the gable end area.
Right-triangle roof geometry
Rebar Size Chart
Pick a bar size and get its diameter, cross-sectional area and weight per foot in US and metric units, from a state DOT's published reinforcement table.
Illinois DOT Standard 001001-02, Areas of Reinforcement Bars