Skip to content

Rafter Length Calculator

Common rafter length from span and pitch, with overhang, ridge deduction, cut angles and rafter count.

Your details

Unit system
Roof type

Measured across the walls the rafters sit on, outside face to outside face of the wall plates.

Pitch given as
/12

Measured level from the outside of the wall to the tail cut. A shed rafter gets it at both ends.

Rafters that butt against a ridge board lose half its thickness from each run (1½ in for a 2× board). Enter 0 if the rafters rest on a ridge beam or meet each other.

16 or 24 in on centre is standard in North America; 40–60 cm in Europe.

Results update as you type

Rafter length with overhang

14.465 ft

Length to the building line
13.347 ft
Overhang (tail) length
1.118 ft
Run
11.938 ft
Total rise
6 ft
Pitch angle
26.57 °
Pitch
6/12 · 50 %
Pitch factor
1.118
Plumb cut (off square)
26.57 °
Seat (level) cut (off square)
63.43 °
Number of rafters
50
Total rafter stock
723.23 ft

Lengths are measured along the top edge of the rafter, from the ridge plumb cut to the tail. Buy stock a little longer to allow for the cuts, and size the rafters from the span tables of your building code.

Step-by-step solution
  1. 288 in ÷ 2 − 1.5 in ÷ 2 = 143.25 in
  2. √(1 + 0.5²) = 1.118
  3. 143.25 in × 1.118 = 160.16 in
  4. 12 in × 1.118 = 13.42 in
  5. 160.16 in + 13.42 in = 173.57 in
  6. (⌈384 in ÷ 16 in⌉ + 1) × 2 = 50

A common rafter is the hypotenuse of a right triangle: its run is half the building width on a gable roof, its rise comes from the pitch, and the overhang adds a short tail on the same slope. This rafter length calculator does that geometry for you and returns the rafter length with overhang, the length to the building line, the run and total rise, the plumb and seat cut angles and, if you give the building length and spacing, the number of rafters and the total length of timber.

Enter the pitch the way you know it: x/12 as North American framers say it, degrees as most European plans give it, or percent. The ridge setting handles both framing styles: rafters butting a ridge board (subtract half its thickness from each run) and rafters resting on a ridge beam or purlin, the usual French method, where nothing is deducted.

If you only need to convert a pitch, the roof pitch calculator is quicker; to order the covering, continue with the roofing calculator. This tool measures; it does not size the timber. Rafter depth and grade come from the span tables of your building code or an engineer.

How to use this calculator

  1. Choose gable (two slopes meeting at a ridge) or shed (one slope from a low wall to a high wall).
  2. Enter the building width across the walls that carry the rafters.
  3. Pick the pitch notation and enter the pitch.
  4. Enter the horizontal overhang beyond the wall, measured level, not along the slope.
  5. For a gable roof, enter the ridge board thickness, or 0 if the rafters sit on a ridge beam.
  6. Enter the spacing and, optionally, the building length to count the rafters.
  7. Read the rafter length, angles and count, and open the steps to see each calculation.

The formula

With slope ss = rise ÷ run (for example 6/12=0.56/12 = 0.5, or tan⁡35°\tan 35°), the pitch factor is the length of rafter per unit of horizontal run:

k=1+s2=1cos⁡θk = \sqrt{1 + s^2} = \frac{1}{\cos\theta}

On a gable roof, the run of each rafter is half the span less half the ridge board thickness tt, and the overhang oo is measured horizontally:

R=W2−t2L=(R+o) kH=W2 sR = \frac{W}{2} - \frac{t}{2} \qquad L = (R + o)\,k \qquad H = \frac{W}{2}\,s

For a shed roof, R=WR = W and the tail appears at both ends: L=(W+2o) kL = (W + 2o)\,k. The plumb cut is the pitch angle θ=arctan⁡s\theta = \arctan s off square; the seat cut of the birdsmouth is 90°−θ90° - \theta off square. The count is one rafter per spacing interval plus one at the end, on each slope: n=2 (⌈ℓ/e⌉+1)n = 2\,(\lceil \ell / e \rceil + 1) for a gable.

Worked example

Metric gable. A house 8 m wide with a 35° roof, rafters resting on a ridge purlin (no deduction) and a 50 cm overhang:

  • Run 44 m, pitch factor 1/cos⁡35°=1.22081/\cos 35° = 1.2208
  • Length to the wall line: 4×1.2208=4.8834 \times 1.2208 = 4.883 m; tail 0.5×1.2208=0.610.5 \times 1.2208 = 0.61 m
  • Rafter length: 5.493 m, rise at the ridge 2.801 m
  • With a 10 m long house and rafters at 60 cm centres: 36 rafters, about 197.8 m of timber.

Imperial gable. A 24 ft wide building at 6/12, a 1½ in ridge board and a 12 in overhang: run 143.25 in, line length 160.16 in, total 173.57 in (14.46 ft). Plumb cut 26.57°, seat cut 63.43°. At 16 in on centre over 32 ft: 50 rafters.

Shed. A 3 m lean-to at 15% with 30 cm overhangs at both ends: rafter 3.64 m, high wall 0.45 m above the low wall.

Pitch factors for common roof pitches

Pitch Angle Factor 1+s2\sqrt{1+s^2}
3/12 14.04° 1.0308
4/12 18.43° 1.0541
6/12 26.57° 1.1180
8/12 33.69° 1.2019
12/12 45.00° 1.4142
30° 30.00° 1.1547
45° 45.00° 1.4142

Multiply the run by the factor to get the sloped length. This is the number printed on the rafter tables of a framing square.

Ridge board, ridge beam and birdsmouth

In North American stick framing, the 2021 International Residential Code (section R802) requires a ridge board at least 1 in nominal thick and no shallower than the cut end of the rafters; because the rafters butt against it, each run loses half the board’s thickness. A structural ridge beam or a French panne faîtière carries the rafters on top, so the full half-span is used. At the wall, the birdsmouth notch sits on the plate: its seat cut is level and its depth is usually limited to about a third of the rafter depth so the tail stays strong.

Frequently asked questions

How do I calculate rafter length?

Take the run (half the building width on a gable roof, less half the ridge board), add the horizontal overhang, and multiply by the pitch factor √(1 + (rise/run)²). For 6/12 the factor is 1.118, so a 12 ft run gives a 13.42 ft rafter before the overhang.

Is the overhang measured along the slope or level?

This calculator asks for the level (horizontal) projection, which is what plans and eave details give. The sloped tail length is the overhang multiplied by the same pitch factor.

How many rafters do I need?

Divide the building length by the spacing, round up, and add one for the end; double it for a gable roof. A 32 ft building at 16 in on centre needs 25 rafters per side, 50 in total, before any gable-end ladder framing.

What angle do I cut a rafter at?

Set the saw to the pitch angle for the plumb cuts at the ridge and the tail (26.57° for 6/12) and to 90° minus that angle for the seat cut of the birdsmouth (63.43° for 6/12), both measured off a square cut.

What lumber length should I buy?

Take the rafter length, add a few centimetres or an inch or two for the cuts, and round up to the next stock length: lumber in North America comes in 2 ft steps, and timber merchants in Europe usually stock lengths every 30 or 50 cm.

Sources

Last updated:

More Construction calculators

People also use