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.
Inputs
Your Rafter Length Results
Geometry calculation completeRafter Geometry Diagram
Live geometryHow to Use the Rafter Length Calculator
Choose the method that matches the roof dimensions you already know. Use the diagram below for guidance.

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.
| Input | What to enter |
|---|---|
| Building span | Outside wall to outside wall |
| Roof pitch | Rise for every 12 in. of horizontal run |
| Ridge-board thickness | Actual ridge-board thickness |
| Eave overhang | Horizontal projection unless measured along the rafter |
| Trim allowance | Optional extra material for field fitting |
| Rounding | Final 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:
| Input | Value |
|---|---|
| Building span | 24 ft |
| Roof pitch | 6/12 |
| Ridge board | 1.5 in |
| Horizontal overhang | 12 in |
| Trim allowance | 0 |
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 Pitch | Roof Angle | Slope Factor | Rafter Length per 1 ft of Run |
|---|---|---|---|
| 1/12 | 4.76° | 1.0035 | 12.04 in |
| 2/12 | 9.46° | 1.0138 | 12.17 in |
| 3/12 | 14.04° | 1.0308 | 12.37 in |
| 4/12 | 18.43° | 1.0541 | 12.65 in |
| 5/12 | 22.62° | 1.0833 | 13.00 in |
| 6/12 | 26.57° | 1.1180 | 13.42 in |
| 7/12 | 30.26° | 1.1577 | 13.89 in |
| 8/12 | 33.69° | 1.2019 | 14.42 in |
| 9/12 | 36.87° | 1.2500 | 15.00 in |
| 10/12 | 39.81° | 1.3017 | 15.62 in |
| 11/12 | 42.51° | 1.3566 | 16.28 in |
| 12/12 | 45.00° | 1.4142 | 16.97 in |
| 13/12 | 47.29° | 1.4743 | 17.69 in |
| 14/12 | 49.40° | 1.5366 | 18.44 in |
| 15/12 | 51.34° | 1.6008 | 19.21 in |
| 16/12 | 53.13° | 1.6667 | 20.00 in |
| 17/12 | 54.78° | 1.7341 | 20.81 in |
| 18/12 | 56.31° | 1.8028 | 21.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.

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 run | Roof pitch | Calculated rafter length |
|---|---|---|
| 6 ft | 4/12 | 6 ft 3 7/8 in |
| 8 ft | 5/12 | 8 ft 8 in |
| 10 ft | 6/12 | 11 ft 2 3/16 in |
| 12 ft | 8/12 | 14 ft 5 1/16 in |
| 14 ft | 12/12 | 19 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.






