Home
Rafter Calculator
Last updated: May 31, 2026
Written by Blake Boege
A rafter calculator is a carpentry construction tool used to determine the dimensions of roof framing members. Based on the geometry of a gable roof, it treats the horizontal half-span (including any overhang) and the vertical rise as the two perpendicular sides of a right triangle. The calculator applies the Pythagorean theorem to determine the precise diagonal length of the rafter board. It also calculates the vertical rise from the wall plate to the ridge and converts the pitch into an exact angle in degrees. Carpenters and builders use this calculator to estimate lumber quantities and mark cuts.
Calculate rafter length, roof rise, and pitch angles for residential roof framing. Supports common pitches (e.g. 4/12, 6/12, 12/12) and custom profiles.
Quick Answer
Estimate roof rafter dimensions. Enter the building width, roof pitch, and overhang to calculate total rafter length, vertical rise, and pitch angle.
ESTIMATED RAFTER LENGTH
14 ft 6.4 in
Pitch: 6/12 · Angle: 26.6°
Examples
24 ft building, 6/12 pitch, no overhang
Run = 12 ft · Rise = 6 ft · Rafter Length = sqrt(12² + 6²) = 13.42 ft (13 ft 5 in)
24 ft building, 6/12 pitch, 12 in overhang
Total Run = 13 ft · Total Rise = 6.5 ft · Rafter Length = sqrt(13² + 6.5²) = 14.53 ft (14 ft 6.4 in)
30 ft building, 4/12 pitch, 18 in overhang
Total Run = 16.5 ft · Total Rise = 5.5 ft · Rafter Length = sqrt(16.5² + 5.5²) = 17.39 ft (17 ft 4.7 in)
How it works
The calculator uses the building width, roof pitch, and overhang to determine the horizontal run and vertical rise of the rafter, then applies the Pythagorean theorem.
Rafter Length Formula
Rafter Length = sqrt(Run² + Rise²)
Run and Rise Equations
- Run = (Building Width / 2) + Overhang
- Rise = Run × (Pitch / 12)
Anatomy of a Roof Frame
Framing a gable roof requires understanding several terms:
- Ridge Board: The horizontal beam at the peak of the roof where the top ends of the rafters meet.
- Wall Plate: The top horizontal framing member of the wall where the bottom of the rafter rests.
- Bird's Mouth Cut: A triangular notch cut into the rafter so that it fits flat against the top wall plate.
- Plumb Cut: The vertical cut at the top of the rafter that rests against the ridge board.
Practical Carpentry Considerations
When ordering lumber, always round up the calculated rafter length to the nearest standard board length (typically even lengths like 14, 16, or 18 feet). Additionally, remember that the calculator gives the line length from the ridge to the tail. In practice, you must subtract half of the thickness of the ridge board (typically 3/4 inch for a standard 2x ridge board) from the top plumb cut to ensure a tight fit.
Related tools
Check out our other construction and home design estimators, such as the Tile Calculator for flooring plans, and the Stair Calculator to compute riser and run dimensions.
Related Calculators
More tools from Home
Frequently asked questions
Rafter length is calculated using the Pythagorean theorem (A² + B² = C²) by modeling the half-span of the building and the roof rise as the two legs of a right triangle. The rafter length is the hypotenuse of this triangle. If you have an overhang, the run and rise of the overhang are added to the equation.
Roof pitch is a measure of the steepness of a roof, expressed as the number of inches of vertical rise for every 12 inches of horizontal run. For example, a 6/12 pitch means the roof rises 6 inches vertically for every 12 inches it extends horizontally.
The overhang extends the rafter beyond the exterior walls of the building. The calculator extends the horizontal run by the overhang width and projects the additional diagonal length required to maintain the same roof pitch angle.
The roof span is the total width of the building from the outside of one wall plate to the outside of the opposite wall plate. The run is the horizontal distance that the rafter covers from the wall plate to the ridge beam, which is exactly half of the span (excluding overhang).
To convert pitch to an angle in degrees, divide the rise by 12 to get the slope ratio, take the inverse tangent (arctangent) of that ratio, and convert the result from radians to degrees.
Most residential homes use a pitch between 4/12 and 9/12. Pitches below 4/12 are considered low slope (requiring special roofing materials), while pitches above 9/12 are considered steep slope.
Related calculators
Home
Circle Skirt Calculator
Calculate waist radius cut measurements and the total fabric yardage needed for full, half, or quarter circle skirts.
Home
Cross Stitch Calculator
Calculate the required fabric dimensions for cross-stitch projects based on stitch count, Aida fabric count, and border margins.
Home
Compression Ratio Calculator
Calculate engine compression ratio (CR) from cylinder bore, piston stroke, chamber volume, piston dish/dome, deck clearance, and gasket thickness.