CALCULATORS

Rafter Length Calculator 

How to Use This Rafter Length Calculator

Use this rafter length calculator to estimate the total rafter length for a standard gable roof. Enter your building width, roof pitch, ridge beam thickness, and optional overhang to calculate the diagonal rafter line length. 

This tool is built for contractors, builders, and DIYers who need a fast, reliable estimate before cutting rafters or ordering material.

For best results, make sure your measurements match how the structure will actually be framed.

You Will Need:

Enter Measurements

*This field is required.

Rafter Length Results

Rafter Run
0 ft
Rise
0 ft
Main Rafter Length
0 ft
Overhang Run
0 ft
Overhang Rise
0 ft
Overhang Rafter Length
0 ft
Total Rafter Length Including Overhang
0 ft

Get More Accurate Measurements & Estimates with RoofSnap.

How the Rafter Length Calculator Works

This calculator uses basic roof geometry to determine rafter length. 

First, it calculates the horizontal run. For a gable roof, the run is half the total building width. If you are using a structural ridge beam, half of the beam thickness is subtracted from that measurement. 

Next, the tool calculates rise based on pitch. Roof pitch is expressed as rise per 12 inches of run. For example, a 6/12 pitch means the roof rises 6 inches for every 12 inches of horizontal run. 

Once run and rise are known, the calculator applies the Pythagorean theorem to determine the diagonal rafter length. If you include an overhang, the calculator performs the same calculation for the overhang section and adds it to the main rafter length. 

The final output reflects total rafter length, including overhang if entered.

Common Rafter Sizes and Spacing 

Rafter size depends on span, load requirements, lumber species, and local building codes. 

Common dimensional lumber sizes include:

  • 2×4 for small sheds and short spans
  • 2×6 for many residential applications
  • 2×8, 2×10, or 2×12 for longer spans or higher loads 


Typical rafter spacing is:

  • 16 inches on center
  • 24 inches on center
  • 12 inches on center in higher load conditions

 

Spacing affects structural performance and material count. Always verify span tables or engineered plans before finalizing material selection. 

When to Use a Rafter Calculator 

A rafter calculator is helpful during planning and estimating phases.

Use it when: 

  • Preparing a material takeoff 
  • Framing a new gable roof 
  • Comparing different roof pitches 
  • Adjusting overhang dimensions 
  • Planning a shed or garage build

 

While this tool provides accurate geometric calculations, it should not replace a structural engineering review when required. 

Roof Rafter Measurements Glossary

Understanding a few key terms makes rafter calculations much easier. 

Building Width 

This is the full width of the structure from one exterior wall to the other. Most builders measure outside to outside of framing. Consistency is more important than the exact reference point. 

Roof Pitch 

Pitch describes the steepness of the roof. It is written as rise over 12. A 4/12 pitch rises 4 inches for every 12 inches of horizontal run. 

Ridge Beam vs Ridge Board 

A ridge beam is structural and has thickness that affects run calculations. A ridge board is typically used for alignment and fastening and may not require the same adjustment. Confirm which type you are using before entering beam thickness. 

Rise

The vertical height gained over the run. Rise is determined by roof pitch. 

Run

The horizontal distance from the ridge centerline to the outside wall. For most gable roofs, this equals half the building width with adjustments for ridge beam thickness if applicable. 

Rafter Length 

Also called rafter line length, this is the diagonal measurement from ridge to wall. 

Overhang

The horizontal extension of the rafter beyond the exterior wall. The calculator converts this horizontal measurement into its diagonal equivalent using the same pitch. 

Rafter Calculator FAQs 

How long should my rafters be for a given roof pitch?

Rafter length depends on the horizontal run and the roof pitch. A steeper pitch increases rise, which increases diagonal length. Enter your building width and pitch to calculate the exact measurement. 

What measurements do I need to use a rafter calculator?

You need building width and roof pitch at minimum. For more precise results, include ridge beam thickness and overhang length. 

Does the calculator include roof overhangs?

Yes. If you enter an overhang measurement, the calculator adds the diagonal length of that section to the total rafter length. 

How many rafters do I need for my roof?

Rafter count depends on roof length and spacing. Divide the total roof length by your chosen on-center spacing and add one for the starting position. Multiply by two for both sides of a gable roof. 

What is standard rafter spacing?

Sixteen inches on center is common in residential construction. Twenty-four inches on center is also widely used depending on design and load requirements. 

Can I use this calculator for sheds or garages?

Yes. This calculator works for standard gable roofs on homes, sheds, and garages as long as the roof is symmetrical. 

Does roof pitch affect rafter length?

Yes. As the roof pitch increases, the rise increases, which results in a longer diagonal rafter length. 

Is this calculator accurate for remodeling projects?

It provides a strong estimate. However, remodeling projects often include irregular framing conditions. Field measurements should always be verified before cutting material. 

Can this calculator be used for hip or valley roofs?

This tool is designed for common rafters on a gable roof. Hip and valley rafters require different calculations. 

Should I double-check measurements before cutting rafters?

Yes. Always confirm measurements, ridge type, and framing layout before making cuts. Small errors in calculation can lead to material waste and framing issues. 

Get More Accurate Measurements & Estimates with RoofSnap