Rafter Length Calculator

Figure rafter length, birdsmouth cuts, plumb angles, and material cost with our free calculator. Handles common, hip, valley, and jack rafters.

Select Currency
Unit System
Roof Geometry
Common rafter length is measured along the top edge from the outside of the wall plate to the centerline of the ridge. Run = (Span − Ridge Thickness) / 2.
Rafter Details
Birdsmouth Cut
Birdsmouth rule: The perpendicular notch depth (material removed from the rafter's bottom edge) must not exceed 25% of the rafter depth for structural safety. For steeper pitches with a wide plate, reduce the seat cut length to stay within the limit.
Materials & Cost
%
$ /ft
$ /ft
$
$
$
Rafter Length Summary
Rafter Length: —
Roof Geometry
Building Span—
Run (ridge to wall)—
Total Rise—
Pitch (rise:12)—
Pitch (degrees)—
Pitch Multiplier—
Rafter Lengths
Rafter Type—
Rafter Line Length—
Overhang (along slope)—
Total Rafter Length—
Rafter Spacing (o.c.)—
Number of Rafters per Side—
Total Rafters—
Angles
Plumb Cut Angle (top)—
Seat Cut Angle (birdsmouth)—
Rafter Slope Angle—
Birdsmouth Cut
Seat Cut Length (horizontal)—
Plumb Cut Height (vertical)—
Perpendicular Notch Depth—
Max Notch Allowed—
Notch Compliance—
Height Above Plate (HAP)—
Height at Ridge (top of rafter)—
Materials
Rafter Size—
Total Rafter Lumber Length—
Ridge Board Length—
Ridge Board Size—
Cost Breakdown
Rafter Lumber Cost—
Ridge Board Cost—
Hardware / Connectors—
Material Subtotal—
Labor Cost—
Additional Cost—
Cost per Rafter—
Estimated Total Cost—
ComponentValueUnit

Enter details and calculate to see breakdown.

Powered by Techraxy

Creator & Reviewer

Faiq Ur Rahman

Founder & CEO, Techraxy

Faiq Ur Rahman is a web designer, digital product developer, and Founder of Techraxy, a growing platform of online calculators and utility tools. He specializes in building structured, user-friendly tools focused on finance, health, conversions, productivity, and everyday problem-solving. He is passionate about developing practical digital solutions that make complex tasks simpler for users worldwide.

Share:

Rate this Tool

User Ratings:

0
0 out of 5 stars (based on 0 reviews)
Excellent
Very good
Average
Poor
Terrible

ADVERTISEMENT

ADVERTISEMENT

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

  1. Choose your currency and unit system. Imperial uses feet and inches. Metric uses meters and millimeters.

  2. Enter building span and length. Span is wall-to-wall across the ridge. Length runs along the ridge line.

  3. Enter the roof pitch. Rise:12, degrees, or percent all work.

  4. Set the overhang, ridge thickness, and rafter spacing.

  5. Pick a rafter type. Common, hip, valley, or jack.

  6. Choose a rafter size or enter custom width and depth.

  7. Confirm the birdsmouth seat cut. Default matches the wall plate width.

  8. 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.

Frequently Asked Questions

How do I calculate rafter length?

Divide run by the cosine of the pitch angle. Run is half the span minus half the ridge thickness. Add the overhang divided by the same cosine for total rafter length including the tail.

 

What is the pitch multiplier?

Square root of 1 plus pitch ratio squared. For a 6:12 pitch, that’s √(1 + 0.25) = 1.118. Multiply plan run or plan area by this number to get sloped dimensions.

 

How many rafters do I need for a 40-foot building?

At 16 inches on center, you need 31 rafters per side, so 62 total. The calculator reports the actual spacing after the count rounds up, which usually lands just under 16 inches.

 

What is the maximum notch depth on a rafter?

25% of the rafter depth under IRC. A 2×10 allows 2.31 inches of perpendicular notch. A 2×8 allows 1.81. Some codes allow 33%, and a conservative 20% cap is common.

 

What is HAP in roof framing?

Height above plate. It’s the vertical distance from the top of the wall plate to the top of the rafter at the birdsmouth. Rafter depth divided by the cosine of the pitch angle gives you HAP.

 

What is the difference between a hip and a valley rafter?

A hip rafter runs from an outside corner to the ridge. A valley rafter runs from an inside corner to the ridge. Both travel diagonally, so their plan run is the standard run multiplied by √2.

 

How do I calculate the plumb cut angle?

It’s the same as the pitch angle. At 7:12, that’s about 30.26°. Set your speed square to 7 and 12 and mark the plumb cut. The calculator reports the angle in the summary.

 

Can I use this for a shed roof?

Yes, but double the span input. A shed roof has one run instead of two, so entering the actual run as span gives half the rafter length. Double it or treat the result as half.

 

What is the difference between rise and run?

Rise is vertical, run is horizontal. Rise runs from the plate to the ridge. Run runs from the wall face to the ridge centerline. Both must be in the same units.

 

How accurate is the jack rafter calculation?

Approximate. The tool uses 70% of the common run as a rough figure. Actual jack lengths depend on spacing and how far they sit from the hip. For precise work, measure each jack individually.

 

Do I need a permit for a roof frame?

Almost always. Roof framing is structural and gets inspected. Most jurisdictions require a permit, a set of plans, and a framing inspection before the roof sheathing goes on. Check with your local building department before starting.

 

Can I use this calculator for a truss roof?

Partially. Trusses are engineered and come with their own span tables. This tool is for stick-framed rafters. Use it for a truss roof only if you’re checking ridge height or material estimates, not the truss members themselves.

Disclaimer

This calculator provides geometric and cost estimates based on the inputs you supply. It doesn’t replace a structural engineer’s review, a permit inspection, or a local building code. Rafter spans depend on species, grade, and load, none of which are modeled here. The birdsmouth check only verifies notch depth, not whether the rafter is adequate for the span. Jack rafter lengths use a rough approximation. Verify all dimensions, materials, and connections with a qualified engineer or inspector before construction.

ADVERTISEMENT

ADVERTISEMENT