Truss Count Calculator
Reviewed by the My Roof Pitch editorial team · Updated · Free, no sign-up, works offline after first load
To count roof trusses, divide the building length in inches by the truss spacing, round up, and add one for the final end. A 40 foot building at 24 inch centres needs 480 ÷ 24 = 20 spaces, so 21 trusses, two of which are usually gable end trusses.
Key takeaways
- Trusses = ⌈length × 12 ÷ spacing⌉ + 1.
- 24 in on centre is standard for engineered trusses; 16 in is common for stick-framed rafters.
- Gable end trusses are built differently and priced separately.
- Add trusses for any point load, opening or girder the engineer specifies.
Your measurements
Enter the values you know — results update live.
Outside length of the wall the trusses sit along.
On-centre spacing in inches.
0 for a hip roof, 2 for a simple gable.
Analysis
Live results from your measurements.
Show the working
- Length in inches:
40 × 12= 480 in - Spaces:
⌈480 ÷ 24⌉= 20 - Trusses:
20 + 1= 21 - Common trusses:
21 − 2 gable= 19
What this calculator does
A truss count calculator answers the most common framing question on any new roof: how many trusses do I need? Trusses are set at a fixed on-centre spacing along the length of the building, so the count is the number of spaces plus one closing member. The tool also separates gable end trusses, which have vertical studs for sheathing and siding and are priced differently, from the common trusses in between, and gives the equivalent rafter count if you stick-frame instead. Use it to order trusses, budget a garage, shed or house, or sanity-check a supplier's truss layout.
How to use it
- Measure the outside length of the building along the ridge direction.
- Choose the on-centre spacing from the truss design (usually 24 in).
- Set the number of gable end trusses — two for a gable roof, zero for a hip.
- Read the total and common truss counts.
- Add any girder or extra trusses shown on the engineered layout.
The formula
Truss count
trusses = ceil(length × 12 ÷ spacing) + 1
Each space is bounded by two trusses, so a run of n spaces needs n + 1 trusses.
Common trusses
common = trusses − gable ends
Gable trusses close the ends and carry the wall sheathing.
Rafters
rafters = trusses × 2
Each truss position becomes a pair of rafters on a stick-framed gable.
Worked example
A 24 × 30 ft detached garage with a gable roof and trusses at 24 in centres along the 30 ft wall.
- 30 × 12 = 360 in
- 360 ÷ 24 = 15 spaces
- 15 + 1 = 16 trusses
- 16 − 2 gable ends = 14 common trusses
Order 14 common trusses and 2 gable end trusses, 24 ft span.
Trusses needed by building length
| Length | @16 in | @19.2 in | @24 in |
|---|---|---|---|
| 12 ft | 10 | 9 | 7 |
| 20 ft | 16 | 14 | 11 |
| 24 ft | 19 | 16 | 13 |
| 30 ft | 24 | 20 | 16 |
| 40 ft | 31 | 26 | 21 |
| 50 ft | 39 | 33 | 26 |
| 60 ft | 46 | 39 | 31 |
Common mistakes
- Forgetting the +1 closing truss at the far end.
- Using the span (wall-to-wall width) instead of the length along the ridge.
- Ordering common trusses for the ends of a gable when siding needs a stud-framed gable truss.
- Ignoring girder trusses at large openings or where a hip meets a gable.
- Assuming 24 in spacing suits every roof — tile roofs and high snow areas often need 16 in.
Assumptions and limits
- Trusses start flush at one end wall and are spaced evenly.
- Overhang ladders, outlookers and girders are counted separately.
- Cost is illustrative; enter a real supplier quote for budgets.
Frequently asked questions
How many trusses do I need for a 24 foot building?
At 24 in centres, 24 × 12 ÷ 24 = 12 spaces, so 13 trusses. At 16 in centres it is 18 spaces, so 19 trusses.
How many trusses for a 30 x 40 building?
Along the 40 ft wall at 24 in centres you need 21 trusses with a 30 ft span: 19 common plus 2 gable ends.
Are trusses 16 or 24 inches apart?
Engineered roof trusses are usually 24 in on centre. Rafters and floor trusses are often 16 in, and heavy tile or snow loads may push trusses to 16 in.
Do I need a truss at each end?
Yes. The first and last positions sit on the end walls; on a gable roof these are gable end trusses.
How many trusses for a 12 x 16 shed?
Along 16 ft at 24 in centres: 8 spaces, so 9 trusses. At 16 in centres: 12 spaces, so 13 trusses.
Does a hip roof need fewer trusses?
Not fewer positions, but different ones — hip sets use stepped-down hip trusses, jack trusses and a girder instead of gable ends. Use the supplier layout for a hip roof.
How much does a roof truss cost?
Typical 2026 prices are roughly $100–$250 for a small shed truss and $250–$600 for a house-span common truss, more for attic or scissor trusses.
Can I change truss spacing to save money?
Only within the design. Wider spacing needs thicker sheathing and is limited by the truss engineering and local snow load.
Last updated 2026-10-08. Results are estimates for planning and are not a substitute for a licensed engineer or local code review.