Rafter Length Calculator
This rafter length calculator finds the length of a common rafter from the building span, the roof pitch, the overhang, and the ridge board thickness. It returns the total rafter length in inches and in feet and inches, the length to the ridge, the overhang tail, the roof rise and angle, and the board length to buy.
Results
The Rafter Length Calculator is part of our Structural collection. Browse more structural to size, convert, and check your work alongside this tool.
What the rafter length calculator shows
A common rafter runs from the ridge down past the wall to the eave. Its length is the hypotenuse of a right triangle whose base is the run and whose height is the rise. The rafter length calculator takes half the span, shortens it by half the ridge board, scales it by the pitch, and adds the overhang tail measured along the slope. You get the length to cut, the board length to buy, and the rise to check against the ridge height.
Rafter length formula
Find the run, then scale it by the pitch factor:
The pitch factor is the rafter length per inch of run. For a 6/12 roof it is 1.118, so every foot of run needs 13.42 inches of rafter.
Rafter length calculator example
A 24 ft span with a 6/12 pitch, a 12 in overhang, and a 1.5 in ridge board:
That is 14 ft 5 9/16 in, so buy 16 ft boards. The rise is 71.63 in and the roof angle 26.57°. A 30 ft span at 8/12 with an 18 in overhang needs 237.06 in, or 19 ft 9 1/16 in, from 20 ft stock.
How to use the rafter length calculator
Enter the building span in feet, measured from the outside of one wall plate to the outside of the other. Enter the pitch as rise in inches per 12 inches of run, such as 6 for a 6/12 roof. Enter the overhang as the horizontal distance from the wall to the end of the rafter, and the ridge board thickness, 1.5 in for a 2x ridge. Press Calculate and read the total rafter length.
Reading the rafter length result
The total rafter length runs along the top edge from the ridge plumb cut to the tail cut. The rafter to ridge length runs to the outside of the wall, where the birdsmouth seat sits, and the overhang tail is the part beyond the wall. The board length to buy rounds up to the next even foot, the standard lumber length, with at least 8 ft. Lay out one rafter, test fit it, and use it as the pattern for the rest.
When to use a roof rafter calculator
- Ordering lumber for a gable roof or shed
- Laying out a pattern rafter
- Checking how a pitch change affects rafter length
- Planning eaves with a set overhang
- Estimating ridge height before framing
Common rafter length calculator mistakes
- Using the inside wall span. Measure from the outside of the wall plates.
- Forgetting the ridge board. Rafters stop half its thickness short.
- Entering the sloped overhang. Enter the level distance from the wall.
- Ignoring span tables. Length does not prove the rafter is deep enough.
Tips for cutting common rafter length
- Cut and test fit one pattern rafter before cutting the rest.
- Crown every board up so the roof plane stays straight.
- Leave the tails long and snap a line to trim them all at once.
How to calculate rafter length with a framing square
Carpenters have used the same math for a century. The rafter table on a framing square lists the length of common rafter per foot of run for each pitch, which is exactly 12 times the pitch factor in this calculator. Multiply that figure by the run in feet and you have the line length to the center of the ridge; subtract half the ridge thickness measured level, and add the tail. Laying out with the square, you step the rafter along the board once per foot of run, holding 12 on the blade and the rise on the tongue. Both methods agree, and the calculator saves the stepping. Once the pitch is set, check it in degrees with the roof pitch calculator, since many saws and bevel gauges read angles rather than rise and run.
Birdsmouth, rafter span, and lumber size
The birdsmouth is the notch where the rafter sits on the wall plate: a level seat cut and a plumb heel cut. Keep the seat cut no deeper than about one third of the rafter depth so enough wood remains above the notch to carry the overhang. The length from this calculator does not decide the lumber size; the allowable rafter span does. Span tables in the building code list the maximum horizontal span for each size, species, grade, spacing, and snow load, so a 2x6 that is long enough may still be too shallow to carry the roof. Check the span table before you buy, then price the boards with the board foot calculator.
Rafter length chart by pitch
Rafter length per foot of run, roof angle, and the total rafter for a 24 ft span with a 12 in overhang and 1.5 in ridge:
| Pitch | Factor | Per foot of run | Angle | 24 ft span total |
|---|---|---|---|---|
| 3/12 | 1.0308 | 12.37 in | 14.04° | 160.03 in |
| 4/12 | 1.0541 | 12.65 in | 18.43° | 163.65 in |
| 5/12 | 1.0833 | 13.00 in | 22.62° | 168.19 in |
| 6/12 | 1.1180 | 13.42 in | 26.57° | 173.57 in |
| 7/12 | 1.1577 | 13.89 in | 30.26° | 179.73 in |
| 8/12 | 1.2019 | 14.42 in | 33.69° | 186.59 in |
| 9/12 | 1.2500 | 15.00 in | 36.87° | 194.06 in |
| 10/12 | 1.3017 | 15.62 in | 39.81° | 202.09 in |
| 12/12 | 1.4142 | 16.97 in | 45.00° | 219.56 in |
Rafter Length Calculator FAQ
How do you calculate rafter length?
Take half the span minus half the ridge thickness as the run, add the overhang, and multiply by √(1 + (pitch ÷ 12)²). For a 24 ft span at 6/12 with a 12 in overhang that gives 173.57 in.
What is the rafter length per foot of run?
It is 12 times the pitch factor: 13.42 in for 6/12, 14.42 in for 8/12, and 16.97 in for 12/12. The same numbers appear on a framing square.
Why subtract half the ridge board?
Rafters butt into the side of the ridge board, so each one stops half the ridge thickness short of the center line.
Is the overhang measured level or along the slope?
Enter it level, as the horizontal distance from the wall. The calculator converts it to the sloped tail length.
