Skip to content

Rafter Calculator

This rafter calculator gives common rafter length with the ridge and birdsmouth deductions, how many a roof needs, and the hip, valley and jack rafters on a hipped roof.

Common Rafter

Outside to outside of the wall plates. Each rafter runs half of it.

Measured level, not along the slope. The tool converts it.

A 2x ridge is 1½ in. Each rafter loses half of it, measured along the slope.

The flat that sits on the plate, usually the plate width.

How to use the Rafter Calculator

Enter the span, the full width of the building, plate to plate, and the pitch. Each rafter runs half the span, and the tool applies the two deductions that turn a theoretical length into a cut length: half the ridge thickness, measured along the slope, and the birdsmouth seat.

The Layout tab counts rafters along the building, both slopes plus the gable ends. The Hip tab handles hipped roofs, where the diagonal members are longer and cut at a different angle.

If you only need pitch converted into an angle, a slope factor or a roof area, the roof pitch calculator does that more directly.

Rafter formula

  • run = span ÷ 2
  • line length = run × √(1 + (pitch ÷ 12)²)
  • ridge deduction = (ridge thickness ÷ 2) × √(1 + (pitch ÷ 12)²)
  • overhang along slope = overhang × √(1 + (pitch ÷ 12)²)
  • hip run = √(run² + run²) = run × √2

The slope factor appears three times, because every horizontal measurement on a roof has to be converted the same way. That includes the ridge deduction, halving the ridge and forgetting to convert it is a common quarter-inch error that compounds across a roof.

PitchCommon slope factorHip slope factorAngle
4/121.05411.032818.43°
6/121.11801.060726.57°
8/121.20191.100633.69°
10/121.30171.152439.81°
12/121.41421.224745.00°

The hip factor is smaller because a hip travels 17 inches horizontally for every 12 a common rafter does, so it rises less steeply along its own length.

Worked example

A 28 ft span at 6/12, 16 in overhang, 1½ in ridge, 3½ in seat cut:

  • Run: 28 ÷ 2 = 14 ft
  • Slope factor at 6/12: 1.1180
  • Line length: 14 × 1.1180 = 15.652 ft = 15 ft 7⅞ in
  • Ridge deduction: (1.5 ÷ 2) × 1.1180 = 0.84 in
  • Overhang along slope: 16 × 1.1180 = 17.89 in
  • Total cut length: 15 ft 7⅞ − 0.84 in + 17.89 in = 17 ft 0 ⅞ in

And the hip on the same roof: run 14 × √2 = 19.80 ft, slope factor 1.0607, so the hip is 21.00 ft, over five feet longer than the common rafter it meets.

What the result means

Line length is not cut length. The line length is the theoretical centre-line from the plate to the ridge centre. The rafter you cut is shorter at the top by half the ridge and longer at the bottom by the overhang. Ordering off the line length gives you rafters that are close and wrong.

A hip is not a steeper rafter, it is a shallower one. It runs diagonally, so it covers 16.97 inches of plan for every 12 a common rafter covers. Its unit rise over its own run is lower, which is why the hip slope factor is smaller and the hip is longer.

The birdsmouth is a notch, not a shortening. It does not change the rafter’s length along the slope; it changes where the rafter sits and how much timber is left above the plate. Code generally wants at least two thirds of the rafter depth remaining.

Common mistakes

  • Deducting the whole ridge thickness. Each of the two rafters meeting at a ridge loses half of it, not all of it.
  • Deducting the ridge horizontally. The deduction runs along the slope, so it is multiplied by the slope factor like everything else.
  • Measuring the overhang along the slope. Soffit overhang is a level dimension. Enter it level and let the tool convert it.
  • Using the common slope factor for hips. Hips use the 17-inch factor. Using 1.1180 instead of 1.0607 at 6/12 makes every hip five percent too long.
  • Cutting the birdsmouth too deep. Leave at least two thirds of the rafter depth above the seat cut, or the rafter is weakened where it is most loaded.

Frequently asked questions

How do you calculate rafter length?
How much do you deduct for the ridge board?
How long is a hip rafter?
What is a birdsmouth cut?
How many rafters do I need?
Should the overhang be measured level or along the slope?

Sources and assumptions