ConstructionCalculators

Roof Truss Calculator

Enter the building length, the span and the pitch to get how many roof trusses you need, with their rise and cost.

28 ft span5' 10"
Roof
ft
ft
in 12
ft

You need

21trusses

19 common + 2 gable end frames, 24 in on center · $3,346

Common trusses
$2,964
Gable end frames
$382
Rise at the peak28 ft span at 5/12
5' 10"
Top chordhalf the span + 1 ft overhang, along the slope
16' 3"

How Many Roof Trusses Do I Need?

A building 40 ft long with trusses 24 inches on center takes 21 trusses: 19 common trusses and a gable end frame at each end. With a 28 ft span at 5/12, each truss rises 5 ft 10 in at the peak, and the trusses cost $3,346.

Trusses for common sheds, garages and barns, with the trusses spanning the narrow side:

BuildingSpan24 in o.c.16 in o.c.
12 × 12 ft shed12 ft710
12 × 16 ft shed12 ft913
20 × 20 ft garage20 ft1116
24 × 24 ft garage24 ft1319
24 × 30 ft garage24 ft1624
30 × 40 ft barn30 ft2131
40 × 60 ft barn40 ft3146

The count depends only on the length along the ridge and the spacing; the span and pitch decide which truss you order and what it costs. Both counts include the two gable end frames.

Truss Layout

The default building in plan, with a truss every 24 inches from one gable end to the other:

40 ft28 ft24 in
Gable end frames in yellow; the last space is shorter when the length doesn’t divide evenly

Trusses by building length, at 24 and 16 inches on center:

24 in o.c.16 in o.c.
20 ft
11 trusses
16 trusses
24 ft
13 trusses
19 trusses
30 ft
16 trusses
24 trusses
40 ft
21 trusses
31 trusses
50 ft
26 trusses
39 trusses
60 ft
31 trusses
46 trusses
24 in o.c., 16 in o.c., in trusses

Going from 24 to 16 inches on center adds half again as many trusses: 31 instead of 21 on the default building, $4,906 instead of $3,346.

How to Calculate Roof Trusses

Divide the length by the spacing, round up and add the truss at the far end. Then work out the rise and the top chord from the span and the pitch:

Trusses = building length (in) ÷ spacing (in), rounded up, + 140 ft × 12 = 480 in480 ÷ 24 = 20; 20 + 1 = 21 trussesRise: 28 ÷ 2 × 5 ÷ 12 = 5.83 ft = 5 ft 10 inTop chord: (14 + 1 ft overhang) × 1.083 = 16 ft 3 in19 × $155.99 + 2 × $190.99 = $3,346

If the length doesn't divide evenly, the last space is shorter, but it still needs a truss at the end: a 41 ft building at 24 inches takes 22. Measure the length outside to outside of the end walls; the overhang at the gable ends is framed separately.

Truss Height by Span and Pitch

The rise is half the span times the pitch: the height of the roof line at the peak above the top of the walls.

Span4/125/126/12
20 ft3' 4"4' 2"5' 0"
24 ft4' 0"5' 0"6' 0"
28 ft4' 8"5' 10"7' 0"
32 ft5' 4"6' 8"8' 0"

The rise sets the height of the attic and of the gable walls you sheath and side. The actual truss is a little taller: the depth of the top chord and the heel above the wall add to it, and the truss drawings give the overall height.

Truss Spacing

The IRC sets no fixed truss spacing; it comes from the truss design. Residential trusses are commonly designed for 24 inches on center, and several code rules line up with that:

  • Sheathing: at 24 inches, 7/16 in panels rated 24/16 span from truss to truss with or without edge support (IRC Table R503.2.1.1(1)). Count the sheathing panels for the roof.
  • Uplift: the IRC's simple uplift exception, which lets trusses be toenailed to the wall, applies only up to 24 inches on center, among other limits (R802.11).
  • In-line framing: trusses more than 16 inches apart over studs 24 inches apart must bear within 5 inches of a stud, unless the wall has a double 2×6 or 3×4 top plate, a third plate or blocking (R602.3.3).

The calculator also counts 19.2, 16 and 12 inch spacings, for heavier loads or thinner sheathing. Use the spacing on the truss design drawings.

Code Rules for Trusses

  • Design: wood trusses are designed to accepted engineering practice, under the truss industry's ANSI/TPI 1 standard (R802.10.2).
  • Drawings: truss design drawings go to the building official and are approved before installation (R802.10.1).
  • Bracing: trusses are braced as the design shows or, without specific requirements, per accepted industry practice (R802.10.3).
  • No field cuts: trusses may not be cut, notched or drilled unless the manufacturer or a registered design professional allows it (R802.7.2).

That makes the truss count and the price list a planning step: the order goes to a truss maker with the building's span, pitch, overhang, spacing and the loads for your area.

Ordering Trusses

A truss maker designs each order for the building, so have these ready:

  • The span, outside to outside of the bearing walls, and the building length for the count.
  • The pitch and the overhang at the eaves.
  • The spacing, 24 inches on center unless the design calls for less.
  • The roof covering and ceiling, and the snow and wind loads for your area.
  • How many gable end frames, and any openings for chimneys, skylights or attic stairs.

The trusses priced in the calculator are rated for 62 lb per square foot of total load; where snow is heavy, check that the design load covers it. Estimate what a snowfall weighs on the roof.

Roof Truss Prices

Starting prices in the calculator for residential trusses designed for 2 ft spacing and 62 lb per square foot of total load:

Residential truss, 2 ft o.c.Price
24 ft common, 4/12$108.29
28 ft common, 5/12$155.99
30 ft common, 4/12$165.29
30 ft common, 5/12$187.99
32 ft common, 5/12$193.99
28 ft end frame, 5/12$190.99

For other spans and pitches the calculator starts at $6 a foot of span, and end frames at 1.22 times the common truss, as for the 28 ft pair. Click either price to change it.

Trusses vs. Rafters

Rafters are cut on site and can be checked against the IRC span tables; trusses arrive built to an engineered design and can't be altered on site. Rafters leave the attic open between the ceiling joists, while the webs of a common truss fill it. For a stick-framed roof, work out the rafter length, birdsmouth and span check, and count the shingles that go on either one. Our roof pitch calculator finds the pitch of an existing roof.

Frequently Asked Questions

How many roof trusses do I need?

Divide the building length in inches by the truss spacing, round up, and add one for the far end. A 40 ft building with trusses 24 inches apart takes 480 ÷ 24 + 1 = 21 trusses: 19 common trusses and 2 gable end frames.

How many trusses for a 24 × 24 garage?

13 at 24 inches on center: 288 ÷ 24 = 12 spaces, plus 1. That is 11 common trusses and 2 gable end frames; at 16 inches on center it takes 19.

How many trusses for a 30 × 40 pole barn?

21 with trusses 24 inches apart along the 40 ft side, the same count as any 40 ft building.

How many trusses for a 12 × 16 shed?

9 at 24 inches on center along the 16 ft side, or 13 at 16 inches. Each spans the 12 ft width.

How far apart are roof trusses?

Usually 24 inches on center for houses. The IRC sets no fixed spacing: it comes from the truss design, which must follow accepted engineering practice (R802.10.2). At 24 inches the roof sheathing must be rated for that span, such as 7/16 in panels marked 24/16.

How much does a roof truss cost?

A 28 ft residential common truss at 5/12 costs $155.99, 24 ft at 4/12 $108.29 and 32 ft at 5/12 $193.99; a 28 ft end frame costs $190.99. A 40 ft building with a 28 ft span comes to $3,346 in trusses.

What is a gable end frame?

The truss at each gable end of the building. It is sold separately as an end frame, at $190.99 for 28 ft against $155.99 for the common truss, and the calculator prices the two ends that way.

Do I need engineered drawings for trusses?

Yes. The IRC requires truss design drawings to be provided to the building official and approved before installation (R802.10.1), and bracing per the design or accepted industry practice (R802.10.3).

Can I cut or notch a roof truss?

No, not without the designer's approval. The IRC does not allow trusses to be cut, notched, drilled or altered unless the truss manufacturer or a registered design professional allows it (R802.7.2).

How long is the top chord of a truss?

Half the span plus the overhang, times the slope factor. For a 28 ft span at 5/12 with a 1 ft overhang: (14 + 1) × 1.083 = 16 ft 3 in.

Sources

  • International Code Council. (2020). 2021 International Residential Code (Sections R503.2.1.1, R602.3.3, R802.7.2, R802.10, R802.11).
  • Maxfield, B. (n.d.). Code requirements for residential roof trusses. STRUCTURE.

Updated .

Cite this page as:

Daniel, P. Roof Truss Calculator. Available at: https://constructioncalculators.com/roof-truss-calculator/. Accessed: October 28, 2026.