Cutting rafters without the numbers in front of you is how framing days go long. This calculator gives you the two measurements that matter most before you mark a board: rafter line length and plumb cut angle. Then it adds the birdsmouth dimensions so you know how deep the notch will be, and flags whether that notch passes the IRC 25% rule. Enter span, pitch, and overhang. Pick common, hip, valley, or jack. The tool returns rafter length in feet-inches and decimals, the number of rafters needed at your spacing, ridge board length, and a full cost estimate. Contractors use it for takeoffs. Owner-builders use it to check a set of plans before sawing.
How to Use the Rafter Length Calculator
Choose your currency and unit system. Imperial uses feet and inches. Metric uses meters and millimeters.
Enter building span and length. Span is wall-to-wall across the ridge. Length runs along the ridge line.
Enter the roof pitch. Rise:12, degrees, or percent all work.
Set the overhang, ridge thickness, and rafter spacing.
Pick a rafter type. Common, hip, valley, or jack.
Choose a rafter size or enter custom width and depth.
Confirm the birdsmouth seat cut. Default matches the wall plate width.
Pick a notch limit and ridge board size. Enter unit costs and read the result.
How the Rafter Length Calculator Formula Works
Everything comes from run and pitch. Run is half the span after subtracting half the ridge thickness. Pitch determines the angle. The rafter line length is the hypotenuse of run and rise.
Formula: Run = (Span − Ridge Thickness) ÷ 2
Formula: Rise = Run × Pitch Ratio
Formula: Rafter Line Length = Run ÷ cos(atan(Pitch Ratio))
Formula: Total Rafter Length = (Run + Overhang) ÷ cos(atan(Pitch Ratio))
Formula: Pitch Multiplier = √(1 + Pitch Ratio²)
Formula: Plumb Cut Height = Seat Cut × tan(Pitch Angle)
Formula: Perpendicular Notch Depth = Seat Cut × sin(Pitch Angle)
The pitch multiplier is the shortcut most framers use. Multiply plan run by the multiplier and you have the sloped length. The tool calculates it directly from the pitch ratio, so you can see it in the output.
Rafter type changes the plan run. A common rafter uses the standard run. A hip or valley rafter uses run × √2 (about 1.414). A jack rafter uses 70% of run as a rough approximation. Those aren’t perfect, but they get you close enough for material planning.
The birdsmouth check compares perpendicular notch depth to the max allowed for your rafter depth. IRC caps at 25%. Steep pitches push the notch deeper, so a 2×8 that works at 6:12 may fail at 10:12.
Worked Example
A 28-foot span with 40-foot length, 7:12 pitch, 2×10 rafters at 16 inches on center. Wall plate is 3.5 inches. 12-inch overhang.
Step 1 — Run. (28 − 0.125) ÷ 2 = 13.94 ft.
Step 2 — Pitch ratio. 7 ÷ 12 = 0.5833.
Step 3 — Pitch angle. atan(0.5833) = 30.26°.
Step 4 — Rafter line length. 13.94 ÷ cos(30.26°) = 13.94 ÷ 0.8632 = 16.15 ft.
Step 5 — Overhang along slope. 1 ft ÷ 0.8632 = 1.16 ft.
Step 6 — Total rafter length. 16.15 + 1.16 = 17.31 ft.
Step 7 — Birdsmouth. Plumb cut = 3.5 × tan(30.26°) = 2.04 in. Notch = 3.5 × sin(30.26°) = 1.76 in.
Step 8 — Notch check. 1.76 ÷ 9.25 = 19% of rafter depth. IRC limit is 25%, so it passes.
Step 9 — Rafter count. 40 ft at 16 in on center = 30 spaces, 31 per side, 62 total.
Step 10 — Ridge board. 40 + 2 × 1 = 42 ft.
Interpretation: Order 62 rafters at 17.31 feet each. Total rafter lumber is about 1,073 feet. Ridge board runs 42 feet. At $18 per rafter in 2×10 material and $12 per foot for the ridge, materials land around $1,620. Add labor and you’re at a finished framing number.