Calculate the length of the common rafters for a simple gable roof. Enter the span between the outside of the walls, the roof pitch and the horizontal overhang at the eaves.
This is the theoretical length measured along the top of the rafter. When cutting, deduct half the thickness of the ridge board from the run, and buy lumber in the next standard length up.
Enter the roof pitch, the building span and the overhang to get the rafter length, the run, the rise and the roof angle.
How long should a rafter be?
A common rafter runs from the top of the wall (the plate) to the ridge. Its run is half the building’s span, its rise is the run × pitch ÷ 12, and its length is the hypotenuse of that right triangle — the Pythagorean theorem — plus any overhang beyond the wall.
The figure is a line length; the board you cut also needs the plumb cut at the ridge, the birdsmouth seat over the wall plate and an allowance for half the ridge board’s thickness. Buy lumber at least one stock size longer than the calculated length.
How to use the rafter length calculator
- Choose the roof pitch.
- Enter the building span from wall to wall.
- Enter the horizontal overhang, and read the rafter length.
Formula
Rafter length = (Span ÷ 2 + Overhang) × √(1 + (Pitch ÷ 12)²)
Rise = Span ÷ 2 × Pitch ÷ 12.
Worked examples
A 24 ft span at 6/12
- Units
- Imperial (ft)
- Building span (wall to wall)
- 24 ft
- Roof pitch
- 6/12 (26.6°)
- Overhang (horizontal)
- 1 ft
- Rafter length
- 14 ft 6.4 in
- Roof rise (wall top to ridge)
- 6 ft 0 in
- Rafter run
- 12 ft 0 in
Run = 24 ÷ 2 = 12 ft; rise = 12 × 6 ÷ 12 = 6 ft. Length = √(12² + 6²) = 13.42 ft, plus a 1 ft overhang measured horizontally (1.12 ft along the slope): 14 ft 6.4 in.
A 7.2 m span at 9/12
- Units
- Metric (m)
- Building span (wall to wall)
- 7.2 m
- Roof pitch
- 9/12 (36.9°)
- Overhang (horizontal)
- 0.45 m
- Rafter length
- 5.063 m
- Roof rise (wall top to ridge)
- 2.7 m
- Rafter run
- 3.6 m
Run = 3.6 m; rise = 3.6 × 9 ÷ 12 = 2.7 m. The rafter line, including the overhang along the slope, is 5.063 m.
Rafter length per foot of run
| Pitch | Rise per ft of run | Rafter length per ft of run |
|---|---|---|
| 3/12 | 3 in | 12.37 in |
| 4/12 | 4 in | 12.65 in |
| 5/12 | 5 in | 13 in |
| 6/12 | 6 in | 13.42 in |
| 7/12 | 7 in | 13.89 in |
| 8/12 | 8 in | 14.42 in |
| 9/12 | 9 in | 15 in |
| 10/12 | 10 in | 15.62 in |
| 12/12 | 12 in | 16.97 in |
Overhang and ridge board
The run is half the span, and the horizontal overhang is added to it before the pitch turns it into a length along the slope. With a ridge board, the actual rafter is a little shorter: subtract half the ridge board’s thickness from the run so the rafters meet it correctly.
Common mistakes
- Using the full span instead of half of it as the run.
- Measuring the overhang along the slope when the plan gives it horizontally (or the reverse).
- Forgetting to deduct half the ridge board thickness from each rafter.
Frequently asked questions
What is rafter run?
The horizontal distance a rafter covers — half the building span for a symmetrical gable roof, not counting the overhang.
What size should rafters be?
That depends on span, spacing, roof load and wood species. Use your local building code’s span tables or ask an engineer.
What is the pitch factor?
The rafter length per foot of run. For a 6/12 roof it is √(1 + 0.5²) ≈ 1.118.
Sources
- 2021 International Residential Code (IRC), International Code Council
- Span Tables and Design Resources, American Wood Council
Last updated · Calculations checked by automated tests· Editorial policy