Calculate common rafter length, pitch angle, and rise/run for residential roof framing. Includes IRC code reference values.
Enter the building width in feet, the roof pitch as rise per 12 inches of run, and the overhang in inches. A 6/12 pitch means the roof gains 6 inches of height for every 12 inches it travels horizontally. The calculator takes the run as half the building width, assuming a ridge centered over the structure.
The common rafter line length is the hypotenuse of the run-rise triangle: run × √(1 + (rise/12)²). For a 24 ft wide building at 6/12 pitch, the run is 12 ft, the ridge sits 6 ft above the wall plate (run × rise/12), and the line length is about 13.42 ft at a 26.6° pitch angle.
The total rafter result adds the overhang measured along the same slope, since the tail continues at the roof angle. Lengths are measured to the ridge centerline — the calculator does not deduct ridge-board thickness, so subtract half the ridge thickness when laying out your cut.
Pitch is expressed as inches of vertical rise per 12 inches of horizontal run. A 6/12 roof rises 6 inches per foot of run, which corresponds to a slope angle of about 26.6° — the arctangent of 6/12. Enter just the rise number; the 12 is implied.
For a gable roof with a centered ridge, the run is half the building width. A 28 ft wide building gives each rafter a 14 ft run, so at 6/12 pitch the line length is 14 × √(1 + 0.25) ≈ 15.65 ft.
Two results are reported: the line length from wall plate to ridge, and the total rafter, which extends the line length by the overhang projected along the slope — an overhang entered in inches is converted to feet and multiplied by √(1 + (rise/12)²).
Ridge height equals run × (rise/12). A 12 ft run at 8/12 pitch puts the ridge 8 ft above the top plate. This is the theoretical height to the measuring line, before accounting for the rafter stock standing above the birdsmouth.