If you are building a shed, a garage, or a whole house, one measurement matters more than almost any other: the length of your roof rafters. Cut them too short and nothing lines up at the ridge; cut them too long and your eaves sag. A Rafter Length Calculator removes the guesswork by turning three simple inputs — roof span, roof pitch, and overhang — into an exact rafter length you can mark on a board and cut with confidence.
This guide covers everything behind that number: what rafter length means, how roof pitch is read, the simple geometry of the calculation, how to measure span correctly, how to allow for the ridge board and the birdsmouth cut, and the cutting tips that separate a clean, straight roof from a wavy one.
What Rafter Length Means
A rafter is the sloped board running from the outside wall up to the ridge, the peak of the roof. The rafter length is the distance along that slope — sometimes called the sloped length on framing plans. It is the number you need before cutting a single rafter.
Keep it separate from three related terms. The run is the horizontal distance the rafter covers — exactly half the span on a symmetrical gable roof. The rise is the vertical distance from the top of the wall plate to the top of the ridge. The span is the full horizontal width of the building, outside wall to outside wall. Rafter length is the hypotenuse of the right triangle formed by the run and the rise, so it is always longer than the run — dramatically so on steep roofs.
Accuracy matters because rafters are cut in batches. A typical house may need twenty or more identical common rafters, and a quarter-inch error multiplies across the whole roof. A short rafter leaves a gap at the ridge that weakens the joint; a long one pushes the ridge up and throws every later measurement off.
Roof Pitch Explained
The calculator needs the roof pitch — the steepness of the roof. It is the most misunderstood measurement in roofing, so let us settle it.
How pitch is written and read
In North American construction, pitch is written as rise over run with a base run of 12 inches — for example, 6/12, read as six in twelve
. It means the roof rises 6 inches for every 12 inches of horizontal run. A 12/12 roof rises 12 inches per foot of run, a perfect 45-degree angle. To measure an existing roof’s pitch, hold a level horizontally against the roof, mark 12 inches along the level from the contact point, and measure straight down to the roof deck. That vertical distance in inches is your pitch number.
Common pitch ranges and what they mean
- 2/12 to 4/12 — low slope: easy to walk on; rafters barely longer than the run. Needs careful waterproofing since water drains slowly.
- 5/12 to 8/12 — moderate: the sweet spot for most homes. Good drainage and straightforward cutting. A 6/12 is the most common residential pitch.
- 9/12 to 12/12 — steep: excellent drainage, but rafters get much longer — a 12/12 rafter is about 41 percent longer than its run. Walking the roof usually needs staging or harnesses.
- Over 12/12 — very steep: found on churches and A-frames. Plan for engineered connections and fall protection.
The Math Behind Rafter Length
Every common rafter is the hypotenuse of a right triangle, and the Pythagorean theorem — a² + b² = c² — gives the exact length from just the run and the rise.
The right triangle in every roof
Picture one side of a gable roof. A horizontal line from the outside of the wall to the building’s center is the run (half the span). A vertical line from that center point up to the ridge is the rise. The rafter is the diagonal between them — the hypotenuse. Since rise meets run at a right angle, the theorem applies exactly.
The formula, step by step
- Find the run: run = span ÷ 2. A 24-foot span gives a 12-foot run.
- Find the rise: rise = run × (pitch ÷ 12). A 12-foot run at 6/12 pitch gives a 6-foot rise.
- Apply the theorem: rafter length = √(run² + rise²). Here: √(144 + 36) = √180 ≈ 13.42 ft, about 13 ft 5 in.
- Add the overhang: the rafter tail follows the same slope, so tail length = √(overhang_run² + overhang_rise²), where overhang_rise = overhang_run × (pitch ÷ 12).
- Subtract the ridge allowance: shorten by half the ridge board thickness (details below).
Worked example
Take a 20-foot span, 8/12 pitch, and 16-inch overhang. The run is 10 feet (120 in); the rise is 120 × (8 ÷ 12) = 80 in. Main rafter: √(120² + 80²) = √20800 ≈ 144.22 in. The 16-inch tail rises 16 × (8 ÷ 12) ≈ 10.67 in, adding √(256 + 113.78) ≈ 19.23 in. Total: ≈ 163.45 in, about 13 ft 7½ in. Subtract ¾ in for a standard ridge board and the cut length is about 13 ft 6¾ in. Run the same numbers in the calculator to confirm.
Measuring Roof Span Correctly
The roof span is measured from the outside face of one wall to the outside face of the opposite wall, horizontally, at rafter level. Not the interior width, not the foundation width, and not including siding.
On new construction, take the span from the plans — the building width on the floor or framing plan. On an existing building, measure outside to outside with a long tape, or measure the interior and add both wall thicknesses (typically 3½ in per 2×4 wall or 5½ in per 2×6 wall, plus sheathing and siding). A building measuring 23 ft 5 in inside can easily be a true 24-foot span — and that half foot changes every rafter by three inches.
Two more pitfalls: measure both ends of the building, since walls on older structures are rarely perfectly parallel — use the larger span. And remember the run is half the span only on a symmetrical gable roof; saltbox and shed roofs need each side calculated separately.
Common Rafter Length Tables
Before calculators, carpenters read rafter tables off their framing squares. The classic table gives rafter length per foot of run for each pitch — multiply by your run in feet. Key values (verify with the calculator using a 2-foot span and zero overhang):
- 3/12: 12.37 in per foot of run
- 4/12: 12.65 in per foot of run
- 5/12: 13.00 in per foot of run
- 6/12: 13.42 in per foot of run
- 7/12: 13.89 in per foot of run
- 8/12: 14.42 in per foot of run
- 10/12: 15.62 in per foot of run
- 12/12: 16.97 in per foot of run
For a 28-foot span (14-foot run) at 6/12: 14 × 13.42 = 187.88 in, about 15 ft 7⅞ in before overhang and ridge adjustments. These tables are also handy in the field when your phone is dead and the framing square is in your hand.
Ridge Board Allowance
The raw rafter length is measured to the centerline of the ridge, but real rafters stop at the face of the ridge board — the vertical board (usually 1½ in thick) that rafter tops nail into. Skip this adjustment and every rafter comes out half a board thickness too long.
How to subtract the ridge correctly
Subtract half the ridge board thickness from the calculated length — ¾ in for a standard 1½-in board, 1¾ in for a 3½-in laminated beam. The cleanest method: after marking the ridge plumb cut, measure back along the rafter by half the ridge thickness and make that your cut line. Exception: roofs framed with no ridge board (rafter pairs meeting directly at the peak) need no allowance. For load-bearing ridge beams, check the beam schedule — bearing requirements may change the adjustment.
The Birdsmouth Cut
The birdsmouth is the notch in the underside of each rafter where it sits on the wall plate — a flat seat to bear on and a plumb face to nail through. It locks the roof geometry in place; a rafter without one can slide or roll under load.
Marking the birdsmouth
Mark it with the same pitch setting on the framing square, pivoting at the point where the rafter crosses the outside face of the wall. Mark the seat cut (horizontal) and the heel cut (vertical). The seat must sit fully on the plate, and codes generally limit notch depth to one-third of the rafter’s depth — never deeper, or you gut the rafter at its highest-stress point. Mark the first rafter carefully, test-fit it, and use it as the pattern rafter for the rest.
How the birdsmouth affects your length
The calculator measures along the top edge of the rafter, while the birdsmouth is cut into the bottom edge. Standard square layout — stepping off the run along the top edge — handles this automatically. What you must not do is measure the calculated length along the bottom edge; the notch would land in the wrong place and the ridge height would be off. Mark from the top and the geometry takes care of itself.
Cutting and Installing Tips
- Make one perfect pattern rafter first. Test-fit it at the ridge and plates, check the birdsmouth and overhang, then trace the rest from it.
- Mark with a sharp pencil or knife. A fat pencil line can be an eighth of an inch wide — and errors compound across twenty rafters.
- Cut on the waste side of the line. The kerf removes about an eighth of an inch; keep the blade on the offcut side.
- Install every board crown-up. Sight down each rafter; mixed crowns telegraph through the deck as waves.
- Brace the ridge before setting rafters. Nail rafters in pairs from the ends toward the middle to keep the ridge plumb.
- Trim tails in place with a string line. Stretch a string across the rafter tails and cut to it for a dead-straight fascia line.
Mistakes to Avoid
- Measuring span inside to inside. Forgetting wall thicknesses shortens every rafter. Always measure outside face to outside face.
- Forgetting the ridge board allowance. The extra ¾ in per rafter pushes the ridge up and opens gaps at the birdsmouth.
- Confusing pitch formats. Entering 6/12 as 6 degrees produces wildly wrong lengths. Confirm the format first.
- Cutting the birdsmouth too deep. Deeper than one-third of the rafter depth fails inspection and weakens the board.
- Measuring along the wrong edge. Layout follows the top edge of the rafter, not the bottom.
- Ignoring the overhang in the cut list. Add the tail before buying lumber, or plan a second lumber run.
- Skipping the test fit. Fit one pattern rafter before cutting the rest — small errors become twenty miscut boards otherwise.
Frequently Asked Questions
What is the formula for rafter length?
Rafter length = √(run² + rise²), where the run is half the roof span and the rise is the run times the pitch divided by 12. Add the sloped overhang tail, then subtract half the ridge board thickness for the final cut length.
How do I calculate rafter length for a 6/12 pitch?
Take half your span as the run, multiply the run by 0.5 (6 ÷ 12) to get the rise, then compute √(run² + rise²). A 24-foot span gives a 12-foot run and 6-foot rise: √(144 + 36) = √180 ≈ 13.42 feet, before overhang and ridge adjustments.
What does 6/12 roof pitch mean?
A 6/12 pitch means the roof rises 6 inches vertically for every 12 inches of horizontal run. It is one of the most common residential pitches — moderate slope, good drainage, and still reasonably safe to walk on during construction.
Do I measure rafter length to the ridge or the ridge board?
Raw calculations measure to the ridge centerline, but the actual cut stops at the face of the ridge board. Subtract half the ridge board thickness — typically ¾ inch for a standard 1½-inch board — measured along the rafter.
How much overhang should I add to my rafters?
Typical residential eave overhangs run 12 to 24 inches horizontally from the outside wall. Wider overhangs protect walls and windows better but increase uplift forces in high-wind areas, so check local code for limits.
What is a birdsmouth cut and is it required?
A birdsmouth is the notch in the rafter’s underside where it bears on the wall plate, made of a horizontal seat cut and a vertical heel cut. Most building codes require it because it provides full bearing, a solid nailing surface, and keeps the rafter from sliding under load.
How deep can I cut a birdsmouth notch?
Codes generally limit the notch to one-third of the rafter’s depth — about 2⅜ inches on a 2×8. Cutting deeper weakens the rafter at its highest-stress point and will fail inspection.
What size lumber should I use for rafters?
It depends on span, spacing, pitch, snow load, and species — a 2×6 may suit a short shed while a house can need 2×10s or 2×12s. Check local code span tables or consult an engineer; the length calculator does not determine structural adequacy.
How do I find the pitch of an existing roof?
Hold a level horizontally against the roof, measure 12 inches along it from the contact point, then measure vertically down to the roof deck. The vertical inches equal the pitch — a 7-inch drop means a 7/12 pitch.
Can I use this calculator for a single-slope shed roof?
Yes, with one adjustment: a shed roof has no center ridge, so the run is the full horizontal distance from the high wall to the low wall. Enter that full distance doubled as the span value to get the correct result.
What is the difference between a common rafter and a hip rafter?
A common rafter runs straight from wall plate to ridge at 90 degrees; a hip rafter runs diagonally from a building corner to the ridge. Hip rafters cover a longer diagonal run and use different math — this calculator is designed for common rafters only.
Should rafters be installed crown up or crown down?
Always crown up, with the board’s natural bow arching toward the sky. Loads will gradually flatten a crown-up board, while a crown-down board sags further and creates visible dips in the roof deck.
How accurate does rafter length need to be?
Aim for 1/16 inch on your pattern rafter and keep all rafters within about 1/8 inch of each other. Larger variations show as waves in the deck and fascia, and ridge gaps over 1/8 inch weaken the nailed connections.
Do I need to account for roof decking thickness?
Decking thickness does not change rafter length, but it does add height above the rafter tops — which matters when matching an existing roofline or setting fascia heights. For length calculations alone, you can ignore it.
Can rafter length be calculated without knowing the pitch?
You need either the pitch or the rise, since the calculation requires both legs of the right triangle. If you know the total rise, divide it by the run and multiply by 12 to derive the pitch, then calculate as normal.