Rafter Calculator (Metric)

Enter your rise, run, and overhang to get the total rafter length, the cut angle, and the pitch for a gable roof.

Working in feet & inches? →

How to use this calculator ↓

What your result means

Total rafter length is what you cut to, measured from the ridge down to the end of the tail, overhang included. Buy lumber 6 to 30.5 cm longer than that to leave room for trim cuts. The angle is your plumb-cut angle, and the pitch ratio confirms the slope you entered.

How to use this calculator

  1. Calculate rise from pitch and run. For 4:12 pitch and 3.7 m run, rise = 4 x 12 = 121.9 cm.
  2. Run is half the building width in inches.
  3. Choose overhang (30.5 cm for sheltered eaves, 61 cm for greater rain protection).
  4. Read rafter line length, overhang addition, total length, angle, and pitch ratio.
  5. Buy lumber 6-30.5 cm longer than calculated for trim cuts.

The formula

lineLength = sqrt(rise^2 + run^2) angle = atan(rise / run) overhang+ = overhangIn / cos(angle) total = lineLength + overhang+ pitch = (rise / run) * 12 + ":12"

The rafter line length is the hypotenuse: the square root of rise squared plus run squared. The overhang adds its horizontal projection divided by the cosine of the roof angle, since the rafter runs along the slope. Add the two for the total cut length.

Worked example

Say you've got a 7.3 m wide building at 4:12 pitch with a 12-inch overhang. Rise is 48, run is 144 (half the width), overhang 12. You'll get a 3.9 m line length, about 32.1 cm added for the overhang, a 4.2 m total rafter, an 18.43 degree angle, and a 4:12 pitch. Buy 4.3 m 2x10s so you've got room for the cuts.

Rafter lumber size by span (guide)

Rafter spanCommon lumber size
Up to 3.7 m2x8
Up to 4.3 m2x10
4.9 m and over2x12 (check span tables / engineer)

Tips & gotchas

  • Always round up to a standard lumber length. 12, 14, 16, and 5.5 m are the common ones.
  • Snap chalk lines on the rafter for the plumb cut and the bird's mouth before you cut.
  • Use the angle the calculator gives you for the plumb cut.
  • On most modern builds the tail cut at the overhang end is plumb (vertical).
  • Anything load-bearing should go past a structural engineer.

Frequently asked questions

How long should my rafters be?

Run your rise, run, and overhang through the calculator, then round up to the next standard lumber length.

What size lumber do I need for rafters?

Rough guide: 2x8 for a 3.7 m span, 2x10 for 4.3 m. At 4.9 m and up, check span tables or talk to an engineer.

What is a bird's mouth cut?

It's the notch that seats the rafter on the wall plate. Leave at least two-thirds of the rafter depth above the cut.

How do I figure overhang for a steeper pitch?

The calculator handles it. Overhang projects horizontally, so a steeper pitch means a longer rafter to reach the same projection.

Should I use trusses instead of rafters?

Trusses are faster and cheaper for production homes. Site-built rafters give you more attic space and design freedom.

Related calculators

Estimates only — see our full disclaimer.