Roof Truss Calculator

A roof truss calculator counts trusses as ceiling(length ÷ spacing) + 1: a 40 ft building with trusses 24 in on center needs 21 trusses, end to end.

Trusses needed21
Total length
Length along a straight run. Enter the total distance to cover.

Roof truss calculator

A roof truss calculator counts the trusses a roof needs along the length of a building. The count is ceiling(length in inches ÷ spacing in inches) + 1. A 40 ft building with trusses 24 inches on center has 20 gaps, so it needs 21 trusses.

It is a quick count for budgeting and planning. The truss manufacturer produces the real layout.

The formula in plain words

  1. Building length in inches = feet × 12.
  2. Gaps = length in inches ÷ spacing in inches, rounded up.
  3. Trusses = gaps + 1.

The +1 is the truss at the starting end. Every gap has a truss at its far side, so n gaps need n + 1 trusses.

Worked examples

A 40 ft building at 24 in on center, the default:

  • 40 × 12 = 480 in
  • 480 ÷ 24 = 20 gaps
  • 20 + 1 = 21 trusses

A 30 ft garage at 16 in on center:

  • 30 × 12 = 360 in
  • 360 ÷ 16 = 22.5, rounded up to 23 gaps
  • 23 + 1 = 24 trusses
  • The last bay is 8 in narrower than the rest, so the supplier may adjust the spacing to even it out

A 41 ft building at 24 in:

  • 492 ÷ 24 = 20.5, rounded up to 21 gaps
  • 21 + 1 = 22 trusses
  • The 22nd truss closes the end wall, and the last bay is 1 ft wide instead of 2 ft

Truss counts by length and spacing

Building length 16 in 19.2 in 24 in
20 ft 16 14 11
30 ft 24 20 16
40 ft 31 26 21
50 ft 39 33 26
60 ft 46 39 31

Tighter spacing means more trusses, but each one may be lighter. The designer balances truss size, spacing, roof loads and sheathing thickness.

Which spacing to enter

Use the spacing on your plans. If the plans do not say, ask your truss supplier. Common choices in house building are 16 in, 19.2 in and 24 in. Wider spacing is common for roof trusses, and tighter spacing may be required in heavy snow areas.

Special trusses not in this count

This count covers evenly spaced common trusses. Real roofs add:

  • Hip girders and jack trusses on hip roofs.
  • Valley framing where roof planes cross.
  • Dormer and porch trusses.
  • Scissor or attic trusses if the plan calls for them. The attic truss calculator covers those.
  • Extra trusses under a heavy load, such as a water heater or HVAC unit in the attic.

How to measure

  • Measure the building length along the wall that runs parallel to the ridge, outside to outside.
  • Include any overhang only if the trusses extend over it.
  • For an L-shaped house, count each wing as a separate gable roof.

The span, meaning the width the truss crosses, is a separate dimension that the supplier needs. You do not enter it here.

Common mistakes

  • Using the span instead of the length.
  • Forgetting the +1.
  • Forgetting that the last bay is narrower when the length does not divide evenly.
  • Forgetting special trusses for hips, valleys and dormers.
  • Using the count to design the roof. A truss package is engineered for your loads.

Safety

Trusses are engineered parts. Never cut or notch them, and brace them as the manufacturer instructs while you set them, because a truss that is not braced can fall over during installation. Lifting trusses overhead is a job for an experienced crew with the right equipment.

The truss cost calculator prices a package, the roof pitch calculator finds the slope, and the roof area calculator gives the sheathing and roofing area. If you frame with rafters instead of trusses, use the rafter calculator.

Embed this calculator on your site

Free to use. Paste this into your page's HTML. Please keep the link under the calculator.

Frequently asked questions

Why does the truss count add 1 to the division?

Dividing building length by spacing counts the gaps between trusses, and a row with 20 gaps has 21 trusses because there is one at each end. A 40 ft building at 24 in on center has 480 ÷ 24 = 20 gaps, so it needs 21.

What does on center mean for truss spacing?

It is the distance from the center of one truss to the center of the next, not the clear gap between them. Trusses 24 in on center with a 1.5 in thick top chord have a clear opening of 22.5 in between them.

Why isn't the count exact for every roof?

The formula assumes a plain gable roof with evenly spaced trusses. When the length is not an exact multiple of the spacing, the count rounds up so a truss lands at the end wall, and the last bay is narrower than the rest. Hip roofs, dormers, valleys and gable end framing add special trusses that this count does not include.

Do gable ends need extra trusses beyond this count?

The count includes one truss at each end. Many designs use a gable end truss with vertical studs, and some use a standard truss with a gable frame on top. Ask your truss supplier how they treat the ends.

Who decides truss spacing and design?

The truss manufacturer's engineer, working from your plans and local snow and wind loads. Never cut, notch or alter a truss on site. Use this calculator for a rough count and let the manufacturer's layout set the final order.

Estimates only. Verify quantities with your supplier before purchasing.