Rafter Length Calculator
Rafter Framing Layout Summary
What Is a Rafter Length Calculator?
A rafter length calculator determines the sloped length of a roof rafter using the horizontal building span and roof pitch. It can account for eave overhang and ridge board thickness, then estimate the total rafter length, plumb and seat cut angles, vertical roof rise, and suitable stock lumber length.
Rafters are sloped framing members that support a roof. Their length depends on the horizontal distance they cover and the roof’s angle. A steeper roof generally needs longer rafters for the same horizontal run.
This calculator supports two roof styles: a symmetrical gable roof, which uses half the building span for each rafter run, and a shed or mono-pitch roof, which uses the full span.
Measurements can be entered in feet, inches, or meters. The calculator displays the main length in feet and inches, with additional decimal-foot and optional metric values. Its results are framing geometry estimates, not structural approval or finished cutting instructions.
How the Rafter Length Formula Works
The calculator uses roof geometry and the Pythagorean theorem to determine rafter length. It first calculates the horizontal run, adjusts that run for ridge board thickness when applicable, and converts it into sloped length using the selected pitch. It then adds the sloped length of the eave overhang.
1. Determine the Horizontal Rafter Run
The horizontal run is the distance a rafter covers from the supporting wall toward the roof’s ridge or upper end.
For a gable roof, the calculator divides the building span by two. For a shed roof, it uses the full building span.
Where:
- Rg = theoretical horizontal run for a gable roof
- Rs = theoretical horizontal run for a shed roof
- S = building span, measured wall to wall
For example, a gable roof with a 24-foot building span has a theoretical run of 12 feet on each side. A shed roof with the same span uses a 24-foot run.
2. Apply the Ridge Board Deduction
For gable roofs, the calculator reduces the theoretical horizontal run by half the selected ridge board thickness. This accounts for the ridge board occupying space at the center of the roof.
Here, Rn is the net horizontal run and T is the ridge board thickness. Both measurements must use the same unit.
For a 24-foot span, the theoretical half-run is 144 inches. Using a 1.5-inch ridge board produces a deduction of 0.75 inches, leaving a net horizontal run of 143.25 inches.
The calculator offers 1.5-inch, 0.75-inch, 1.75-inch, and zero-thickness ridge options. For shed roofs, it ignores the ridge selection and applies no ridge deduction.
3. Calculate the Roof Pitch Multiplier
Roof pitch describes how much a roof rises vertically for every 12 inches of horizontal run. A 6:12 pitch means the roof rises 6 inches for each 12 inches of horizontal distance.
The calculator converts roof pitch into a slope multiplier using this formula:
Where F is the slope multiplier and P is the vertical rise in inches per 12 inches of horizontal run.
For a 6:12 pitch, the multiplier is approximately 1.118. This means each foot of horizontal run corresponds to approximately 1.118 feet of sloped rafter length.
The calculator supports standard preset pitches from 2:12 through 12:12. It also accepts a custom rise per 12-inch run or a roof angle in degrees.
4. Calculate Rafter Length Including Overhang
The calculator multiplies the net horizontal run by the pitch multiplier to find the sloped building-line length. It separately calculates the sloped eave tail length from the entered horizontal overhang.
The total rafter length is the sum of these two sloped lengths:
Where:
- Lr = total calculated rafter length
- Lb = sloped building-line length
- Lt = sloped eave tail length
- Rn = net horizontal run after any ridge deduction
- O = horizontal eave overhang
- P = roof pitch rise per 12-inch horizontal run
For a shed roof, the net run is the full span because no ridge board deduction is applied.
5. Calculate Roof Rise and Cutting Angles
The calculator also estimates the vertical rise from the net horizontal run and the selected pitch.
Here, H is the calculated vertical rise. The entered horizontal overhang is not included in this rise measurement.
The roof slope angle is calculated using the arctangent of the pitch ratio:
When the angle is expressed in degrees, the calculator reports it as the plumb cut angle. It calculates the displayed seat cut angle as the complement:
If you select Roof Angle in Degrees, the calculator converts your entered angle into an equivalent rise per 12-inch run before calculating the rafter dimensions.
The entered angle must be at least 0 degrees and less than 75 degrees. The custom-rise option accepts a rise from 0 through 36 inches per 12-inch run.
6. Estimate Rafter Quantity From Building Length
If you provide the optional building length, the calculator estimates the number of rafters using the selected on-center spacing.
Where Ns is the calculated number of rafters per roof slope, B is building length in feet, and C is selected spacing in inches.
The calculator multiplies this result by two for a gable roof or by one for a shed roof.
For a 36-foot building with 16-inch spacing, the calculator calculates 28 rafters per slope. A gable roof therefore produces an estimate of 56 total rafters, while a shed roof produces 28.
This calculation rounds the number of spacing intervals downward before adding one rafter. If the building length is not an exact multiple of the selected spacing, the estimate may not include a separate rafter at the far end while maintaining that maximum spacing. Check the actual framing layout before ordering.
How to Use the Rafter Length Calculator
- Select your roof style. Choose Gable / Double-Slope or Shed / Mono-Pitch.
- Choose the input unit. Select feet, inches, or meters for your measurements.
- Enter the building span. Provide the positive wall-to-wall width of the building.
- Enter the eave overhang. Specify the horizontal tail projection in the selected unit. Enter zero if no overhang is required.
- Choose the slope input method. Select a standard roof pitch, enter a custom rise per 12-inch run, or provide the roof angle in degrees.
- Select ridge board thickness. For a gable roof, choose 1.5 inches, 0.75 inches, 1.75 inches, or no ridge deduction.
- Select rafter spacing. Choose 12, 16, or 24 inches on center.
- Enter the optional building length. Provide this measurement if you want an estimated total rafter count.
- Click Calculate Rafters. Review the total cut length, building-line length, overhang tail, net run, roof rise, cutting angles, lumber stock length, and optional rafter quantity.
The main result displays total rafter length in feet and inches rounded to the nearest 1/16 inch. It also shows decimal feet to two places. If meters are selected, the result additionally includes the calculated length in meters to three decimal places.
The Reset button clears the entered span and optional building length, restores the gable roof style, feet as the input unit, a 1-foot overhang, 6:12 pitch, 1.5-inch ridge board, and 16-inch rafter spacing. It also hides the previous results.
Rafter Length Calculation Example
Consider a hypothetical gable roof with the following inputs:
- Building span: 24 feet
- Roof style: Gable / Double-Slope
- Roof pitch: 6:12
- Horizontal eave overhang: 1 foot
- Ridge board thickness: 1.5 inches
- Rafter spacing: 16 inches on center
- Building length: 36 feet
The theoretical horizontal run is 12 feet, or 144 inches. Subtracting half the ridge board thickness leaves 143.25 inches. Adding the 12-inch horizontal overhang gives an adjusted horizontal distance of 155.25 inches.
Multiplying this distance by the 6:12 pitch factor of approximately 1.118034 gives a total calculated rafter length of 173.57 inches, or approximately 14.46 feet.
| Calculation | Calculator Result |
|---|---|
| Theoretical Half-Span Run | 12 ft |
| Half-Ridge Deduction | 0.75 in |
| Net Horizontal Run | 11 ft 11 1/4 in |
| Building-Line Rafter Length | 13 ft 4 3/16 in |
| Sloped Overhang Tail | 1 ft 1 7/16 in |
| Total Rafter Length | 14 ft 5 9/16 in |
| Decimal Rafter Length | 14.46 ft |
| Roof Pitch | 6.00:12 |
| Plumb Cut Angle | 26.57° |
| Seat Cut Angle | 63.43° |
| Total Peak Rise | 5 ft 11 5/8 in |
| Suggested Stock Length | 16 ft standard board |
| Rafters Per Slope | 28 |
| Total Rafters | 56 |
The calculator selects a 16-foot standard board because its predefined stock-length list contains no 14-foot board long enough for the calculated 14.46-foot rafter. The stock selection is based on calculated length alone, not an evaluation of lumber strength or grade.
What to Check Before Cutting Roof Rafters
Confirm the Correct Roof Style and Span
The roof style has a major effect on rafter length. For a gable roof, the calculator assumes the ridge is centered and uses half the building span. For a shed roof, it uses the entire span.
Entering the wrong roof style can produce substantially different dimensions. The calculator does not model an off-center ridge, different slopes on opposite sides, or complex roof intersections.
Understand the Ridge Deduction
The ridge board selection adjusts the horizontal run by half the ridge thickness. This adjustment affects the building-line rafter length and calculated rise. Selecting None / Centerline Only removes the deduction entirely.
The ridge option is disabled for shed roofs, and the calculation uses zero ridge thickness regardless of the previous selection.
Check Lumber Stock Length
The calculator searches its stored list of standard board lengths: 8, 10, 12, 14, 16, 18, 20, 22, and 24 feet. It selects the shortest listed length that is at least as long as the calculated rafter.
If the calculated length exceeds the available listed lengths, the tool displays an upward-rounded whole-foot length and a custom or engineered material note. It does not determine whether that material is structurally suitable.
Verify Birdsmouth Bearing and Structural Requirements
A birdsmouth is a notch cut into a rafter so it can rest on a supporting wall plate. The calculator displays a fixed minimum bearing reference of 1.5 inches.
However, it does not ask for birdsmouth depth, seat width, or actual bearing length. It therefore does not verify a proposed birdsmouth cut or determine whether the rafter satisfies applicable structural requirements.
The displayed cut length is a geometric estimate. Final layout and cutting dimensions may need adjustments for the specific ridge connection, bearing details, lumber dimensions, and construction method. Confirm the design and required bearing with a qualified framing professional.
Check Rafter Spacing and Building Length
The selected spacing affects the optional rafter quantity, not the individual rafter cut length. If the building length field is empty, zero, or otherwise not a positive number, the calculator omits the quantity estimate and displays stock-length guidance instead.
Rafter spacing must also be suitable for the roof loads, lumber species, grade, and structural design. The calculator does not verify load capacity or provide a structural span approval.
Frequently Asked Questions
How do I calculate rafter length for a 6:12 roof?
Multiply the horizontal rafter run by approximately 1.118 to calculate the sloped length for a 6:12 pitch. For example, a 12-foot run without a ridge deduction produces a sloped length of approximately 13.42 feet before overhang. This calculator also accounts for selected ridge thickness and horizontal eave overhang.
Does rafter length include the roof overhang?
Yes. The calculator adds the sloped length of the entered horizontal eave overhang to the building-line rafter length. The overhang is multiplied by the same roof pitch factor. Enter zero if no overhang is required or if you only want the calculated length to the wall line.
What is the difference between rafter run and rafter length?
Rafter run is the horizontal distance from the support toward the ridge or upper end. Rafter length is the sloped distance along the roof framing member. The length increases as the roof pitch increases. This calculator also separates building-line rafter length from the additional sloped overhang tail.
Can I enter a roof angle instead of a pitch ratio?
Yes. Select Roof Angle in Degrees under Slope Input Method and enter an angle from 0 degrees to less than 75 degrees. The calculator converts that angle into an equivalent rise per 12-inch run and calculates rafter length, rise, and cutting angles using the converted pitch.
How many rafters do I need for a 36-foot-long gable roof?
At 16-inch on-center spacing, this calculator estimates 28 rafters per slope for a 36-foot building length. Because a gable roof has two slopes, the displayed total is 56 rafters. Other building lengths or spacing selections produce different counts. Verify end placement and the final framing layout separately.
Can the calculator measure rafters in meters or inches?
Yes. The calculator accepts feet, inches, or meters for span, overhang, and optional building length. It converts the inputs to inches for its calculations. The main result appears in feet and inches and decimal feet, with an additional metric length when meters are selected.
Does the calculator verify whether a rafter is strong enough?
No. The calculator estimates rafter geometry, cutting angles, stock length, and optional quantity. It does not calculate load capacity, deflection, allowable span, or structural strength. Those requirements depend on lumber species, grade, member dimensions, spacing, roof loads, connections, and applicable building standards.