Roof Truss Calculator
How many trusses a gable roof takes, how long the top chords run, how tall the truss stands, and the heel your attic insulation needs.
By Marko Visic, BSc Physics · Updated November 25, 2026
The building
Measure the span from the outside of one wall to the outside of the other. The length runs along the ridge.
The truss
Heel height here: from the top of the wall plate to the top of the top chord, at the outside of the wall.
Trusses: 40 × 12 ÷ 24 = 20 spaces, and with one truss on each end wall 20 + 1 = 21 trusses.
Top chord: run 28 ÷ 2 = 14 ft; pitch multiplier √(1 + (6 ÷ 12)²) = 1.118034, a slope of atan(6 ÷ 12) = 26.57°; along its top edge from the wall line to the peak 14 × 1.118034 = 15.65 ft (15 ft 7 13/16 in).
Tail: 12 ÷ 12 = 1 ft of run, 1 × 1.118034 = 1.12 ft; eave edge to peak 15.65 + 1.12 = 16.77 ft (16 ft 9 1/4 in), the sheathing length up each side.
Height: the run is 14 × 12 = 168 in, the rise 168 × 6 ÷ 12 = 84 in, and the peak 6 + 84 = 90 in (7 ft 6 in) above the wall plate. The bottom chord spans the 28 ft from wall to wall.
Insulation at the heel: a 2x4 is 3.5 in deep, so at the wall line the top chord takes 3.5 × 1.118034 = 3.91 in of the heel.[2] That leaves 6 − 3.91 = 2.09 in under the top chord for insulation over the wall plate.
ENERGY STAR recommends R49 for an uninsulated attic in climate zones 2 and 3,[3] and Johns Manville's Climate Pro blown fiberglass reaches it at 16.9 in.[4] To hold that at full depth over the wall the heel needs 16.9 + 3.91 = 20.81 in (1 ft 8 13/16 in), a raised heel.[4] Vent baffles fit between the top chords, so insulation up to the underside of the chord leaves the bays more than the 1 in of air the code requires between insulation and sheathing at the vents.[1]
Sheathing: both slopes over the building length, 2 × 40 × 16.77 = 1,341.6 sq ft, or 1,341.6 ÷ 100 = 13.42 squares, before any gable overhang.[5]
The span, length and slope are inside the limits of 2024 IRC R802.10.2.1, 36 ft wide, 60 ft long, 3:12 to 12:12; the section also caps the design wind speed at 140 mph and the ground snow load at 70 psf.[1] The members and plates come from the truss maker's design drawings, which the building official approves before the trusses go up.[1]
A roof truss calculator turns a building's length, span and pitch into the number of trusses, the top chord length and the truss height. This one adds the heel height that lets attic insulation run full depth over the walls, and it leaves the member sizes to the truss maker, whose design drawings the building official approves.[1]

Drawing: CalculateMyRoof · CC BY 4.0 · How to reuse
How it works
A gable roof truss spans from the outside of one wall to the outside of the other. Its two top chords rise at the roof pitch from the heels to the peak, and its bottom chord ties the heels together and carries the ceiling. The calculator works out that outline: the run is half the span, the top chord is the run times the pitch multiplier, and the height is the heel plus the rise over the run.
What goes inside the outline is the truss designer's job. Wood trusses are designed to accepted engineering practice and metal-plate-connected trusses to ANSI/TPI 1, and the design drawings include the slope, span and spacing, the joint locations, the bearing widths and the design loads.[1] So the calculator sizes no members; it gives you the numbers to order against and to check the drawings with.
Worked example
A 40 ft long building with a 28 ft span at 6:12, a 12 in overhang, trusses 24 in on center and a 6 in heel under a 2x4 top chord:
- Count: 40 × 12 ÷ 24 = 20 spaces and 20 + 1 = 21 trusses, one on each end wall.
- Top chord: run 28 ÷ 2 = 14 ft, multiplier √(1 + (6 ÷ 12)²) = 1.118034 and slope atan(6 ÷ 12) = 26.57°, so 14 × 1.118034 = 15.65 ft (15 ft 7 13/16 in) from the wall line to the peak.
- Tail and rake: 12 ÷ 12 = 1 ft of run, 1 × 1.118034 = 1.12 ft of tail, and 15.65 + 1.12 = 16.77 ft (16 ft 9 1/4 in) from the eave edge to the peak.
- Height: the run is 14 × 12 = 168 in and rises 168 × 6 ÷ 12 = 84 in, so the peak stands 6 + 84 = 90 in (7 ft 6 in) above the plate.
- Heel: the 2x4 top chord, 3.5 in deep, takes 3.5 × 1.118034 = 3.91 in at the wall line, leaving 6 − 3.91 = 2.09 in for insulation under it.[2]
- Raised heel for ENERGY STAR's R49 in climate zones 2 and 3, which Climate Pro reaches at 16.9 in: 16.9 + 3.91 = 20.81 in (1 ft 8 13/16 in).[3][4]
- Sheathing: 2 × 40 × 16.77 = 1,341.6 sq ft, or 1,341.6 ÷ 100 = 13.42 squares before the gable overhangs.[5]
Roof truss formulas
- Trusses = length × 12 ÷ spacing, rounded up, + 1, with the length in feet and the spacing in inches.
- Run = span ÷ 2; pitch multiplier = √(1 + (rise ÷ 12)²), with the rise in inches per foot.
- Top chord, wall line to peak = run × multiplier; tail = overhang ÷ 12 × multiplier.
- Peak height in inches = heel + run in feet × rise.
- Heel for full-depth insulation = insulation depth + chord depth × multiplier.
- Roof sheathing = 2 × length × (top chord + tail).
What the truss maker designs
The building official approves the design drawings before the trusses go up, and the drawings ship with the trusses.[1] The construction documents and the truss drawings set the bracing against rotation and for lateral stability; where they say nothing, accepted industry practice applies.[1] Once the trusses are in, no member may be cut, notched, drilled or spliced without a registered design professional's approval, and a new load that exceeds the design load, such as an HVAC unit or a water heater, needs verification that the truss can carry it.[1]
The 2024 IRC's truss section covers designs where snow is the controlling load, within these limits: 36 ft wide, 60 ft long, 3:12 to 12:12, at most 3 stories, a design wind speed up to 140 mph and a ground snow load up to 70 psf.[1] The calculator says when the span, length or slope falls outside them.
Heel height and attic insulation
Over the walls, attic insulation has to fit under the roof with air above it at the eave vents: the code keeps at least 1 in between insulation and sheathing there.[1] A low heel leaves little room, so the insulation thins out right where the ceiling meets the wall. A raised heel lifts the top chord until the full depth fits under it, and the vent baffles sit between the top chords, inside the chord's depth.
ENERGY STAR's R49 for an uninsulated attic in climate zones 2 and 3 takes 16.9 in of Climate Pro, so the heel needs that depth plus the top chord's vertical depth at the wall line, the sum in the worked example above.[3][4] Ask the truss maker for that heel height when you order.
How to measure a roof truss
- Span. Measure from the outside of one bearing wall to the outside of the other. On an existing truss that is the bottom chord, heel to heel.
- Length. Measure along the wall the trusses sit on, end wall to end wall.
- Pitch. Find the rise per foot of run with the roof pitch calculator, or take it from the plans.
- Overhang. Measure it level, from the outside of the wall to the end of the tail.
- Heel. On an existing truss, measure plumb at the outside of the wall from the top of the plate to the top of the top chord. For a new one, start from the insulation you plan.
Common questions
How many trusses do I need?
Divide the building length in inches by the spacing, round up, and add one: 40 × 12 ÷ 24 = 20 and 20 + 1 = 21 trusses at 24 in on center, or 40 × 12 ÷ 16 = 30 and 30 + 1 = 31 at 16 in. The design drawings state the spacing to use.[1]
How do you calculate the length of a truss top chord?
Multiply half the span by the pitch multiplier: 14 × 1.118034 = 15.65 ft from the wall line to the peak for a 28 ft span at 6:12. Add the tail over the eave for the full length: 15.65 + 1.12 = 16.77 ft.
How do you calculate truss height?
Add the rise over the run to the heel. In the worked example the rise is 168 × 6 ÷ 12 = 84 in, so the peak stands 6 + 84 = 90 in above the plate.
What size truss do I need for a 20 ft span?
The truss maker sizes the chords, webs and plates to the design loads, and the design drawings record them.[1] The outline is yours: a 20 ft span at 6:12 has a 20 ÷ 2 = 10 ft run, 10 × 12 = 120 in, which rises 120 × 6 ÷ 12 = 60 in above the heel.
Can you cut or notch a roof truss?
Not without a registered design professional's approval, which covers drilling and splicing too, and a new load that exceeds the design load, such as an HVAC unit or a water heater, needs verification that the truss can carry it.[1]
Is it cheaper to buy trusses or build them?
This page has no primary source for truss prices, so it doesn't compare them. Site-built trusses still need a design to accepted engineering practice and drawings the building official approves before they go up.[1]
What about mono, attic and scissor trusses?
A mono truss slopes one way, so its run is the whole span: the top chord is the span times the pitch multiplier, and the tall end stands the heel plus the rise over the full span. Attic and scissor trusses carry a room or a sloped ceiling inside them, and the maker draws that as part of the design; the count and the top chord work the same way as for a plain gable truss of that span and pitch.
Methodology & sources
The code requirements are from the 2024 International Residential Code on ICC's site: Section R802.10 for trusses, read on Nov 13, 2026, and R806.3 for the vent space, read on Oct 28, 2026. Chord depths are the dressed sizes in the American Softwood Lumber Standard, the R-value target is ENERGY STAR's, and the insulation depth is from Johns Manville's Climate Pro coverage card. The geometry is calculated and printed with its equation, and the engine is tested against the worked example on every build.
Assumptions: a gable truss with both top chords at one pitch; the heel measured plumb at the outside of the wall, from the top of the plate to the top of the top chord; lengths along the top edge of the top chord; one truss on each end wall; insulation laid level from the top of the plate, with the vent baffles between the top chords. The calculator sizes no members, plates or connections and doesn't cover attic rooms, scissor ceilings, hips or valleys; the rafter length calculator lays out site-built rafters and the hip roof calculator frames hips.
Sources
- [1] International Code Council. 2024 International Residential Code, Chapter 8: Roof-Ceiling Construction (Oct 2026 version). Sections R802.10.1, R802.10.2, R802.10.2.1, R802.10.3, R802.10.4, R806.3. Retrieved Nov 13, 2026. codes.iccsafe.org
- [2] U.S. Department of Commerce, NIST. Voluntary Product Standard PS 20-25, American Softwood Lumber Standard (January 2025). Table 3. Retrieved Oct 28, 2026. nist.gov
- [3] ENERGY STAR (U.S. EPA and DOE). Recommended Home Insulation R-Values. attic insulation chart. Retrieved Oct 9, 2026. energystar.gov
- [4] Johns Manville. Climate Pro attic coverage card (BIC-260, 6/18). Climate Pro attic coverage chart. Retrieved Nov 18, 2026. jm.com
- [5] National Roofing Contractors Association. Roofing Guidelines glossary: Square. Retrieved Oct 9, 2026. nrca.net
Change log: first published November 25, 2026.
Related
- Rafter length calculator
- Rafter span calculator
- Hip roof calculator
- Roof pitch calculator
- Roof area calculator
- Attic ventilation calculator
- Shingle calculator
- Roof sheathing calculator
- Trusses vs rafters
- Attic insulation calculator
By Marko Visic, BSc Physics. Updated November 25, 2026.