A common rafter runs from the ridge to the wall plate and beyond for the overhang. Its length is the hypotenuse of a right triangle whose base is the run and whose height is the rise. The pitch is written as rise in inches per 12 inches of run – 6/12 means the roof climbs 6 in for every foot.
How to use the Rafter Length Calculator
- Building span
- Roof pitch (rise per 12)
- Overhang (horizontal)
- Ridge board thickness
- Building length
- Rafter spacing
Results update as you type, and every field accepts the units shown in its menu.
How it works
Enter the building span (outside of walls), the pitch, the horizontal overhang, ridge board thickness, building length and rafter spacing. The calculator gives the rise, rafter length in decimal and feet-inches, roof angle and rafter count.
Pitch multipliers
| Pitch | Angle | Multiplier |
|---|---|---|
| 2/12 | 9.5° | 1.014 |
| 3/12 | 14.0° | 1.031 |
| 4/12 | 18.4° | 1.054 |
| 5/12 | 22.6° | 1.083 |
| 6/12 | 26.6° | 1.118 |
| 7/12 | 30.3° | 1.158 |
| 8/12 | 33.7° | 1.202 |
| 9/12 | 36.9° | 1.250 |
| 10/12 | 39.8° | 1.302 |
| 12/12 | 45.0° | 1.414 |
Tips for an accurate estimate
- Measure the footprint from the ground and apply the pitch multiplier rather than climbing on the roof.
- Add 10% waste for simple gable roofs and 15–20% for hips, valleys and dormers.
- Confirm design snow and wind loads with your local building department before changing framing or roofing.
- Always work with fall protection; roofing is one of the most dangerous trades.
Common mistakes to avoid
- Using the footprint area instead of the sloped roof area when ordering materials.
- Forgetting starter strips, ridge caps, drip edge and underlayment.
- Mixing up pitch (rise per 12 in of run) with the roof angle in degrees.
Inputs explained
| Field | What to enter |
|---|---|
| Building span | Units: ft, m, in, yd, cm |
| Roof pitch (rise per 12) | In /12 |
| Overhang (horizontal) | Units: in, cm, mm, ft, m |
| Ridge board thickness | Units: in, cm, mm, ft, m |
| Building length | Units: ft, m, in, yd, cm |
| Rafter spacing | Choose one: 12 in, 16 in, 19.2 in, 24 in … |
What each result means
- Run = [Building span]÷2 – [Ridge board thickness]÷2
- Rise = [Run]×[Roof pitch (rise per 12)]÷12
- Rafter length = ([Run] + [Overhang (horizontal)])×sqrt(1 + ([Roof pitch (rise per 12)]÷12)^2)
- Rafter length (ft-in) = [Rafter length]÷0.0254
- Roof angle = deg(atan([Roof pitch (rise per 12)]÷12))
- Number of rafters = 2×(ceil([Building length]÷[Rafter spacing] – 0.000001) + 1)
- Lumber length to buy = ceil([Rafter length]÷0.6096 – 0.000001)×0.6096
Formula
Run = span/2 − ridge/2Rise = run × pitch ÷ 12Rafter = (run + overhang) × √(1 + (pitch/12)²)Rafters = 2 × (ceil(length ÷ spacing) + 1)Worked example
Inputs — Building span: 24 ft; Roof pitch (rise per 12): 6 /12; Overhang (horizontal): 12 in; Ridge board thickness: 1.5 in; Building length: 40 ft; Rafter spacing: 16 in.
Results — Run = 11.938 ft; Rise = 5.969 ft; Rafter length = 14.465 ft; Rafter length (ft-in) = 14 ft 5 9/16 in; Roof angle = 26.57 °; Number of rafters = 62; Lumber length to buy = 16 ft.
Frequently asked questions
How do I calculate rafter length?
Multiply the run (plus overhang) by the pitch multiplier √(1 + (pitch/12)²): 1.118 for 6/12, 1.202 for 8/12 and 1.414 for 12/12.
How many rafters do I need?
For a gable roof, two per spacing along the building length plus one pair at the end.
Do I subtract the ridge board?
Yes – half its thickness from each rafter's run.
What formula does the Rafter Length Calculator use?
Run = span/2 − ridge/2.