Rafter Length Calculator

Roof rafter length, angle, and rise from span and pitch

Frequently Asked Questions

Rafter length is the hypotenuse of a right triangle: the run (half the building span) and the rise (run × pitch ÷ 12) are the two legs. Rafter length = √(run² + rise²), then the overhang is added along the same slope angle.
Roof pitch is expressed as rise per 12 inches of run. A 6/12 pitch rises 6 inches for every 12 inches of horizontal run, which works out to a roof angle of about 26.6°.
No — this calculates the theoretical rafter length along the roof slope from the outer wall to the ridge centerline, plus your overhang. Actual lumber length needed is typically slightly longer to account for the ridge board thickness and birdsmouth (seat cut) at the wall — add a few extra inches when ordering material.
No. Always confirm rafter sizing (dimensional lumber size and spacing) against your local building code and span tables, especially for snow load areas — this calculator only computes geometry, not structural sizing.

Rafter length formula

A common rafter is the hypotenuse of a right triangle formed by the run and the rise:

  • Run = building span ÷ 2
  • Rise = run × pitch ÷ 12
  • Rafter length = √(run² + rise²)
  • Overhang length = horizontal overhang ÷ cos(roof angle)

Example

A 24-foot span with a 6/12 pitch and a 12-inch eave overhang: run = 144 inches, rise = 72 inches, rafter = √(144² + 72²) = 161.0 inches, or 13' 5". The overhang adds 12 ÷ cos(26.57°) = 13.4 inches, for a total of 14' 6.4", so you would buy 16-foot boards.

Pitch, angle and multiplier

PitchAngleRafter length per foot of run
3/1214.0°1.031
4/1218.4°1.054
6/1226.6°1.118
8/1233.7°1.202
10/1239.8°1.302
12/1245.0°1.414

Multiply the run in feet by the factor to get the rafter length: 12 ft × 1.118 = 13.42 ft for the example.

Adjustments when you cut

  • Ridge board: the formula measures to the center of the ridge. Shorten each rafter by half the ridge thickness, measured level: for a 1½-inch ridge on a 6/12 roof, that is 0.75 × 1.118 = about 0.84 inch.
  • Birdsmouth: the seat cut should not go deeper than about one third of the rafter depth.
  • Plumb cut: the ridge and tail cuts are set at the roof angle; a speed square marked with common pitches makes them quick.

Rafter size and spacing depend on span, snow load and wood species, and must follow the span tables in your local building code. Price the lumber with the lumber calculator, the sheathing with the plywood calculator and the roof covering with the roofing calculator.