100% Free & Online — Trusted by 100,000+ builders & engineers

Roof Truss Calculator

A roof truss calculator lets you design and size roof trusses online in seconds — no software, no signup, no cost. Enter your building's span, pick a roof pitch or exact angle, set spacing and loads, and get top chord and rafter lengths, ridge height, roof angle, board footage, and an installed cost estimate instantly, in any unit you choose.

0 Calculations 0 Accuracy Free Forever <2s Load Time
Try an example:
Total width of the building
Length along the ridge
Rise per 12" of run, or switch to an exact angle
Eave overhang beyond wall

Live Roof Diagram

Results

Roof Height
Rafter Length
Roof Angle
Rise
Run
Roof Area
Estimated Lumber
Material Cost
Dead Load
Live Load
Total Weight
Truss Count

How to Use the Roof Truss Calculator

  1. Enter your span and building length. Roof span is the wall-to-wall width of the building; length runs along the ridge.
  2. Choose a roof pitch. Pick the rise-per-12" pitch that matches your design, from a low 2/12 slope up to a steep 12/12.
  3. Set truss spacing and loads. Select on-center spacing (typically 24" OC), then enter your local snow and wind load values.
  4. Get instant results. Member lengths, roof angle, area, quantity, and cost update live as you type — no submit button required.

What the Calculator Works Out

Once your span, pitch, and spacing are entered, this roof truss calculator with steps returns everything you need to move from sketch to cut list:

  • Top chord (rafter) and bottom chord member lengths
  • Rise and overall roof height from wall plate to ridge
  • Roof angle in degrees, derived from your rise-and-run ratio
  • Truss quantity based on your on-center spacing
  • Estimated board footage and material cost
  • Dead load, live load, and total roof weight

How to Calculate Rafter Length

Rafter length is the true sloped distance from the ridge down to the tail of the eave — always longer than the flat, horizontal run because it follows the roof's slope. Getting it right the first time saves a wasted cut and a second trip to the lumber yard.

Start with two numbers: run, which is half your building's span (the distance from the outside wall to the center of the roof), and rise, the vertical height the roof climbs over that run. Rise is found by multiplying run by your pitch ratio — a 6/12 pitch means the roof climbs 6 inches for every 12 inches (1 foot) of run, so the slope ratio is 6/12, or 0.5.

With rise and run known, the rafter length formula is just the Pythagorean theorem:

  • Rafter length = √(run² + rise²)
  • Add the overhang: extend the run by your eave overhang distance before squaring, so the tail is included
  • Working in an angle instead of a ratio? Rafter length = (run + overhang) ÷ cos(roof angle)

For example, on a 30 ft span with a 6/12 pitch and a 12" overhang: run is 15 ft, rise is 7.5 ft, and the rafter — including the overhang — comes out to roughly 17.9 ft. Switch the calculator above to Angle (°) mode if you already know your roof angle in degrees rather than a rise-over-run ratio, and the rafter length updates the same way.

How to Calculate Truss Count and Roof Truss Cost

Truss count comes from a simple division: take your building's length in inches, divide by your on-center spacing, and add one extra truss to close out the run.

  • Truss count = ⌈(building length × 12) ÷ spacing⌉ + 1
  • A 40 ft long building at 24" spacing needs 21 trusses; the same building at 16" spacing needs 31

Roof truss cost then builds on that count. If you're pricing from scratch, total material cost is your estimated board footage multiplied by a per-board-foot rate for your chosen material (SPF, Douglas Fir, engineered wood, or steel). If you already have a supplier quote, it's simpler to work backward:

  • Material cost = truss count × cost per truss
  • Total cost (excluding installation) = material cost + labor cost
  • Total cost (including installation) = material cost + labor cost + installation cost

The calculator's Cost Estimator lets you use either path — the automatic board-footage estimate, or your own per-truss price — and includes a toggle to add or remove installation cost from the total, so you can compare a self-install budget against a fully installed quote.

What Is On-Center Spacing?

On-center (O.C.) spacing is the distance measured from the center of one truss to the center of the next — not the gap between them. It's the single number that determines how many trusses a roof needs and how much load each individual truss has to carry.

Standard spacing options in residential construction are 12", 16", 19.2", and 24" on-center, with 24" being the most common default for pre-engineered roof trusses (wider than the 16" typical of stick-framed rafters, because a truss's internal webbing lets it safely span further between supports).

  • Tighter spacing (12"–16") — more trusses, smaller loads per truss, higher material and labor cost, often chosen for heavier snow loads or when using lighter framing lumber
  • Wider spacing (19.2"–24") — fewer trusses, larger load per truss, lower total truss count and typically lower total cost, standard for most residential roofs

Because roof sheathing (plywood or OSB) is manufactured in 4×8 ft sheets, spacing is usually chosen so panel edges land on a truss center — 16" and 24" both divide evenly into 48" and 96", which is why they're the two most common choices. Change the Truss Spacing field in the calculator above to see how it shifts both truss count and total material cost in real time.

Span, Cost, Load & Pitch Calculators

Need one number fast? The same engine behind the full calculator powers each feature on its own. Use the roof truss span calculator to find maximum span and rafter length for your building width. Jump to the roof truss cost calculator for a live material, labor, and installation breakdown. Check truss count and board footage with the roof truss quantity calculator, or review dead, live, snow, and wind figures with the roof truss load calculator. For the math behind roof angle, rise, and run, see the roof truss pitch calculator.

Truss vs Rafter

A truss is a pre-engineered, triangulated assembly of top chords, bottom chords, and web members — usually joined with MiTek-style connector plates — designed to span the full width of a building without interior supports. A rafter is a single sloped framing member cut and installed on site, often paired with ceiling joists or collar ties. Trusses are faster to install and span farther; rafters allow more flexible, open interior ceilings. Use the rafter calculator to get rafter length and rafter length & birdsmouth details alongside your truss numbers.

Tips for Accurate Results

This calculator is built on standard structural formulas and gives reliable preliminary numbers, but it isn't a substitute for a stamped design. Always check your local building code (IRC/IBC or your regional equivalent) for minimum snow load, wind load, and spacing requirements before ordering material. Loads vary significantly by climate zone and elevation, so confirm your snow and wind values with local code tables rather than guessing. For anything that will be permitted or built, have your final truss layout reviewed and stamped by a licensed structural engineer. Switch between imperial (ft/in) and metric (m) units at any time using the toggle inside the calculator.

Frequently Asked Questions

How to calculate roof truss size?

Measure the building span (wall-to-wall width) and choose the roof pitch. Truss size is set by the top-chord length (from span & pitch), the overall rise, and the required load. Enter span, pitch and load into the calculator and it returns member lengths, height and quantity.

What size truss for a 20 ft span?

A 20 ft (6.1 m) span typically uses 2x4 or 2x6 top and bottom chords depending on load, pitch and truss spacing (usually 24" on-center). Engineered trusses often use 2x4 members with web bracing for a 20 ft span, but always confirm with a stamped design for your snow/wind load.

How far can you span a 2x6 truss?

A 2x6 truss chord can commonly span roughly 20–24 ft depending on grade, spacing, pitch and load. Higher loads or wider spacing reduce the allowable span. Use the span calculator and verify against local building codes and an engineer's design.

How far can 2x4 trusses span?

Engineered 2x4 trusses can span up to about 30–40 ft in light-load residential roofs because the web members carry the load, not the chord alone. A single unsupported 2x4 rafter spans far less. Always confirm with an engineered, stamped truss design.

See all FAQs

Ready to size your own roof?

Use the Roof Truss Calculator
Why RoofTrussCalculator

Built for Professionals. Free for Everyone.

Lightning Fast

Instant results with zero page reloads or delays.

Engineering Accuracy

Formulas built on standard structural engineering principles.

Free Calculator

No paywalls, no subscriptions — free forever.

Mobile Friendly

Fully responsive on phones, tablets, and desktops.

SEO Optimized

Fast, structured, and built to be found on Google.

No Login Required

Jump straight into calculating — no account needed.

Instant Results

Live updates as you adjust any input field.

Metric + Imperial

Switch unit systems with a single click.

Print Report

Generate a clean printable summary of your results.

PDF Export

Save your calculations as a shareable PDF.

Modern UI

A clean, distraction-free interface that's a pleasure to use.

Professional Grade

Trusted by contractors, engineers, and homeowners alike.

Roof Types

Explore Every Roof Style

Each roof type has unique structural characteristics. Learn the differences before you design.

Gable

Two sloping sides meeting at a ridge — simple, cost-effective, and the most common residential roof.

Calculate

Hip

All four sides slope down to the walls, offering excellent stability in high-wind regions.

Calculate

Shed

A single sloping plane, popular for additions, modern homes, and outbuildings.

Calculate

Gambrel

A two-sided roof with two slopes on each side, maximizing interior loft space (barn style).

Calculate

Scissor

Sloped bottom chords create vaulted ceilings while maintaining truss strength.

Calculate

Attic

A truss designed with usable open space inside for storage or living area.

Calculate

Cathedral

Steep symmetrical slopes creating dramatic vaulted interior ceilings.

Calculate

Flat

A minimal-slope roof used for drainage, common on commercial and modern builds.

Calculate

Mono

A single flat plane pitched in one direction, ideal for modern and lean-to designs.

Calculate

Butterfly

Two roof sections angled inward like a V, popular in contemporary architecture.

Calculate
Learning Center

Understand Roof Truss Engineering

Plain-language explanations of the concepts behind every calculation.

Roof Truss

A engineered framework of triangular members that supports the roof deck and transfers loads to the walls.

Roof Pitch

The steepness of a roof expressed as rise over a 12-inch run, e.g. 6/12 means 6" of rise per foot.

Span

The total horizontal distance covered by the roof, typically measured wall-to-wall.

Rise

The vertical height gained by the roof from the wall plate to the ridge.

Run

The horizontal distance from the outside wall to the center of the building (half the span).

Dead Load

The permanent weight of roofing materials, decking, and structural members themselves.

Live Load

Temporary loads such as maintenance workers, equipment, or furniture on the structure.

Snow Load

The additional weight snow accumulation applies to a roof, varying by climate and pitch.

Wind Load

Pressure exerted on the roof by wind, critical for uplift resistance in storm-prone areas.

Truss Design

The engineering process of sizing members and connections to safely carry all applied loads.

Building Codes

Local and international standards (like IRC/IBC) that govern minimum structural requirements.

Material Guide

Choosing between SPF, Douglas Fir, engineered wood, or steel based on span and load needs.

Formulas

The Math Behind the Calculator

Roof Pitch Angle

\( \theta = \arctan\left(\dfrac{\text{rise}}{\text{run}}\right) \)

The pitch angle is the angle between the rafter and a horizontal line, derived from the rise-to-run ratio.

Rise

\( \text{Rise} = \text{Run} \times \dfrac{\text{Pitch}}{12} \)

Vertical distance the roof climbs from the wall plate to the ridge.

Rafter Length

\( L = \sqrt{\text{Run}^2 + \text{Rise}^2} \)

The Pythagorean theorem gives the true sloped length of the rafter.

Roof Area

\( A = \text{Length} \times \dfrac{\text{Span}}{\cos(\theta)} \)

Footprint area is divided by the cosine of the pitch angle to account for slope.

Truss Count

\( N = \left\lceil \dfrac{\text{Length} \times 12}{\text{Spacing}} \right\rceil + 1 \)

Number of trusses required based on on-center spacing.

Total Load

\( W_{total} = (DL + LL) \times A \)

Combined dead and live loads multiplied across the total roof area.

Cost Estimator

Estimate Your Project Budget

Automatically calculated from your inputs above in the calculator.

Material$0
Labor$0
Installation$0
Total Estimate $0

Estimates only. Actual costs vary by region, supplier, and site conditions.

Testimonials

Trusted by Contractors & Engineers

"This calculator saves me at least an hour on every estimate. The material cost breakdown alone is worth bookmarking."

M
Mark Reynolds
General Contractor, Reynolds Builders

"A clean, fast way to sanity-check preliminary truss dimensions before I run full calculations in my design software."

S
Sarah Chen, P.E.
Structural Engineer

"I had zero roofing experience and this tool made the math finally make sense. The diagram updating live was a huge help."

D
David Okafor
Homeowner / DIY Builder

"We use this daily to give clients quick ballpark numbers before a full site visit. Incredibly accurate and easy to explain."

L
Lisa Martinez
Roofing Estimator, Apex Roofing

"Finally a free tool that doesn't feel like it was built in 2005. Fast, clean, and it just works on my phone at the job site."

T
Tom Whitfield
Framing Contractor
FAQ

Frequently Asked Questions

Measure the building span (wall-to-wall width) and choose the roof pitch. Truss size is set by the top-chord length (from span & pitch), the overall rise, and the required load. Enter span, pitch and load into the calculator and it returns member lengths, height and quantity.

A 20 ft (6.1 m) span typically uses 2x4 or 2x6 top and bottom chords depending on load, pitch and truss spacing (usually 24" on-center). Engineered trusses often use 2x4 members with web bracing for a 20 ft span, but always confirm with a stamped design for your snow/wind load.

A 2x6 truss chord can commonly span roughly 20–24 ft depending on grade, spacing, pitch and load. Higher loads or wider spacing reduce the allowable span. Use the span calculator and verify against local building codes and an engineer's design.

Engineered 2x4 trusses can span up to about 30–40 ft in light-load residential roofs because the web members carry the load, not the chord alone. A single unsupported 2x4 rafter spans far less. Always confirm with an engineered, stamped truss design.

Yes — the calculator on this site is free to use online with no download required.

Enter span, pitch and spacing for a fast, simple result — ideal for quick estimates before ordering.

Works in any browser on mobile and desktop — no app install needed.

Use the Mono / Lean-to and Garage/Barn calculators for shed and outbuilding trusses.

See the dedicated Span calculator for maximum spans and span tables.

The Guides section includes worked calculation examples and formulas.

Use the Mono / Flat roof truss calculator for low-slope and flat designs.

The Steel truss calculator covers metal members, weight and force analysis.

Results can be exported/printed to PDF for sharing with your supplier.

The Pitch & Angle and Rafter Length tools return exact member lengths.

Covered by the Mono / Lean-to calculator.

Guides include downloadable Excel calculation examples.

There isn't a single formula — a truss is sized from several linked formulas: rafter length via the Pythagorean theorem, rise from pitch × run, roof area from length × span ÷ cos(angle), and truss count from length ÷ spacing. This calculator runs all of them together from your span, pitch, and spacing inputs.

A simple king post truss can be built from two top chords, one bottom chord, and a single vertical post, fastened at each joint with construction adhesive and nail plates or gusset plates. For anything beyond a small shed or playhouse, use dimensions from a stamped engineered design rather than an ad-hoc build.

Yes, in almost all standard designs — trusses are spaced at a consistent on-center distance (12", 16", 19.2", or 24") so that roof sheathing, insulation, and drywall panels all land evenly, and so the load each truss carries stays predictable. Irregular spacing requires custom engineering.

At the common 24" on-center spacing, a 40 ft long roof needs 21 trusses (40 × 12 ÷ 24, plus one to close out the run). At 16" spacing it needs 31. Enter your own building length and spacing above to get an exact count.