๐Ÿ“ roof framing ยท rafter length ยท roof pitch

Rafter Length Calculator

Enter your building width, roof pitch, overhang, and ridge thickness to get the exact rafter length, rise, run, and cut angle for a standard gable roof.

Reviewed: 
Free to use
No signup required
Regularly updated
100% private โ€” no data stored

What This Rafter Length Calculator Does

A roof rafter is really just the hypotenuse of a right triangle, and this calculator applies that triangle directly to your framing numbers. Type in the building width, the pitch, the overhang, and the ridge board thickness, and the tool works out the run, the rise, the cut angle, and the final rafter length in one pass. It's built for the moment before you pick up a saw, not as a replacement for a structural engineer or your local building code when either is required.

Most gable roof framing starts the same way: take half the building width, trim off half the ridge thickness, add your overhang, then let the pitch tell you how steep that triangle climbs. Once you have run and rise, the Pythagorean theorem hands you the rafter length. This tool runs that sequence automatically so you can check a cut list or confirm a lumber order in seconds instead of working it out by hand on a scrap board.

The Rafter Length Formula, Step by Step

The math behind every result on this page follows four steps, and each one maps to a field in the calculator above.

1. Find the base run

For a standard gable roof, the run is half the total building width. A 24 foot wide building gives a base run of 12 feet, since the roof slopes down from the ridge to each of the two exterior walls.

2. Subtract half the ridge thickness

Rafters land on the centerline of the ridge board, not its outer face, so half the ridge thickness comes off the run. A standard 1.5 inch ridge board removes 0.75 inches from each side. It looks small, but across a full roof with twenty or more rafters, skipping this step can leave the ridge line slightly crooked.

3. Add the overhang

Overhang is measured flat, horizontally from the wall face, so it gets added to the run before the pitch is applied. Because the rafter is sloped, a 12 inch overhang on a 6/12 pitch actually adds closer to 13.4 inches of real rafter length, not exactly 12. The calculator handles that conversion automatically.

4. Apply the pitch and solve the triangle

Roof pitch is written as rise over a 12 inch run, so a 6/12 pitch rises 6 inches for every foot of horizontal travel. Multiply the total run by pitch divided by 12 to get the rise, then plug run and rise into rafter length = โˆš(runยฒ + riseยฒ). That diagonal is your rafter length, also called the line length.

Worked Example

Take a 24 foot wide building with a 6/12 pitch, a 16 inch overhang, and a 1.5 inch ridge board. Half the width is 12 feet, minus 0.75 inches for the ridge, plus 16 inches of overhang, giving a total run of roughly 13.27 feet. At a 6/12 pitch, that run produces a rise of about 6.63 feet. Running both through the Pythagorean theorem lands the rafter length at approximately 14.84 feet, or 14 feet 10 inches. That's the line length; add a little extra for the birdsmouth notch and tail detail when you cut the actual board.

Rafter Length Versus Rafter Board Length

The number this calculator returns is the line length, the straight geometric distance from the ridge centerline to the end of the overhang. The lumber you actually buy and cut needs a bit more than that. The plumb cut at the ridge and the birdsmouth notch at the wall both eat into usable length, and any decorative tail or fascia board adds a little on the other end. Treat the calculated figure as your layout measurement, then round up when ordering material so you have enough working length for every cut.

Common Roof Pitches and What They Mean

Pitch controls how much rise you get for a given run, and it has a real effect on material length. A 4/12 pitch is considered walkable for most people, while anything around 6/12 or steeper starts to require fall protection and different footing. Moving from a 4/12 to an 8/12 pitch on the same 24 foot building can add roughly three feet of length to every rafter, which adds up fast once you're pricing lumber for thirty or more boards. Steeper pitches also shed water and snow more effectively but increase total roof surface area, which matters if you're estimating shingles or metal panels next.

Rafter Spacing and Lumber Sizing

Rafter length tells you how long to cut each board, but spacing and span tables tell you what size lumber to use. Sixteen inches on center is the standard for most residential roofs, with twenty four inches on center also common depending on species, grade, and local snow load requirements. Always check a current span table or stamped plan before finalizing lumber size, since the calculator on this page covers geometry only and does not account for structural load.

Frequently Asked Questions

How do you calculate rafter length?

Rafter length is found with the Pythagorean theorem: length equals the square root of run squared plus rise squared. Run is half the building width minus half the ridge thickness, and rise comes from multiplying that run by the pitch divided by 12. Add the sloped overhang length to get the total cut length.

What is roof pitch and how is it written?

Roof pitch is written as a ratio of rise to a 12-inch run, such as 6/12. This means the roof rises 6 inches vertically for every 12 inches it travels horizontally. Common residential pitches range from 4/12 to 9/12.

Do I need to subtract the ridge board thickness from the run?

Yes. Rafters meet at the centerline of the ridge board, not its outer face, so half the ridge thickness should be subtracted from each side's run. Skipping this step makes every rafter very slightly long and can throw off the ridge line across a full roof.

How does overhang affect total rafter length?

Overhang adds to the horizontal run before the slope is applied, so the sloped length added is always slightly more than the flat overhang measurement. A 12 inch overhang on a 6/12 pitch adds roughly 13.4 inches of actual rafter length, not exactly 12.

What is the difference between rafter length and rafter board length?

Rafter length, or line length, is the straight-line measurement used in the geometry formula. The actual board you cut and buy needs to be longer to account for the plumb cut at the ridge, the birdsmouth notch at the wall, and any tail or fascia detail at the end.

Does this calculator work for hip and valley rafters?

This tool calculates common rafter length for a standard gable roof. Hip and valley rafters run diagonally to the wall corners and are longer, typically found by multiplying the common rafter run by both the slope factor and a hip factor of about 1.414.

What rafter spacing is standard for residential roofs?

16 inches on center is the most common residential rafter spacing, with 24 inches on center also used depending on lumber size and local load requirements. Always confirm spacing against span tables or an engineer's plan before cutting.

Can I use this calculator for a shed or lean-to roof?

A single-slope shed or lean-to roof uses the same Pythagorean approach, but the run is the full building width rather than half of it, since there is no ridge at the center. Enter the full width as the run for an accurate shed rafter length.

โ„น๏ธ
Disclaimer

This tool is for educational purposes only. Always verify important results with a qualified professional.

Mizan โ€” Founder, CalcMora
Founder, CalcMora

Built 3000+ free calculators to help people make smarter everyday decisions.

About