Rafter Length Calculator

Rafter Length Calculator

Calculate common rafter length, rise, and overhang

1/12 2/12 3/12 4/12 5/12 6/12 7/12 8/12 9/12 10/12 11/12 12/12

Calculation Summary

Total Rafter Length:

(Including Overhang)

Common Rafter (Hypotenuse):

(Wall to Ridge)

Roof Rise:

Total Run per Side:

How to Calculate Rafter Length

Calculating the correct length for your roof rafters is a critical step in framing a shed, garage, or house. To get the most accurate measurement, you must account for the total span of the building, the thickness of the ridge board, and your desired roof pitch.

The Geometry of a Rafter

A standard rafter forms the hypotenuse of a right-angled triangle. The three main components are:

  • Run: Half of the building span minus half the thickness of the ridge board.
  • Rise: The vertical height of the roof from the top plate to the peak.
  • Line Length: The diagonal distance from the outside of the wall plate to the center of the ridge.

Standard Pitch Table

The "Pitch" is the amount of vertical rise for every 12 inches of horizontal run. Common pitches include:

Pitch (in 12) Angle (Degrees) Common Use
3/12 14.04° Sheds / Low Slope
4/12 18.43° Standard Residential
6/12 26.57° Steep Residential
12/12 45.00° A-Frame / Very Steep

Practical Example

If you have a building that is 20 feet wide (240 inches) and you are using a 2x ridge board (1.5 inches thick) with a 4/12 pitch:

  1. Step 1 (Run): (240 – 1.5) / 2 = 119.25 inches.
  2. Step 2 (Rise): 119.25 * (4/12) = 39.75 inches.
  3. Step 3 (Hypotenuse): √(119.25² + 39.75²) = 125.7 inches (approx 10′ 5 11/16″).

Note: Always remember to add the length of your overhang to this measurement to find the total lumber length required.

function calculateRafter() { // Inputs var spanFt = parseFloat(document.getElementById('spanFeet').value) || 0; var spanIn = parseFloat(document.getElementById('spanInches').value) || 0; var pitchVal = parseFloat(document.getElementById('roofPitch').value); var ridgeThick = parseFloat(document.getElementById('ridgeThickness').value) || 0; var overhangVal = parseFloat(document.getElementById('overhang').value) || 0; // Convert total span to inches var totalSpanInches = (spanFt * 12) + spanIn; if (totalSpanInches = 0.875) { remInches++; fraction = 0; } else if (fraction >= 0.75) fracStr = " 3/4″; else if (fraction >= 0.625) fracStr = " 5/8″; else if (fraction >= 0.5) fracStr = " 1/2″; else if (fraction >= 0.375) fracStr = " 3/8″; else if (fraction >= 0.25) fracStr = " 1/4″; else if (fraction >= 0.125) fracStr = " 1/8″; if (remInches === 12) { feet++; remInches = 0; } return feet + "' " + remInches + fracStr + '" (' + totalInches.toFixed(2) + ' in)'; } // Display Results document.getElementById('resRun').innerText = formatInches(run); document.getElementById('resRise').innerText = formatInches(rise); document.getElementById('resCommonLength').innerText = formatInches(rafterHypotenuse); document.getElementById('resTotalLength').innerText = formatInches(totalRafterLength); document.getElementById('rafterResult').style.display = 'block'; }

Leave a Comment