How rafter length is worked out
A common rafter is the long side of a right triangle. The level side is the run, which is half the building span less half the ridge board. The upright side is the rise. The pitch tells you how the two relate.
Run = (span − ridge thickness) ÷ 2
Rafter length = run × √(1 + (pitch ÷ 12)²)
The overhang is worked out the same way and added on. A 12 inch overhang measured level is longer along the slope of the rafter, because the tail runs at the same angle as the rest of the roof.
A worked example
A building 30 feet wide with a 6/12 roof and a 1.5 inch ridge board has a run of 179.25 inches. Multiply by 1.118 and the rafter measures 16 feet 8⅜ inches from the ridge to the outside of the wall. A 12 inch overhang adds 1 foot 1⅜ inches along the slope, for a total of 17 feet 9⅞ inches. That comes out of an 18 foot board.
The ridge sits 7 feet 5⅝ inches above the top of the walls. On a building 40 feet long with rafters every 16 inches, you need 31 on each side, or 62 in all.
The cut angles
The plumb cut is the cut at the top of the rafter where it meets the ridge, and again at the tail if you want a vertical fascia. Its angle is the same as the roof angle, so a 6/12 roof gets a 26.6 degree cut. On a speed square, you can skip the degrees and line up the number 6 on the common scale.
The seat cut is the level part of the birdsmouth, the notch where the rafter sits on the wall. It is always 90 degrees minus the plumb cut.
Before you cut
- Cut one rafter, test it in place, and use it as the pattern for the rest.
- Measurements here run along the top edge of the rafter. The birdsmouth depth depends on your lumber size and is not included.
- This calculator gives length, not strength. Whether you need 2x6, 2x8 or larger depends on span, spacing, snow load and wood species. Use the span tables in your local building code or ask your building department.
Common questions
Does the rafter length include the overhang?
The total does. The ridge to wall figure does not, which is useful for marking where the birdsmouth goes.
Why subtract the ridge board?
The two rafters meet the ridge board from either side, so each one stops short of the center line by half the board's thickness. Leaving this out makes each rafter about three quarters of an inch too long with standard lumber.
What if my rafter is longer than 24 feet?
Lumber yards rarely stock dimensional lumber past 24 feet. Longer spans usually call for engineered rafters or trusses, which a supplier or engineer should size for you.
Does this work for hip or valley rafters?
No. Hip and valley rafters run diagonally and are longer than common rafters at the same pitch. This calculator covers common rafters on a gable roof.
How we know this calculator is right
Every time the site is rebuilt, this calculator is run against answers worked out separately from its code. It is not published unless all of them match.
- A 30 foot span at 6/12 with a 1½ inch ridge board gives a rafter of 16 ft 8⅜ in, and 17 ft 9⅞ in with a 12 inch overhang.
- A 24 foot span at 9/12 with no ridge board gives exactly 15 ft 0 in, because run 12, rise 9 and rafter 15 make a 3-4-5 triangle.
- Rise, run and rafter length are checked against the Pythagorean theorem.
- A flat roof with a 20 foot span gives 10 ft 0 in, which is simply half the span.
- A 12/12 pitch gives a 45° plumb cut.
What this proves: the calculator does the arithmetic of the formulas shown, correctly. What it cannot prove: your measurements, or figures such as waste and coverage, which are typical starting values you can change. Go by the product label and your local code.