Roof Truss Calculator
Top chord length, peak height, peak and base angles, and the number of trusses needed for a symmetric gable roof. Enter span (or run), pitch, overhang, building length, and on-center spacing.
Results
Estimates assume a symmetric common gable truss. Geometry only — this calculator does not size lumber, locate web members, or account for snow, wind, or dead loads. Engineered trusses must be designed by a structural engineer or ordered from a manufacturer with the load conditions, span, and pitch specified. For gambrel, shed, attic, or barn trusses, the geometry differs and this calculator does not apply.
How to use this calculator
- 01Pick whether you have span or run and toggle the input. Span is the full building width. Run is half of that. Enter pitch as the rise over 12.
- 02Enter overhang if your trusses include eaves. Enter zero if the rafter tails are framed separately. The calculator returns top chord length with the sloped tail included.
- 03Enter building length and pick truss spacing. Most residential framing uses 24-inch spacing. Heavier loads or shorter span tables move it to 16-inch. The calculator returns the truss count with the gable ends already included.
- 04Read top chord length and truss count first. Those are the two numbers you order against. Total chord material gives you the linear footage of all top and bottom chord lumber across the full truss run, which is what your lumber yard needs.
Understanding the math
A common gable truss is a triangle. The bottom chord runs horizontal between the wall plates. The two top chords slope up from the wall plates to meet at the peak. Run is half the span, the horizontal distance from wall to peak. Rise is the vertical distance from the bottom chord to the peak. Pitch is rise over run, expressed as X over 12.
Top chord length is the hypotenuse of the right triangle formed by half the truss. Top chord = √(run² + rise²).
run = span / 2 · rise = run × pitch / 12 · top chord = √(run² + rise²) base angle = atan(pitch / 12) · peak angle = 180 − 2 × base truss count = ceil(building length / spacing) + 1
Worked example. 24-ft span, 6/12 pitch, 0 overhang, 32-ft building length, 24-in spacing.
Run = 12 ft. Rise = 12 × 6 / 12 = 6 ft. Top chord = √(144 + 36) = √180 = 13.42 ft. Bottom chord = 24 ft. Peak height = 6 ft. Base angle = arctan(6/12) = 26.57°. Peak angle = 180 − 2(26.57) = 126.86°. Truss count = ceil(32 / 2) + 1 = 17. Total chord material = (13.42 × 2 + 24) × 17 = 864.28 ft.
Trusses needed by building length and spacing
Truss count for common building lengths at standard residential spacings. Imperial mode shows 16-inch and 24-inch on-center; metric mode shows 400 mm and 600 mm. Counts include trusses at both gable ends.
| Building Length | 16" o.c. | 24" o.c. |
|---|---|---|
| 12 ft | 10 | 7 |
| 16 ft | 13 | 9 |
| 20 ft | 16 | 11 |
| 24 ft | 19 | 13 |
| 28 ft | 22 | 15 |
| 32 ft | 25 | 17 |
| 40 ft | 31 | 21 |
| 48 ft | 37 | 25 |
Frequently asked questions
How to calculate roof trusses?
Start with span and pitch. Span is the full width of the building wall to wall. Pitch is the rise per 12 inches of horizontal run. With those two numbers, every other dimension follows.
Top chord length is the rafter math. Run is half the span. Rise is run times pitch over 12. Top chord = √(run² + rise²). Bottom chord equals the span, plus twice the overhang if you're including overhangs in the truss.
Truss count is building length divided by spacing, rounded up, plus one for the end gable. A 24-ft building on 24-inch spacing needs 13 trusses. Same building on 16-inch spacing needs 19.
How to calculate roof truss angles?
Two angles matter. The base angle sits where the top chord meets the bottom chord. The peak angle sits where the two top chords meet at the ridge.
Base angle is the same as roof pitch angle. Take arctan of pitch over 12. A 6/12 truss has a base angle of 26.6°. A 12/12 truss has a base angle of 45°.
Peak angle is 180 minus twice the base angle. A 6/12 truss has a peak angle of 126.9°. A 12/12 truss has a peak angle of 90°.
Use the base angle to set your saw for the bottom-chord cut on each top chord. Use the peak angle for the ridge joint.
How to calculate roof truss length?
Truss length usually means top chord length, since that's the longest piece. Top chord = √(run² + rise²) where run is half the span and rise is run times pitch over 12.
A 24-ft span on a 6/12 pitch has a 12-ft run and a 6-ft rise. Top chord = √(144 + 36) = 13.42 ft. Add overhang times √(1 + (pitch/12)²) for the tail.
Bottom chord length equals the span when there's no overhang, or span plus twice the overhang when the bottom chord runs to the rafter tails. Order one standard lumber length up from your calculated top chord to allow for cutting and joints.
How to calculate number of roof trusses needed?
Divide building length by truss spacing, round up, then add one. The plus-one accounts for trusses at both gable ends, not just spacings between them.
A 32-ft building on 24-inch spacing: 32 / 2 = 16, plus 1 = 17 trusses. Same building on 16-inch spacing: 32 / 1.333 = 24, plus 1 = 25 trusses.
For metric, same formula. A 10-meter building on 600mm spacing: 10 / 0.6 = 16.67, round up to 17, plus 1 = 18 trusses.
Order one or two extra to cover damaged or miscut pieces during install.
Related calculators
Rafter Length Calculator
Common rafter length, rise, tail, and cut angles for a symmetric gable. Same triangle math, different framing system.
Roof Pitch Calculator
Convert between rise/run, degrees, and percent slope. Rafter length per foot of run.
Roof Square Footage Calculator
Total roof area in square feet and roofing squares. Pitch multiplier and waste factor built in.
Shingle Calculator
Bundles needed from roof area. Includes starter rows and ridge cap.