Roof Truss Calculator
Last updated
This roof truss calculator works out how many trusses a building needs from its length and truss spacing, and the top chord length for your span and pitch.
Count your trusses
Free · no sign-up · results update as you type
Along the ridge: the side the trusses are spaced along.
Building width across the outside of the walls.
Level distance past the wall, for the top chord. 0 for none.
Roof trusses needed
21 trusses
24 in on centre · one at each end
40 ft is an exact multiple of 24 in: 20 equal gaps, one truss at each end.
- Even spacing
- 24 in
- Last gap at your spacing
- 24 in
- Span
- 24 ft
- Pitch
- 6/12 26.6°
- Top chord, per side
- 13 ft 5 in 13.42 ft
Formula used
- Trusses = ceil(40 ft × 12 ÷ 24 in) + 1 = ceil(20) + 1 = 21
- Even spacing = 480 in ÷ (21 − 1) = 24 in
- Last gap at 24 in = 480 − (21 − 2) × 24 = 24 in
- Run = 24 ft ÷ 2 = 12 ft
- Top chord = (12 + 0 ft overhang) × 1.118 = 13.416 ft = 13 ft 5 in
To count roof trusses, divide the building length in inches by the truss spacing, round up, and add one for the truss at the end. A 40 ft building with trusses 24 in on centre needs 21 trusses; at 16 in it needs 31. Your truss drawings set the spacing, so enter yours above.
Roof trusses by building length
Trusses needed for buildings 20 to 60 ft long at 16 in and 24 in on centre, with one truss at each end. For another length or spacing, use the calculator.
| Building length | Trusses at 16 in | Trusses at 24 in |
|---|---|---|
| 20 ft | 16 | 11 |
| 30 ft | 24 | 16 |
| 40 ft | 31 | 21 |
| 50 ft | 39 | 26 |
| 60 ft | 46 | 31 |
What truss spacing means
Truss spacing is the distance from the centre of one truss to the centre of the next, written as “24 in on centre” or “24 in o.c.”. Measuring centre to centre keeps the spacing the same whatever the thickness of the lumber.
The count comes from the gaps: the building length divided by the spacing gives the number of gaps, rounded up so no gap is wider than the spacing. Add one truss, because there is a truss at each end.
How far apart are roof trusses: 16 vs 24 in
Closer spacing means more trusses, each carrying a narrower strip of roof. Wider spacing means fewer trusses, each carrying a wider strip, and the roof sheathing between them has to span farther. A 40 ft building takes 31 trusses at 16 in and 21 at 24 in.
The spacings on the calculator’s buttons each divide a 96 in (8 ft) sheet of sheathing into equal spaces: 12 in into 8, 16 in into 6, 19.2 in into 5, 24 in into 4.
The spacing is set by your truss design and local code; check the truss drawings or your building department.
Trusses vs rafters
Rafters are separate sloping boards, cut and fitted one at a time on site. They meet at the ridge and sit on the walls. A truss is a complete triangle built before it goes on the roof: two top chords that make the slope, a bottom chord across the span, and web members inside that tie them together.
A truss maker designs each truss for the roof it goes on, so the web pattern and lumber sizes come from their drawings. For the same span and pitch, a top chord and a rafter have the same slope length, which is why this calculator works out the top chord with the same maths as the rafter calculator.
How to measure length and span
Everything this calculator needs can be taken from the ground or your house plans. For anything on the roof itself, hire a licensed, insured roofer.
Building length
Measure along the side of the building that runs parallel to the ridge, from one end wall to the other. That is the distance the trusses are spaced along. Plans list it as the building length.
Span
Measure across the building, from the outside face of one long wall to the outside face of the other. That is the distance each truss crosses. Plans list it as the building width.
Pitch and overhang
Plans and elevation drawings usually give both. Without plans, the roof pitch calculator finds the pitch from a photo or a level reading in the attic.
Worked example: a 45 ft building at 24 in
45 ft long, a 28 ft span, trusses 24 in on centre, a 5/12 pitch and a 12 in overhang.
- Length in inches: 45 × 12 = 540 in. Divided by the spacing: 540 ÷ 24 = 22.5, rounded up to 23 gaps.
- Add one for the truss at the end: 24 trusses.
- Spread evenly: 540 ÷ 23 = 23.5 in apart. Or 24 in apart from one end, with a last gap of 540 − 22 × 24 = 12 in.
- Run: 28 ÷ 2 = 14 ft. Overhang: 12 in ÷ 12 = 1 ft.
- Top chord per side: (14 + 1) × 1.083 = 16.25 ft, or 16 ft 3 in.
Truss questions
How far apart are roof trusses?
Roof trusses are a set distance apart on centre, measured from the centre of one truss to the centre of the next. The spacing is set by your truss design and local code; check the truss drawings or your building department. This calculator has buttons for 12, 16, 19.2 and 24 in, and a box for any other spacing.
How many trusses do I need for a 40 ft building?
At 24 in on centre, a 40 ft building needs 21 trusses: 40 × 12 ÷ 24 = 20 gaps, plus one. At 16 in it needs 31. Other lengths are in the truss count table.
Why add one truss to the count?
Dividing the length by the spacing counts the gaps between trusses. There is one more truss than there are gaps, because a truss sits at each end of the building.
What if the length isn’t an exact multiple of the spacing?
The count rounds up, so no gap is wider than your spacing. You can then spread the trusses evenly, slightly closer than your spacing, or keep your spacing from one end and leave a shorter last gap. A 45 ft building at 24 in shows both: 23.5 in evenly, or a 12 in last gap.
Is the top chord length the same as a rafter length?
It uses the same maths as the rafter calculator: half the span, plus any overhang, times the pitch multiplier. Your truss maker sets the exact chord lengths and cuts, so use this figure for planning and checking.
Does this calculator design the trusses?
No. It counts the trusses and gives the outline geometry of one. The web members inside a truss and its lumber sizes come from the truss maker’s design for your roof.
How we estimate
- Trusses = length in inches ÷ spacing, rounded up, + 1 (one truss at each end).
- Even spacing = length in inches ÷ (trusses − 1); last gap at your spacing = length in inches − (trusses − 2) × spacing.
- Top chord per side = (span ÷ 2 + overhang) × pitch multiplier, the rafter maths with no ridge board.
- Truss design, web members and lumber sizes come from the truss maker and are not part of this calculator.
An estimate, not a quote. Get written quotes from licensed, insured roofers.