Rafter Length Calculator

Quick answer

The rafter length calculator finds the length of common rafters from the building span, roof pitch, overhang and ridge thickness, plus the rise, roof angle and the number of rafters for the building length and spacing.

/12
Run
11.938
Rise
5.969
Rafter length
14.465
Rafter length (ft-in)
14 ft 5 9/16 in
Roof angle
26.57
Number of rafters
62
Lumber length to buy
16

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

  1. Building span
  2. Roof pitch (rise per 12)
  3. Overhang (horizontal)
  4. Ridge board thickness
  5. Building length
  6. 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

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/2 Rise = run × pitch ÷ 12 Rafter = (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.

Sources

  1. American Wood Council: Span tables for joists and rafters

Cite this calculator

Speedy Calculator. (2026). Rafter Length Calculator. Speedy Calculator. https://speedycalculator.com/calculators/construction/rafter-length/