
Rafter length & truss count from rise, run, pitch and spacing
Powered by Toolraxy
Embed this calculator

Founder & CEO, Toolraxy
Faiq Ur Rahman is a web designer, digital product developer, and founder of Toolraxy, a growing platform of web-based calculators and utility tools. He specializes in building structured, user-friendly tools focused on health, finance, productivity, and everyday problem-solving.
User Ratings:
ADVERTISEMENT
ADVERTISEMENT
Cutting a rafter is a one-shot operation. Once the birdsmouth is notched and the plumb cut is made, there is no putting timber back so the length has to be right before the saw comes out. That length is the hypotenuse of a right triangle formed by the rise from plate to ridge and the run from ridge to outer wall, and getting it wrong usually traces back to one of two things: confusing run with span, or working in mixed units. This calculator takes the measurements you already have and produces the rafter length directly, along with the pitch angle you will need for the plumb cuts at both ends. It is used by carpenters laying out a cut list, owner-builders checking a truss supplier’s drawings, and anyone replacing a damaged rafter on an existing roof where the original dimensions are no longer legible.
Choose the calculation mode, Rafter length for a single rafter, or Truss count for a full roof schedule.
Under Roof Details, select which two values you can supply: Rise & Run, Rise & Pitch, or Run & Pitch.
Fill in the two fields that appear, selecting the correct unit for each.
Set the pitch unit to :12 for a ratio or ° for degrees, matching your drawings.
If you switched to truss mode, enter the Roof length measured along the eaves.
Set the Truss spacing from your design, 400 mm and 600 mm are the common metric values.
Add the Overhang where the rafter projects past the wall, plus any extra trusses for hips or gable ends.
Read the rafter length or truss count in the hero display, with rise, run and pitch listed below.
The rafter is the hypotenuse of a right triangle whose other two sides are the rise and the run. Every other figure on the page is derived from that single relationship or from the pitch angle that the triangle defines.
Formula: Rafter Length = √(Rise² + Run²)
Formula: Pitch Angle θ = atan(Rise ÷ Run)
Formula: Pitch Ratio = tan(θ) × 12
Formula: Building Span = 2 × Run
Formula: Truss Count = ⌈Roof Length ÷ Spacing⌉ + 1
Formula: Rafter with Overhang = Rafter Length + Overhang ÷ cos(θ)
Whichever two values you supply, the third is computed first, then the rafter length follows. Rise and run must both be greater than zero when they are the two known values, and pitch must fall between 0° and 89°. In truss mode, roof length and spacing must be positive, and the count always rounds up before adding the closing truss.
A carpenter is replacing a rafter on a gable roof where the pitch is known to be 7:12 and the run measures 3.6 m from ridge to outer wall. The existing rafter has a 500 mm eave overhang.
Pitch angle = atan(7 ÷ 12) = 30.26°
Rise = 3.6 × tan(30.26°) = 3.6 × 0.5833 = 2.10 m
Rafter length = √(2.10² + 3.6²) = √(4.41 + 12.96) = 4.17 m
Building span = 2 × 3.6 = 7.2 m
Pitch ratio confirmed = tan(30.26°) × 12 = 7.00:12
Slope overhang = 0.5 ÷ cos(30.26°) = 0.5 ÷ 0.8634 = 0.58 m
Total cut length = 4.17 + 0.58 = 4.75 m
The takeaway: this rafter needs 4.17 m of length from ridge to plate, and 4.75 m in total once the eave overhang is added along the slope. Note that the overhang contribution is larger than the horizontal projection, 0.58 m rather than 0.50 m because the extra length is measured along the incline, not across the ground.
Rafter length equals the square root of the rise squared plus the run squared. It is the Pythagorean theorem applied to the right triangle formed by the rise from plate to ridge, the run from ridge to wall, and the rafter itself.
Measure the run, the horizontal distance from the ridge centreline to the outer face of the wall. It is half the building’s width on a symmetrical gable. Using the full span instead doubles the calculated rafter length.
Take the arctangent of 5 divided by 12. The result is 22.62°. A 4:12 pitch is 18.43°, a 6:12 is 26.57°, and an 8:12 is 33.69°. The calculator performs this conversion automatically when the pitch unit is changed.
No. The rafter length runs from the ridge plumb cut to the outer edge of the wall plate. The overhang is a separate addition, projected along the slope by dividing the horizontal overhang by the cosine of the pitch angle. Add the two for the total cut length.
Because the calculation gives the theoretical length from ridge to plate. In practice you need extra for the ridge board thickness, for the overhang, and for any birdsmouth that removes material from the underside. Most carpenters add 50 to 100 mm of margin and trim to fit.
The run should be measured to the centreline of the ridge board, not to the far face. If the ridge is a 50 mm board, the effective run for each rafter is reduced by 25 mm. The calculator assumes you have measured the run correctly; adjust your measurement rather than the result.
In North America, 6:12 (26.57°) is the most common residential pitch, with 4:12 and 8:12 also widely used. European roofs tend to run slightly steeper. Pitches below 4:12 restrict the roofing materials that can be used.
The common rafter length calculation is the same for hip and gable roofs. Hip rafters are longer because they run diagonally to the corner of the building, and their length is calculated separately using the hip run, which is the diagonal of the half-span rectangle.
The calculator handles both. When the unit selector is set to degrees, the value is used directly as the pitch angle. When it is set to :12, it is converted using the arctangent before use. Switching between the two converts the existing value so the physical pitch stays the same.
A steeper pitch increases the rafter length for the same run. Going from a 4:12 to a 8:12 pitch on a 4 m run lengthens the rafter from 4.22 m to 4.72 m, roughly half a metre, or about 12 percent.
Yes, but the framing square is the traditional way to lay out the plumb cuts at the correct pitch. Without one, you can use the pitch angle in degrees and a protractor, or cut a template rafter and use it to mark the rest.
Fully. Every length field accepts millimetres, centimetres, metres, inches or feet, and pitch can be entered as a ratio or in degrees. The output echoes back in the unit used for the run, so a metric layout stays metric throughout.
This rafter length calculator provides geometric dimensions for planning and cutting purposes only. It does not perform structural design, does not verify rafter sizing against span tables, and does not account for snow, wind or seismic loads. Rafter dimensions depend on span, spacing, species, grade and load, none of which are captured here. Always confirm the rafter specification against the applicable building code and, where the roof spans a habitable space or carries an unusual load, consult a qualified engineer before cutting or installing material.
ADVERTISEMENT
ADVERTISEMENT