🏠
🏠 Home & living

Rafter Length Calculator (common rafter from span & pitch)

Results update as you type.

Your numbers

Understanding the rafter length calculator — concept and principle

This calculator works out the length of a common rafter for a gable roof from the building span, pitch, overhang and ridge-board thickness, plus the ridge rise, the pitch in both forms and the slope factor. Carpenters and DIY builders use it to order timber and lay out rafters for sheds, garages and extensions.

Run ÷ cos(pitch)Run ÷ cos(pitch): 3.6 − 0.019 = 3.581 m half span − half ridge board, ÷ cos 30° = 4.135 m + overhang 0.52 m on slope → 4.655 m rafter ≈ 15.27 ftRun ÷ cos(pitch)3.6 − 0.019 = 3.581 mhalf span − half ridge board÷ cos 30° = 4.135 m+ overhang 0.52 m on slope4.655 m rafter≈ 15.27 ft
Run ÷ cos(pitch): with the default inputs the result is 4.655 m rafter (≈ 15.27 ft).

How it is calculated

The principle

A common rafter is the sloping side of a right triangle: the run is the level distance from the wall to the ridge, the rise is the vertical height, and the rafter is the hypotenuse. Dividing the run by the cosine of the pitch gives the sloping length. Each rafter stops at the face of the ridge board, so half the board's thickness is taken off each run. The slope factor, 1 ÷ cos θ, turns any level distance into a distance along the slope; for a 30° roof it is 1.1547.

Worked example

Default inputs: span 7.2 m, pitch 30°, overhang 0.45 m, ridge board 38 mm.

  1. Run = 3.6 − 0.019 = 3.581 m; cos 30° = 0.8660.
  2. Rafter to wall = 3.581 ÷ 0.866 = 4.135 m.
  3. Overhang along slope = 0.45 ÷ 0.866 = 0.52 m; total = 4.655 m (15.27 ft).
  4. Ridge rise = 3.6 × tan 30° = 2.078 m; pitch = 30° = 6.93 in 12; slope factor 1.1547.
How Rafter length incl. overhang (m) changes with Building span, outside wall to outside wall (m)How Rafter length incl. overhang changes…02468101.83.65.47.2910.814.4Example: 4.655Building span, outside wall to outside wall (m)
Each point is the calculator re-run with only “Building span, outside wall to outside wall (m)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Building span, outside wall to outside wall (m)Rafter length incl. overhang (m)
1.81.537
3.62.576
5.43.615
7.24.655
95.694
10.86.733
14.48.812

How to read the result

Lengths are along the rafter's measuring line from the ridge face to the tail. Buy stock at least one standard length longer to allow for the plumb cut, birdsmouth and tail cut. Check the ridge rise against any height limits for the building.

Common mistakes

Keep in mind: Rafter size, spacing and fixings must carry snow, wind and roof loads. Real designs need local building codes and a qualified professional.

Frequently asked questions

How do I calculate rafter length?

Divide the run by the cosine of the pitch and add the overhang divided by the same cosine.

What is a 30° roof in rise per 12?

About 6.93 in 12.

Why deduct half the ridge board?

Each rafter stops at the face of the ridge board, not at the centre line.

Sources: J. Anderson, "Laying Out a Common Rafter", Fine Homebuilding no. 165 (2004) · NIST Special Publication 811 (2008), Appendix B (1 ft = 0.3048 m)

Checked 9 Nov 2026. Right-triangle trigonometry (rafter = run ÷ cos θ); common-rafter layout with the ridge-board deduction of half its thickness: J. Anderson, “Laying Out a Common Rafter”, Fine Homebuilding no. 165 (2004); 1 ft = 0.3048 m (NIST SP 811).

🏠 All home & living tools →🌍 Calculators by country →