Rafter Length Calculator for Roof Pitch, Span & Overhang

Use this rafter length calculator to calculate common rafter length from the building span, roof pitch, ridge-board thickness, and eave overhang.

Get the total rafter length in feet and fractional inches, plus the horizontal run, rise, roof angle, slope factor, and sloping overhang.

Rafter Length Calculator

Calculate common rafter line length from roof span, run, rise, pitch, ridge-board thickness, eave overhang and cutting allowance.

1

Inputs

Step 1
Calculation method
Enter the building span
Building span
ft
in
m
Measure the full outside-to-outside wall span for a symmetrical gable roof.
Ridge board thickness
in
mm
The calculator deducts half the ridge thickness from each rafter run.
Enter the horizontal rafter run
Horizontal run to outside wall
ft
in
m
Enter the horizontal distance from the ridge plumb-cut line to the outside wall. Do not add the overhang here.
Enter roof rise and horizontal run
Horizontal run
ft
in
m
Vertical rise
ft
in
m
Enter the roof pitch
/12
Example: enter 6 for a 6/12 roof pitch.
Add overhang and cutting allowance
Eave overhang
in
mm
Trim allowance
in
mm
Optional extra material beyond the calculated line length.

Your Rafter Length Results

Geometry calculation complete
Total common rafter line length
Rafter length to outside wallRidge plumb-cut line to wall line
Sloping overhang lengthWall line to rafter tail
Adjusted horizontal runBefore adding the overhang
Vertical riseRise over the adjusted run
Roof angleAngle above horizontal
Equivalent roof pitchRise per 12 units of run
Slope factorRafter length per unit of run
Decimal feetUseful for material estimates
Total inchesBefore fractional rounding
Total millimetresMetric equivalent
Suggested minimum stock lengthNext common 2-foot increment; verify availability
Rafter Geometry Diagram
Live geometry
Pitch: — Run: — Rise: — Rafter to wall: — Sloping overhang Outside wall / top plate line Ridge board face / plumb cut
Rafter length is not rafter size. This calculator determines roof geometry and cutting length. Lumber size depends on unsupported span, spacing, species, grade, roof loads, deflection limits and local building requirements. Verify field dimensions before cutting.

How to Use the Rafter Length Calculator

Choose the method that matches the roof dimensions you already know. Use the diagram below for guidance.

Common rafter geometry showing span, adjusted run, rise, roof pitch, rafter length, and horizontal overhang for rafter length calculator.
Common rafter geometry showing span, adjusted run, rise, roof pitch, rafter length, and horizontal overhang.

Span + Pitch is the best option for most simple gable roofs. Enter the full building span, roof pitch, ridge-board thickness, and eave overhang. The calculator determines the rafter run before calculating the final rafter length.

Run + Pitch works when you already know the horizontal distance from the ridge-board face to the outside wall line.

Rise + Run calculates rafter length directly from the two sides of the roof triangle. I find this useful when checking the geometry of an existing roof.

Use actual field dimensions where possible. A small difference at the ridge or roof edge can affect the final rafter length enough to matter when laying out cuts.

InputWhat to enter
Building spanOutside wall to outside wall
Roof pitchRise for every 12 in. of horizontal run
Ridge-board thicknessActual ridge-board thickness
Eave overhangHorizontal projection unless measured along the rafter
Trim allowanceOptional extra material for field fitting
RoundingFinal fractional-inch precision

What Rafter Length Does the Calculator Give?

The main result is the common rafter length from the ridge-board face to the rafter tail.

I separate rafter length into two useful dimensions.

Rafter length to the outside wall is the sloping distance from the ridge-board face to the outside wall or top-plate line.

Sloping overhang length is the additional rafter length between the wall line and the rafter tail.

The calculator adds these dimensions and then includes any trim allowance you enter.

Rafter length vs board length

The calculated rafter length represents the finished roof geometry. It is not necessarily the exact stock length I would order.

The board needs enough material for the ridge plumb cut, tail detail, fascia position, and small field adjustments.

For example, a calculated rafter length of 14 ft 5 9/16 in does not mean I would order a board already cut to exactly that dimension.

Rafter Length Formula

A common rafter forms the hypotenuse of a right triangle.

The basic rafter length formula is:

Rafter length = √(run² + rise²)

When the roof pitch is known instead of the vertical rise, you can calculate the rafter length using a slope factor.

1. Calculate the adjusted rafter run

For a symmetrical gable roof with a conventional ridge board:

Adjusted run = building span ÷ 2 − ridge-board thickness ÷ 2

The ridge board sits between the opposing rafters. Each side therefore accounts for half its thickness.

2. Calculate the roof slope factor

For roof pitch expressed as rise per 12 inches of horizontal run:

Slope factor = √(12² + pitch²) ÷ 12

For a 6/12 roof:

Slope factor = 1.11803

This means each foot of horizontal run requires about 1.118 feet of rafter length along the roof slope.

3. Calculate rafter length to the wall

Multiply the adjusted horizontal run by the slope factor:

Rafter length to wall = adjusted run × slope factor

This gives the rafter length from the ridge-board face to the outside wall line.

4. Convert the roof overhang to rafter length

A horizontal eave overhang is shorter than its corresponding length along the sloping rafter.

For a horizontally measured overhang:

Sloping overhang = horizontal overhang × slope factor

This conversion becomes increasingly important on steeper roofs.

5. Calculate total rafter length

Finally:

Total rafter length = rafter length to wall + sloping overhang + trim allowance

The calculator keeps full precision through the calculation and rounds only the final displayed rafter length.

Rafter Length Example for a 24 ft Span and 6/12 Pitch

Consider a simple gable roof with the following dimensions:

InputValue
Building span24 ft
Roof pitch6/12
Ridge board1.5 in
Horizontal overhang12 in
Trim allowance0

Half the building span is:

24 ft ÷ 2 = 12 ft = 144 in

Half of the 1.5-inch ridge-board thickness is:

0.75 in

The adjusted rafter run is therefore:

144 − 0.75 = 143.25 in

or:

11 ft 11 1/4 in

A 6/12 roof has a slope factor of approximately:

1.11803

The rafter length from the ridge to the outside wall is:

143.25 × 1.11803 = 160.16 in

Rounded to the nearest 1/16 inch:

Rafter length to wall = 13 ft 4 3/16 in

Now calculate the rafter length needed for the 12-inch horizontal overhang:

12 × 1.11803 = 13.42 in

That is approximately:

1 ft 1 7/16 in

The total common rafter length is therefore approximately:

14 ft 5 9/16 in

Roof Pitch and Rafter Length Table

Roof pitch has a direct effect on rafter length. A shallow roof keeps the rafter relatively close to the horizontal run, while a steeper pitch increases the slope factor and requires a longer rafter for the same run.

The table below shows the roof angle, slope factor, and rafter length required for every 1 foot of horizontal run. The values exclude ridge-board deductions, eave overhangs, and cutting allowances.

Roof PitchRoof AngleSlope FactorRafter Length per 1 ft of Run
1/124.76°1.003512.04 in
2/129.46°1.013812.17 in
3/1214.04°1.030812.37 in
4/1218.43°1.054112.65 in
5/1222.62°1.083313.00 in
6/1226.57°1.118013.42 in
7/1230.26°1.157713.89 in
8/1233.69°1.201914.42 in
9/1236.87°1.250015.00 in
10/1239.81°1.301715.62 in
11/1242.51°1.356616.28 in
12/1245.00°1.414216.97 in
13/1247.29°1.474317.69 in
14/1249.40°1.536618.44 in
15/1251.34°1.600819.21 in
16/1253.13°1.666720.00 in
17/1254.78°1.734120.81 in
18/1256.31°1.802821.63 in

The slope factor provides a quick way to estimate rafter length.

For example, a 10-foot horizontal run at a 6/12 pitch gives:

10 × 1.11803 = 11.18 ft

That is the approximate rafter length before adding an eave overhang or cutting allowance.

How to Measure for Rafter Length

Accurate measurements are more important than adding extra decimal places to the calculation.

Measure the building span horizontally

For a simple symmetrical gable roof, measure from one outside wall line to the other.

Do not use the entire building span as the rafter run.

Each common rafter covers approximately half the building width before the ridge-board adjustment.

Measure the actual ridge-board thickness

Use the actual ridge-board thickness rather than only the nominal lumber size.

For example, nominal 2-inch dimensional lumber is commonly about 1.5 inches thick. Each opposing rafter therefore accounts for approximately 0.75 inch.

A structural ridge beam is different from a conventional ridge board. Its framing arrangement should follow the structural design rather than being assumed from this rafter length calculation.

Measure the roof overhang correctly

Determine whether the overhang measurement is horizontal or taken along the roof slope.

This distinction affects the final rafter length.

A 12-inch horizontal overhang on a 6/12 roof requires approximately 13.42 inches of rafter length along the slope.

If the eave will have an enclosed soffit, the horizontal wall-to-fascia dimension can also be used with our soffit calculator.

Once the fascia and roof-edge layout are established, use our gutter installation cost calculator to estimate gutter and downspout costs.

Confirm the roof pitch

A 6/12 roof pitch means the roof rises 6 inches for every 12 inches of horizontal run.

That corresponds to a roof angle of approximately 26.57°.

The 12-inch dimension is horizontal. It is not measured along the rafter.

Common Rafter Length Mistakes

The rafter length formula is straightforward. Most errors come from using the wrong input dimension.

Using the full building span as the rafter run.
For a symmetrical gable roof, start with approximately half the building width.

Forgetting the ridge-board thickness.
This can make the calculated rafter length slightly too long.

Adding the horizontal overhang directly to the rafter length.
Convert it to the sloping overhang length first.

Confusing horizontal run with rafter length.
Run is measured horizontally. Rafter length follows the roof slope.

Rounding too early.
Keep full precision until the final rafter length is calculated.

Buying stock equal to the exact calculated rafter length.
Leave sufficient material for the final cuts and roof-edge detail.

Using rafter length to determine rafter size.
Geometric length does not tell you whether the roof requires a 2×6, 2×8, or another member size.

Does a Birdsmouth Change Rafter Length?

A birdsmouth changes the cut geometry at the wall, but it normally does not change the basic top-edge rafter length from the ridge to the rafter tail.

The seat cut allows the rafter to bear on the top plate. The heel cut forms the vertical portion of the notch. This is shown in diagram below.

Rafter birdsmouth detail showing the rafter, seat cut, heel cut, double top plate, and wall stud.
Birdsmouth detail showing the seat cut and heel cut bearing on a double top plate.

I would not subtract the birdsmouth depth from the longitudinal rafter length. The notch removes material from the rafter section rather than shortening the roof triangle in that way.

The birdsmouth also affects the remaining structural depth of the rafter, so its size should follow the applicable framing requirements.

Rafter Length vs Rafter Span

Rafter length and rafter span are not the same measurement.

Rafter length follows the slope of the roof from the ridge toward the eave.

Rafter span is a structural dimension used when selecting and checking the framing member.

IRC states that rafter spans are measured along the horizontal projection of the rafter.

The American Wood Council also bases rafter span checks on factors including lumber species, grade, spacing, loading, and deflection.

This means a 14-foot rafter length does not automatically tell you whether the framing requires a 2×6, 2×8, or 2×10.

For rafter count, on-center spacing, and roof framing layout, use our rafter spacing calculator.

Rafter Length Calculator Methodology

This rafter length calculator uses right-triangle geometry.

In Span + Pitch mode, I first divide the building span between the two roof sides. The calculator then deducts half the ridge-board thickness to establish the adjusted horizontal run.

The roof pitch determines the vertical rise, roof angle, and slope factor.

When an overhang is entered as a horizontal projection, the calculator converts it into its actual sloping rafter length before adding it to the ridge-to-wall dimension.

Intermediate calculations retain full numerical precision. Fractional-inch rounding is applied only when the final rafter length is displayed.

Rafter length calculation validation

I tested the core rafter length calculations across several roof pitches and horizontal runs using independent Pythagorean calculations.

Horizontal runRoof pitchCalculated rafter length
6 ft4/126 ft 3 7/8 in
8 ft5/128 ft 8 in
10 ft6/1211 ft 2 3/16 in
12 ft8/1214 ft 5 1/16 in
14 ft12/1219 ft 9 9/16 in

Each test produced the expected right-triangle rafter length before the final fractional-inch rounding.

The calculator then extends the basic rafter length equation by accounting for ridge-board thickness, horizontal or sloping overhang, trim allowance, and multiple calculation methods.

FAQs

How do I calculate rafter length from roof pitch?

Find the horizontal run and multiply it by the roof slope factor.
For an X/12 roof pitch:
Slope factor = √(12² + X²) ÷ 12
Then:
Rafter length = run × slope factor

Is rafter run half the building span?

For a simple symmetrical gable roof, half the building span is the starting run. When a conventional ridge board sits between the opposing rafters, deduct half its actual thickness from each side.

Does rafter length include the roof overhang?

It depends on how the rafter length is stated.
This calculator gives the ridge-to-wall rafter length separately. It then adds the sloping eave overhang to calculate the total rafter length to the tail.

Do you subtract the ridge-board thickness when calculating rafter length?

Yes, when opposing common rafters meet a conventional centered ridge board.
Each rafter accounts for half the actual ridge-board thickness when determining the horizontal run.

What is the rafter length for a 24 ft span and 6/12 pitch?

With a 1.5-inch ridge board, the rafter length from the ridge-board face to the outside wall is approximately 13 ft 4 3/16 in.
With a 12-inch horizontal overhang, the total rafter length becomes approximately 14 ft 5 9/16 in.

Is rafter length the same as rafter span?

No.
Rafter length follows the roof slope. Structural rafter span is based on the horizontal projection used when checking allowable lumber size and capacity.


Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *