Roof Truss Calculator
- Count the bays first: a 40 ft roof is 480 in, and at 24 in spacing that is 480 / 24 = 20 spaces after rounding up — and every run of spaces needs one more truss than spaces, one at each end: 21 trusses.
- Each truss spans 24 ft, so its half-span is 12 ft; at a 6/12 pitch the rise over that half-span is 12 x 6 / 12 = 6.00 ft.
- The top chord follows the slope: sqrt(12^2 + 6.00^2) = 13.42 ft per side, before any eaves overhang is added.
- Stock totals for 21 trusses: top chords 2 x 13.42 x 21 = 563.49 ft of chord lumber, bottom chords 24 x 21 = 504.00 ft — webs, bracing and plates are extra and design-specific.
- Spacing is a structural decision, not just a count: 24 in is standard for engineered trusses, 16 in where the roof deck or ceiling loads demand it, and the truss designer — not this count — fixes member sizes.
A roof truss calculator turns your roof's length, spacing and pitch into the two numbers you need before you order: how many trusses to build and how long each top chord must be. The count comes from the spaces between trusses plus one, so a 40 ft roof at 24 in spacing has 20 spaces and needs 21 trusses. Closer spacing raises the count fast: a 30 ft roof at 16 in spacing has 23 spaces and needs 24 trusses. Top chord length follows the slope. A 24 ft span at 6/12 pitch has a 12 ft half-span rising 6 ft, so each top chord is 13.42 ft before overhang. A 30 ft span at 8/12 pitch rises 10 ft over its 15 ft half-span, giving an 18.03 ft top chord.
The method is simple arithmetic applied to the geometry of a pitched roof, which is why it is the accepted standard for this kind of count: divide the run into equal spaces, add one truss, and use the pitch ratio to find the rise and the sloped chord. It is a takeoff, not a design. Chord stock totals exclude webs, bracing and plates, and member sizes and web layouts are the truss designer's job, not a count. This page shows the formula, step-by-step workings, worked examples and sources so you can check every number yourself.
Worked examples
40 ft building, 24 in spacing, 6/12 pitch
Primary result: 21. Full step-by-step working is shown with the result. (40 ft · 24 in · 24 ft · 6 /12)
| Trusses needed | 21 |
| Top chord length (each side) | 13.42 ft |
| Total top-chord stock | 563.49 ft |
| Total bottom-chord stock | 504.00 ft |
| Roof rise over the half-span | 6.00 ft |
Tighter 16 in spacing
Primary result: 24. Try it with your own numbers in the calculator above. (30 ft · 16 in · 20 ft · 4 /12)
| Trusses needed | 24 |
| Top chord length (each side) | 10.54 ft |
| Total top-chord stock | 505.96 ft |
| Total bottom-chord stock | 480.00 ft |
| Roof rise over the half-span | 3.33 ft |
50 ft building, steep 8/12 pitch
Primary result: 26. Every intermediate value is printed in the worked steps. (50 ft · 24 in · 30 ft · 8 /12)
| Trusses needed | 26 |
| Top chord length (each side) | 18.03 ft |
| Total top-chord stock | 937.44 ft |
| Total bottom-chord stock | 780.00 ft |
| Roof rise over the half-span | 10.00 ft |
Why the count is spaces plus one
A roof truss calculator counts trusses the same way you count fence posts: one more than the number of spaces between them. Each bay between two adjacent trusses is one space, and every space has a truss on each end. Because the two end trusses are shared between neighboring bays, the total is simply the number of spaces plus one. That single rule explains most of the count, and it is the first thing to check when a result looks off.
A worked example makes it concrete. A 40 ft roof at 24 in spacing has 20 spaces and needs 21 trusses. Twenty-four inches is 2 ft, and 40 divided by 2 is 20, so the trusses sit at 0, 2, 4, and so on up to 40 ft — 21 positions in all. The extra truss is not an error or a spare; it is the one at the far end, exactly like the last post in a fence line.
Real roofs rarely divide this neatly, so the calculator rounds the number of spaces up whenever the length does not divide evenly. If the last space would come out short, you still need a full truss at the end of the run rather than a partial bay, and rounding up keeps the spacing at or under the target. The effect is easiest to see with tighter spacing. A 30 ft roof at 16 in spacing has 23 spaces and needs 24 trusses. Sixteen inches is 1.33 ft, and 30 divided by 1.33 is about 22.5, which rounds to 23 spaces. The count climbs quickly as spacing closes, which is why a roof truss calculator asks for the spacing before anything else.
The same plus-one logic applies to the members you order, not just the trusses. The top chord length follows the slope. A 24 ft span at 6/12 pitch has a 12 ft half-span rising 6 ft, so each top chord is 13.42 ft before overhang. A 30 ft span at 8/12 pitch rises 10 ft over its 15 ft half-span, giving an 18.03 ft top chord. Multiply those lengths by the truss count to estimate chord stock, but treat the total as an estimate only. Chord stock totals exclude webs, bracing and plates — member sizes and web layouts are the truss designer's job, not a count. Use the count to plan delivery and layout, and leave the engineering to the designer.
How to calculate the count and chord length
A roof truss calculator answers two questions at once: how many trusses the roof needs, and how long the top chords must be. Both start with the roof's length, span, spacing and pitch, and both follow from simple arithmetic you can check by hand.
The count depends on how many spaces fit along the roof length. Divide the length by the on-center spacing, round up, and add one, because the run starts and ends with a truss. A 40 ft roof at 24 in spacing gives 20 spaces and needs 21 trusses. Tighten the spacing and the count climbs quickly: a 30 ft roof at 16 in spacing gives 23 spaces and needs 24 trusses. That extra truss is what closer spacing buys you, so run the division before you order material.
For chord length, work from the half-span and the pitch. Pitch is rise over 12 in of run, so a 6/12 pitch rises 6 in for every 12 in of horizontal run. A 24 ft span has a 12 ft half-span; at 6/12 it rises 6 ft. The top chord is the hypotenuse of that right triangle, so use the Pythagorean theorem: 12 squared plus 6 squared is 180, and the square root of 180 is about 13.42 ft per top chord before any overhang. The same method scales: a 30 ft span at 8/12 pitch rises 10 ft over its 15 ft half-span, giving an 18.03 ft top chord. Add overhang separately to each end you plan to extend.
Walk the 21-truss example through both steps. With 21 trusses, each top chord at 13.42 ft gives 42 top chords and about 563.6 ft of chord stock before overhang. That total covers top chords only. It excludes webs, bracing and plates, and member sizes and web layouts are the truss designer's job, not a count. Treat the number as a planning figure for chord material, not a fabrication list.
Use the roof truss calculator to get the count and chord lengths, then confirm the design details with your truss supplier before ordering.
- Truss count = (roof length ÷ spacing, rounded up) + 1
- 40 ft at 24 in spacing: 20 spaces, 21 trusses
- 30 ft at 16 in spacing: 23 spaces, 24 trusses
- Rise = half-span × pitch ÷ 12
- Top chord = √(half-span² + rise²)
- 24 ft span at 6/12: 12 ft half-span, 6 ft rise, 13.42 ft top chord
- 30 ft span at 8/12: 15 ft half-span, 10 ft rise, 18.03 ft top chord
Choosing a spacing
Spacing is the first number you enter into a roof truss calculator, and it drives everything else. The count of trusses is simply the number of spaces plus one. A 40 ft roof at 24 in spacing has 20 spaces and needs 21 trusses. That single rule explains why spacing matters so much: every space you add adds a truss, and every truss adds cost, weight and set-up time.
For engineered trusses, 24 in on center is the standard. It matches the design assumptions behind most manufactured trusses and keeps the count, and the labor, as low as the structure allows. The math stays tidy: 40 ft divided by 24 in gives 20 spaces, so the order is 21 trusses. Run the same roof at a tighter spacing and the numbers climb quickly. A 30 ft roof at 16 in spacing has 23 spaces and needs 24 trusses, even though the roof is shorter. Closer spacing raises the count fast, and that is the trade you are making when you drop from 24 in to 16 in.
Go to 16 in when the roof carries more than shingles and sheathing. Heavier decks, such as thick tile or a layered assembly, and finished ceilings below add weight and stiffness demands that tighter spacing serves better. The same is true where the trusses must span farther or carry ceiling loads. In those cases the extra trusses are not waste; they are what lets the members stay within their limits.
Here is the part the calculator cannot settle for you. The spacing, the member sizes and the web layout are the truss designer's job, and the local code has the final say. Your count is a planning estimate, not an engineered schedule. Chord stock totals are the clearest example: they exclude webs, bracing and plates, so they tell you how much chord material to expect, not how to build the truss. Use the roof truss calculator to size the order and compare options, then hand the spacing decision to the people who stamp the drawings.
Spacing also changes the pieces you order, not just how many. The top chord length follows the slope. A 24 ft span at 6/12 pitch has a 12 ft half-span rising 6 ft, so each top chord is 13.42 ft before overhang. A 30 ft span at 8/12 pitch rises 10 ft over its 15 ft half-span, giving an 18.03 ft top chord. Change the spacing and the count changes; change the pitch and the chord stock changes. Keep both in view before you call in the order.
- 24 in on center: the engineered-truss standard and the lowest sensible count — a 40 ft roof has 20 spaces and needs 21 trusses.
- 16 in on center: for heavier decks and finished ceilings — a 30 ft roof has 23 spaces and needs 24 trusses.
- The truss designer sets member sizes and web layouts; local code has the final say on spacing.
- Chord stock totals exclude webs, bracing and plates, so treat them as material estimates, not a build plan.
What the count does not include
A roof truss calculator answers one question well: how many trusses the roof needs. The count is the number of spaces between trusses plus one. A 40 ft roof at 24 in spacing has 20 spaces and needs 21 trusses. Tighten the spacing and the number climbs quickly: a 30 ft roof at 16 in spacing has 23 spaces and needs 24 trusses. That is the whole of what the count tells you. Everything that turns those trusses into a finished, code-compliant roof sits outside the number, and it is worth knowing what you are still responsible for before you order material.
Start with the gable ends. The count assumes every truss is identical, but gable-end framing often is not: the end condition may call for a different truss profile, extra framing to close the rake, or blocking that a standard truss does not provide. Webs and bracing are the next gap. The internal web layout of each truss, the temporary and permanent bracing that keeps the members straight and stable, and the connector plates that join the members are all design decisions. Chord stock totals exclude webs, bracing and plates entirely. Member sizes and web layouts are the truss designer's job, not a count. If you buy chord lumber from a calculator's total and stop there, you will be short.
Overhangs and ladders are easy to miss for a different reason: they change the geometry, not just the quantity. The top chord length follows the slope. A 24 ft span at 6/12 pitch has a 12 ft half-span rising 6 ft, so each top chord is 13.42 ft before overhang. A 30 ft span at 8/12 pitch rises 10 ft over its 15 ft half-span, giving an 18.03 ft top chord. Any overhang, ladder framing or rake detail adds to those lengths, and the calculator's chord figures stop at the wall line unless you account for it yourself.
Finally, there is a rule that matters more than any number on this page: engineered trusses are never site-modified. You do not cut a chord to make it fit, notch a web to clear a duct, or drill a member for wiring without the truss designer's written approval. Trusses are engineered as a system, and every member carries load in a way the drawings assume. A field cut can void the engineering, fail an inspection and compromise the roof. If a truss does not fit as delivered, the fix is a conversation with the designer or manufacturer, not a saw.
Use the roof truss calculator for what it does best — getting the truss count and spacing right — and treat the rest as a separate scope. Confirm gable-end details, bracing and connector requirements with your truss designer or building official, and price overhangs and ladders from the actual roof geometry rather than from the chord totals.
FAQs
How many trusses do I need for a 40 ft building?
At 24 in spacing, convert the 40 ft length to inches: 480 in. Divide by 24 in to get 20 spaces, then add one end truss for 21 trusses. The extra truss closes the last bay, since every bay sits between two trusses.
Why do I add one to the number of spaces?
Each bay sits between two trusses, and the run has a truss at both ends. It works like fence posts and panels: posts = panels + 1. So for 20 spaces you need 21 trusses, not 20. Skipping the extra one leaves the final bay without a closing truss.
What spacing should roof trusses be?
24 in on centre is standard for engineered trusses. 16 in is used for heavier roof or ceiling loads. The truss designer confirms the final spacing, so treat these as planning values and check the design before ordering.
How long is the top chord of a truss?
The top chord runs the slope length over the half-span. For a 24 ft span at 6/12 pitch, that is √(12² + 6²) = 13.42 ft, before any eaves overhang. Add overhang separately if your design includes one.
Does the calculator size the truss members?
No. It counts trusses and chord lengths. Web layout and member sizes must come from an engineered truss design. Use the calculator for quantity and length planning, then get the actual member sizes and web pattern from your truss designer or supplier.
What if the building length does not divide by the spacing?
Round the number of spaces up and keep the spacing at or below the design value. For example, 30 ft at 16 in gives 22.5 spaces, which rounds up to 23 spaces, giving 24 trusses. Rounding up keeps spacing under the design maximum.