Skip to content
RooferMath

Rafter Length Calculator: Line, Overhang & Total Length

Compute common rafter length from building span, pitch, overhang, and ridge board thickness: line length, overhang length, total length, rise, run, and rafter count, with a live diagram. Geometry only, not span or load ratings.

This tool gives the geometric length of a rafter. It does not tell you what size lumber to use or how far a rafter can safely span. Allowable span depends on load, species, grade, and spacing. Size structural members with a licensed professional and your local building code.

run = (span ÷ 2) − (ridge ÷ 2) · slope_factor = √(pitch² + 12²) ÷ 12 · line = run × slope_factor · total = line + (overhang × slope_factor)

Total rafter length

14' 6.99"

Line length

13' 5.00"

Overhang length

1' 1.99"

Full breakdown

Metric Value
Line length (ridge to plate)13' 5.00" · 13.417 ft
Overhang length (along slope)1' 1.99" · 1.118 ft
Total rafter length14' 6.99" · 14.535 ft
Actual rise6' 0.00" · 6.000 ft
Run used (after ridge deduction)11' 11.25" · 11.938 ft
Ridge deduction applied0.75 in
Rafter count (this wall)24

Live rafter diagram

Common rafter diagram with overhang, redraws with the calculator 6/12 total 14.54 ft run 11.94 ft OH 1.12 ft rise 6.00 ft plate

Solid line is the main rafter (ridge to plate), dashed is the overhang tail past the plate. Redraws live as inputs change.

How run, span, overhang, and ridge deduction fit together

Building span is the full width the roof covers, wall to wall. Because two common rafters meet at the ridge from opposite sides, each one only spans half that width, the run, minus a small deduction for half the ridge board's thickness, since the ridge board itself takes up physical space between the two rafter ends. Overhang is separate: it is the horizontal distance the rafter continues past the wall plate to form the eave, and it is not reduced by the ridge deduction because it has nothing to do with the ridge end of the board. Line length uses the run after the ridge deduction; total length adds the overhang portion on top of that.

Line length versus total length

Line length is the sloped distance from the ridge centerline down to the point where the rafter crosses the wall plate. It is the number that matters for framing the main triangle of the roof. Total length adds the overhang tail, the part of the same board that keeps going past the wall to create the eave overhang. When you are buying lumber, total length, rounded up to the next stock board length, is what you actually order, since the overhang is cut from the same physical board as the rest of the rafter, not added on separately.

What a birdsmouth is, and why it does not change the length

A birdsmouth, sometimes called a seat cut or a heel and plumb cut, is a notch cut into the underside of the rafter at the point where it crosses the wall plate. It lets the rafter sit flush and bear its load properly on top of the wall instead of resting on a single sharp corner. The notch removes a wedge of material at that one location, but it does not shorten the rafter along its slope: the line length from ridge to plate is measured along the top edge of the board regardless of what is cut away underneath at the plate crossing. Think of the birdsmouth as where the rafter sits, not how long it is.

A worked example

Take a 24 foot building span, a 6/12 pitch, a 12 inch overhang, and a 1.5 inch ridge board. Half the span is 12 feet, or 144 inches; half the ridge thickness is 0.75 inches, so the run used for the calculation is 143.25 inches. The slope factor for a 6/12 pitch is the square root of 6 squared plus 12 squared, divided by 12, which is 1.118. Line length is 143.25 times 1.118, about 160.16 inches, or roughly 13 feet 4.2 inches. The overhang adds 12 inches times the same 1.118 slope factor, about 13.4 inches. Total rafter length comes out to roughly 173.6 inches, a little over 14 feet 5 inches, which is the number you would round up to the nearest stock board length when ordering material.

When to bring in a professional

Everything on this page is geometry: given a span, a pitch, an overhang, and a ridge thickness, how long is the board. It says nothing about whether a given piece of lumber is strong enough to span that distance under roof load, snow load, or point loads from equipment. Allowable span depends on species, grade, spacing, and the load requirements in your local building code, and that is a structural engineering question, not a geometry one. Once you know the length you need from this page, take the span and load question to a licensed professional or your local code office before you buy lumber.

This page pairs with the Roof Pitch Chart for the full standard 1/12 to 24/12 reference table, and the Roof Pitch Calculator for solving angle, slope factor, and grade from any rise, run, or angle, including the inverse direction this page's pitch input assumes.

Frequently asked questions

What is the difference between rafter line length and total length?

Line length is the sloped distance from the ridge to the wall plate, following the run after any ridge board deduction. Total length adds the overhang, the portion of the rafter that continues past the wall plate to form the eave. If you are ordering lumber, total length (rounded up to a stock length) is the number you actually need.

Why does the ridge board thickness matter for rafter length?

The building span gives you the full horizontal distance, but two opposing common rafters meet at the ridge board, not at a single point in space. Each rafter is shortened by half the ridge board thickness so both rafters plus the ridge board add back up to the full span. Skipping this deduction makes every rafter slightly too long.

What is a birdsmouth and does it change the rafter length?

A birdsmouth, also called a seat cut or heel and plumb cut, is the notch cut into the underside of a rafter where it crosses the wall plate. It changes how the rafter bears on the wall, not how long the sloped board is: the line length from ridge to plate is the same whether or not a birdsmouth is cut, because the notch removes material without shortening the rafter along its slope.

Does this calculator tell me what size lumber to use?

No. This tool only computes geometric length: how long a rafter is based on span, pitch, overhang, and ridge thickness. It does not calculate allowable span, which depends on lumber species, grade, spacing, and load, including snow load in many regions. Span tables and lumber sizing should come from your local building code or a licensed professional.

How do I figure out how many rafters I need?

Divide the wall length by your on-center spacing (commonly 16 or 24 inches), round up, then add one for the starting rafter. A 30 foot wall at 16 inch spacing needs 360 divided by 16, rounded up to 23, plus 1, for 24 common rafters along that wall. This calculator includes that as an optional output when you provide a wall length and spacing.

Can I use this for a shed roof or only a gable roof?

The line length, overhang, and rise math here applies to any single common rafter run, gable or shed. For a shed roof there is no ridge board deduction on the high side (that wall simply supports the rafter directly), so set the ridge thickness field to 0 for that side and keep it as this tool for the low-side wall plate to overhang calculation.

Related tools

Roof Pitch ChartRoof Pitch CalculatorRoof Area CalculatorHip & Valley Rafter CalculatorShingle Squares & Bundles Calculator