Rafter Length Calculator
Compute rafter length from rise and run or from roof pitch; estimate truss count from roof length and on-center spacing, plus optional material and installation cost.
Cutting rafters to the wrong length wastes lumber and compromises your roof structure. The rafter length calculator takes your roof rise and run, then instantly returns the exact rafter length using the Pythagorean theorem. Whether you're framing a new roof or replacing rafters, Our Other Construction Calculators collection gives you precise measurements before a single cut is made.
The rafter length calculator is a roof framing tool that determines the exact length of a common rafter based on the roof rise and run. It uses the Pythagorean theorem to calculate the diagonal rafter length — giving you accurate lumber measurements for safe and efficient roof construction.
What Is a Rafter Length Calculator?
A rafter length calculator is a construction tool used to determine the exact length of roof rafters by inputting the roof rise and run. It applies the Pythagorean theorem to output precise rafter measurements, helping you order the right amount of lumber and make accurate cuts for roof framing.
The Rafter Length Formula
The calculator uses the Pythagorean theorem:
√(Rise² + Run²) = Rafter Length
Where:
Rise — the vertical height from the top of the wall plate to the ridge (meters)
Run — the horizontal distance from the wall to the ridge, equal to half the total building span (meters)
Rafter length — the diagonal length of the rafter from wall plate to ridge (meters)
How the Rafter Length Calculator Works
Calculation Mode
The calculator offers two modes:
Rafter length — default selected mode, calculates rafter length from rise and run
Truss count — alternative mode for estimating the number of roof trusses
Rafter Length Inputs
Calculation should include — default: Roof rise (alternative: Roof pitch)
Rise — vertical height of the roof (unit: meters)
Run — horizontal distance from wall to ridge, equal to ½ of total span (unit: meters)
Output
Rafter length — auto-calculated diagonal rafter length (unit: meters)
How to Calculate Rafter Length — Step by Step
Example 1: Standard Gable Roof
Rise = 2 m, Run = 4 m.
Step 1: Square both values — Rise² = 4, Run² = 16. Step 2: Add them — 4 + 16 = 20. Step 3: Square root — √20 = 4.47 m rafter length.
Enter: Rise = 2, Run = 4. Result: Rafter length = 4.47 m.
Example 2: Steeper Roof Pitch
Rise = 3 m, Run = 4 m.
Step 1: Rise² = 9, Run² = 16. Step 2: 9 + 16 = 25. Step 3: √25 = 5.0 m rafter length.
Enter: Rise = 3, Run = 4. Result: Rafter length = 5.0 m — a clean result from a classic 3-4-5 right triangle.
Rafter Length Reference Table
Rise (m) | Run (m) | Rafter Length (m) |
|---|---|---|
1.0 | 3.0 | 3.16 |
1.5 | 3.0 | 3.35 |
2.0 | 4.0 | 4.47 |
2.5 | 4.0 | 4.72 |
3.0 | 4.0 | 5.00 |
3.0 | 5.0 | 5.83 |
4.0 | 6.0 | 7.21 |
Note: All values calculated using √(Rise² + Run²). Run equals half the total building span.
Frequently Asked Questions
How do I calculate rafter length from rise and run?
Use the Pythagorean theorem: √(Rise² + Run²) = Rafter Length. For a roof with 2 m rise and 4 m run, the rafter length is √(4 + 16) = √20 = 4.47 m.
What is the run in a rafter length calculation?
Run is the horizontal distance from the outer wall to the ridge — always equal to half the total building span. For a building 8 m wide, the run is 4 m.
Can I use roof pitch instead of rise?
Yes. The calculator lets you switch the input mode from roof rise to roof pitch using the "Calculation should include" option. Both methods return the same rafter length result.
What is the difference between rafter length and truss count?
Rafter length calculates the diagonal measurement of a single rafter from wall to ridge. Truss count is a separate mode in the calculator that estimates how many roof trusses are needed for a given span.
Leave one field empty to solve it from the other two (right triangle: rafter² = rise² + run²).
Check out 6 similar popular construction calculators