Roof Truss Calculator
Estimate common gable roof truss count, actual spacing, top-chord length, peak height and roof area from span, pitch and building dimensions.
Estimate common gable-truss count, spacing, top-chord length, peak rise, roof angle and roof surface area from span, pitch, building length and overhangs.
Roof truss planning result
Use this roof truss calculator to estimate the number of common truss positions, actual on-center spacing, top-chord length, peak rise, roof angle and roof surface area for a symmetrical gable roof. Enter the building span, building length, roof pitch, overhangs and the maximum truss spacing shown on your plan or supplier quote. The calculator is intended for takeoff and quote checking, not structural truss design.
What the calculator estimates
A common roof-truss takeoff has two separate questions: how many truss positions are needed along the building, and what is the basic geometry of each symmetrical gable truss. This calculator handles both while keeping the structural-engineering boundary clear.
- Truss count: the number of truss positions from one end of the building to the other.
- Actual spacing: the equal spacing that results after the building length is divided into enough bays to stay at or below your entered maximum spacing.
- Top-chord length: the sloped wall-to-ridge length and the sloped length including the horizontal eave overhang.
- Peak rise: vertical rise from the bearing-line geometry to the ridge.
- Roof angle and slope factor: derived from the entered rise-per-12 pitch.
- Roof surface area: a two-slope gable estimate including eave and rake overhang inputs.
Roof truss count formula
Trusses repeat along the building length. To keep every bay at or below the maximum spacing, divide the building length by the spacing, round the number of bays up, then add one truss for the opposite end:
Bays = ceiling(building length ÷ maximum spacing)
Truss positions = bays + 1
For a 40-foot building with a maximum spacing of 24 inches on center, the building contains 20 two-foot bays, so the planning count is 21 truss positions.
If the building length is not an exact multiple of the chosen maximum spacing, the calculator also reports the equalized actual spacing. That avoids creating one oversized end bay.
Roof pitch, rise and top-chord formula
A pitch written as 6:12 means the roof rises 6 units for every 12 units of horizontal run. For a symmetrical gable, the horizontal run from wall to ridge is half the building span.
Run = span ÷ 2
Rise = run × (pitch ÷ 12)
Slope factor = √[1 + (pitch ÷ 12)²]
Top chord to wall bearing = run × slope factor
When an eave overhang is entered as a horizontal dimension, the calculator adds it to the run before applying the same slope factor. This gives the sloped line from the ridge to the outside edge of the eave for takeoff purposes.
Worked 28 × 40 garage example
Suppose a garage is 28 feet wide and 40 feet long, with a 6:12 roof, one-foot eave overhangs and trusses laid out at a maximum of 24 inches on center.
The run is 14 feet. A 6:12 pitch creates 7 feet of geometric rise. The wall-to-ridge top-chord line is approximately 15.65 feet, and the same slope extended over a one-foot horizontal eave is approximately 16.77 feet. A 40-foot building at 24 inches on center uses 20 bays and 21 truss positions.
Roof area from truss geometry
For a simple gable roof, each roof plane is approximated as a rectangle. The calculator multiplies the sloped ridge-to-eave length by the roof length including the entered rake overhangs, then doubles the result for the two roof planes.
Roof area = 2 × sloped ridge-to-eave length × (building length + 2 × rake overhang)
This is useful for comparing framing geometry with a separate roofing-material estimate. It does not account for dormers, valleys, hips, intersecting roofs, openings or irregular plan shapes.
Common trusses are not the entire roof package
The count shown here represents layout positions for a simple common-gable run. The truss at a gable end can be built differently from an interior common truss. Girder trusses, hip sets, valley sets, piggyback trusses, attic trusses, scissor trusses and other special components are project-specific and may add to a manufacturer’s package.
If you enter a quoted price per truss, the calculator simply multiplies that price by the planning position count. Delivery, crane service, tax, special trusses, hangers, bracing and installation are not automatically included.
Why this calculator does not size truss members
Wood roof trusses are engineered components. The 2021 International Residential Code requires wood trusses to be designed according to accepted engineering practice, with metal-plate-connected wood trusses complying with ANSI/TPI 1. Truss design drawings govern information such as span, spacing, loads, reactions, lumber grades, connector plates and required bracing.
That means a website should not tell you that a particular 2×4 or 2×6 chord is structurally adequate from span and pitch alone. Snow, wind, dead load, ceiling load, bearing, uplift, web geometry, lumber grade and connector design all matter. Use this calculator to plan quantities and understand geometry, then use the approved truss design and placement drawings for construction.
Truss spacing and installation
Common residential layouts often use 24, 19.2, 16 or 12 inches on center, but the correct spacing is the one specified by the engineered design and construction documents. SBCA installation guidance emphasizes setting trusses at the design spacing and following the placement and bracing information supplied for the job.
Do not change spacing, cut members, drill plates or alter a manufactured truss because a calculator appears to make the geometry work. The IRC specifically restricts alterations without approval from a registered design professional.
Frequently asked questions
How many roof trusses do I need for a 40-foot building?
At exactly 24 inches on center over a 40-foot truss run, the simple position count is 21: twenty two-foot bays plus the closing truss position. Special gable, girder or hip components can change what you actually order.
Does roof pitch change the number of trusses?
Not in this simple layout formula. The truss count comes from building length and on-center spacing. Pitch changes the truss geometry, including rise, top-chord length, roof angle and roof surface area.
Does the calculator include overhang in the span?
No. Span is the wall-to-wall bearing distance. Eave overhang is entered separately and extends the sloped top-chord line for geometry and roof-area estimates.
Can I use this calculator to build my own structural truss?
No. It does not design webs, joints, connector plates, lumber sizes, bracing, reactions or structural capacity. Use engineered truss drawings or a qualified design professional for structural design.
Can I use metric dimensions?
Yes. Switch the calculator to metric and enter span, building length and overhangs in meters with truss spacing in millimeters. The formulas are the same after unit conversion.
Methodology and sources
The calculator uses standard right-triangle roof geometry and a ceiling-based spacing count for a simple symmetrical common gable layout. Current first-page roof-truss calculators were reviewed for the inputs users expect, including span, building length, pitch, spacing and overhang. Structural limitations and the requirement to follow engineered truss drawings are based on the International Residential Code and Structural Building Components Association guidance.