Geometry

Rafter length calculator

Geometric rafter length from the horizontal run and the roof pitch, with an optional overhang.

Inputs

ft
Horizontal distance, not the length along the slope.
rise / 12
Inches of rise per 12 of run. 0 is a flat roof.
ft
Horizontal distance past the wall. Enter 0 for none.

Run is horizontal. On a symmetric gable roof it is half the building width. Measuring along the roof instead will overstate the rafter.

Results update as you type.

Result

13 ft 5 in L6 · Total rafter length along the slope

L1
Run, wall to ridge
12 ft
L2
Pitch
6/12
L3
Slope factor
1.118
L4
Rafter to wall line, L1 × L3
13.42 ft
L5
Overhang, at the same slope
0 ft
L6
Total length, L4 + L5
13 ft 5 in

Geometric length only. No allowance for the ridge board, birdsmouth cuts, or rafter sizing.

Calculated from the inputs on this page. Sources checked 21 Nov 2026.

This is a length, not a cut list. A cut rafter is shorter than the line length once the ridge board and birdsmouth are taken into account.

How this is calculated

The rafter runs along the same plane as the roof, so its length is the run multiplied by the slope factor. An overhang continues along that plane and is multiplied by the same factor.

L3 = √(144 + pitch²) ÷ 12
L4 = run × L3
L5 = overhang × L3
L6 = L4 + L5

The rise at the ridge is run × pitch ÷ 12. It is shown in the article example rather than the ledger, because the ledger tracks the length calculation only.

Worked example

A run of 12 ft at 6/12. The slope factor is √(144 + 36) ÷ 12 = 1.1180, so the rafter to the wall line is 12 × 1.1180 = 13.42 ft, which is 13 ft 5 in. The ridge rises 6 ft above the wall.

Add a 1.5 ft overhang: 1.5 × 1.1180 = 1.68 ft, giving a total of 15.09 ft, or 15 ft 1 in along the slope.

What is excluded

  • The ridge board thickness, which shortens the rafter at the top.
  • The birdsmouth or any seat cut at the wall.
  • Rafter depth and spacing: structural sizing is an engineering question, not a geometric one.
  • Fascia, bargeboards and soffit, which follow different lines.

Frequently asked questions

Is run half the building width?

On a symmetric gable roof, yes: from the outside of the wall to the centre line of the ridge. On a single-slope roof the run spans the full width.

Should the overhang be measured horizontally?

Yes. Enter the horizontal distance the roof projects past the wall. The calculator converts it along the slope for you.

Can I use this to order lumber?

Only as a starting point. Stock lengths, cuts, the ridge board and the rafter span all affect the order. Have the sizing and cut list confirmed before buying.

Why does a steeper roof give a longer rafter?

The run stays the same while the rise grows, so the line along the slope gets longer. At 12/12 the factor is 1.4142, against 1.1180 at 6/12.

Related