Rafter Length Calculator
Rafter length, run, rise, and cut angle from span, pitch, ridge, and overhang.
What it does
A common rafter is the sloping board that runs from the ridge to the wall plate. Its length is the number a framer needs before buying lumber or setting a cut. The board is the diagonal of a right triangle, so the length follows from two measurements: the horizontal run and the vertical rise.
The run is not the full building span. It is half the span, minus half the ridge thickness, plus any eave overhang. The ridge board takes up space at the top, and the rafter meets the side of that board rather than its center. The overhang adds horizontal distance past the wall, and it also adds rise to the tail.
The rise comes from the roof pitch. Pitch is written as inches of rise per 12 inches of run, such as 6/12. A 6/12 roof rises half a foot for every foot of run, so the rise is the run multiplied by 6 and divided by 12. The rafter length is the square root of the run squared plus the rise squared.
This calculator returns the rafter length along the top edge, the total run, the total rise, the common rafter length to the wall line without the tail, and the roof angle in degrees. The default example is a 24 ft span with a 6/12 pitch, a 2 ft overhang, and a 1.5 in ridge board. The same numbers convert to metric when that mode is active.
The result is a framing length, not a structural approval. Rafter size and spacing still come from the local code or the lumber span tables. Hips, valleys, and jack rafters need a different layout because their runs are not the same as a common rafter. Field measure the span and check the ridge before cutting a full set.
How to use
- Pick imperial or metric. The calculator converts the same geometry either way.
- Measure the building span from the outside of one wall to the outside of the other wall.
- Enter the roof pitch as inches of rise per 12 inches of run.
- Enter the horizontal eave overhang and the ridge board thickness. Use 0 for the ridge on a shed-style roof with no ridge board.
- Read the rafter length, run, rise, common rafter to the wall, and roof angle.
- Cut one test rafter and test the fit before cutting the rest of the set.
Formula
- span
- Full building width from outside wall to outside wall, in feet or meters.
- pitch
- Inches of vertical rise per 12 inches of horizontal run.
- ridge thickness
- Thickness of the ridge board; half is deducted from the run.
- overhang
- Horizontal distance from the wall to the tail of the rafter.
- run
- Horizontal distance from the ridge to the tail, in the same unit as the span.
- rise
- Vertical height gained over the run, in the same unit as the run.
The subtraction of half the ridge thickness assumes the rafter butts against the side of a centered ridge board. If the ridge is not centered or the rafters meet at a peak without a board, set the ridge thickness to 0. The overhang is added to the run before the rise is calculated, which is why the tail rises with the roof. The angle is the inverse tangent of pitch divided by 12. A hip or valley rafter runs diagonally in plan, so its run is longer than the common run and this formula does not apply.
Worked example
Example: 24 ft span, 6/12 pitch, 2 ft overhang
A gable roof spans 24 ft, has a 6/12 pitch, a 2 ft eave overhang, and a 1.5 in ridge board.
- Half the span is 24 / 2 = 12.00 ft.
- Half the ridge thickness is 1.5 / 12 / 2 = 0.0625 ft.
- Run to the wall is 12.00 - 0.0625 = 11.9375 ft.
- Add the overhang: total run = 11.9375 + 2 = 13.9375 ft.
- Rise = 13.9375 x 6 / 12 = 6.96875 ft.
- Rafter length = sqrt(13.9375^2 + 6.96875^2) = 15.58 ft.
- The common rafter to the wall is sqrt(11.9375^2 + 5.96875^2) = 13.35 ft, and the roof angle is 26.6 degrees.
Reference table
| Pitch | Run (ft) | Rise (ft) | Rafter (ft) | Angle |
|---|---|---|---|---|
| 3/12 | 13.94 | 3.48 | 14.37 | 14.0° |
| 4/12 | 13.94 | 4.65 | 14.69 | 18.4° |
| 6/12 | 13.94 | 6.97 | 15.58 | 26.6° |
| 8/12 | 13.94 | 9.29 | 16.75 | 33.7° |
| 10/12 | 13.94 | 11.62 | 18.15 | 39.8° |
| 12/12 | 13.94 | 13.94 | 19.71 | 45.0° |
Limits
- Common rafters only. Hip, valley, and jack rafters need a different plan layout and formula.
- Does not size the lumber or check span, loading, snow, wind, or seismic requirements.
- Assumes straight lumber, a level wall plate, and a ridge board centered over the span.
- Local code, engineer stamps, and field measurements override any number from this page.
Common mistakes
- Using the full building span as the run instead of half the span.
- Forgetting to deduct half the ridge thickness at the top.
- Adding the overhang to the finished rafter length instead of to the run.
- Mixing inches of pitch with feet of run without converting.
- Cutting the whole set before testing one rafter against the actual ridge and wall.
Try it yourself
Quick checks. Answers sit tucked under each question.
A 20 ft span, 4/12 pitch, 1 ft overhang, 1.5 in ridge. What is the rafter length?
Run = 10 - 0.0625 + 1 = 10.9375 ft. Rise = 3.65 ft. Rafter = 11.53 ft. Common rafter to the wall = 10.94 ft.
An 8 m span, 6/12 pitch, 0.6 m overhang, 4 cm ridge. What is the total run?
Run = 4.00 - 0.02 + 0.60 = 4.58 m. Rise = 2.29 m. Rafter = 5.12 m.
What angle does a 9/12 pitch make?
Angle = atan(9/12) x 180 / pi = 36.9 degrees.
Questions
What is the difference between span and run?
Span is the full building width. Run is the horizontal distance the rafter covers, which is half the span minus half the ridge plus the overhang.
Does rafter length include the overhang?
The main rafter output includes it. The common rafter output stops at the wall line so you can compare the two.
Why deduct half the ridge board?
The rafter meets the side of the ridge, so its top plumb cut sits half a ridge thickness in from the center line.
What angle is a 6/12 roof?
About 26.6 degrees, because the tangent of the angle is 6 divided by 12.
Can I use this for a shed roof?
Only if you treat the run correctly. A single-slope shed has one wall at the high side, so the run is the full horizontal distance, not half the span.
How much extra lumber should I buy?
Order 10 to 15 percent more than the count needs to cover defects, bad cuts, and the test rafter.
Sources
- Pennsylvania Department of Education: Pythagorean Theorem carpentry chart
- Swanson Tool Co: Cutting a Common Rafter, The Blue Book