Rafter & Roof Pitch Calculator
Solve the common-rafter triangle: enter the pitch (rise per 12 of run), the horizontal run, and the overhang, and get the rafter length along the slope, the rise, the slope factor, and the plumb-cut angle. This is layout geometry only — it tells you how long the rafter is and where to cut it, not what size lumber it must be. Rafter member sizing comes from the AWC/IRC span tables or an engineer. Free, no login.
Roof
Rafter
Length along the slope incl. overhang; add for ridge thickness and tail/birdsmouth as needed.
How this calculator works
Everything comes off the slope factor — the hypotenuse of a 12-base right triangle with the pitch as its rise:
slope factor = √(pitch² + 12²) ÷ 12 · rafter = (run + overhang) × SF · angle = arctan(pitch ÷ 12)
The reported length is measured along the rafter, tail included: the overhang you enter is its horizontal projection, converted along the same slope. Two things the math cannot see, so adjust at layout: framing to a ridge board shortens the rafter by half the ridge thickness at the plumb cut (3/4" for 2× stock), and a decorative tail cut adds length. The angle output is the plumb-cut angle — the same setting for ridge cut, birdsmouth heel, and tail; the level (seat) cut is its complement, since the two always total 90°. For a symmetrical gable the run is half the span; on a shed roof or off-center ridge, run each side separately.
Worked example
A 6:12 gable, 24 ft wide (12 ft run), with a 1 ft overhang:
- Slope factor: √(6² + 12²) ÷ 12 = 1.1180.
- Rafter: (12 + 1) × 1.1180 = 14.534 ft along the slope, tail included — before deducting half the ridge thickness.
- Rise: 12 × (6 ÷ 12) = 6 ft to the ridge centerline.
- Angle: arctan(6/12) = 26.57° — the speed-square setting for every plumb cut on the rafter.
Enter the same roof above (pitch 6, run 12, overhang 1) to reproduce it.
Reference: slope factor and plumb-cut angle by pitch
Computed from the same formula the calculator uses. The slope factor is also the rafter length per foot of run — and the multiplier that turns plan area into true roof area for sheathing and shingle takeoffs. It applies to common rafters only; hips and valleys run diagonally in plan and carry their own, longer factor.
| Pitch | Slope factor | Plumb-cut angle |
|---|---|---|
| 2:12 | 1.0138 | 9.46° |
| 3:12 | 1.0308 | 14.04° |
| 4:12 | 1.0541 | 18.43° |
| 5:12 | 1.0833 | 22.62° |
| 6:12 | 1.1180 | 26.57° |
| 7:12 | 1.1577 | 30.26° |
| 8:12 | 1.2019 | 33.69° |
| 9:12 | 1.2500 | 36.87° |
| 10:12 | 1.3017 | 39.81° |
| 12:12 | 1.4142 | 45° |
Frequently asked questions
How do you calculate rafter length from pitch and run?
Multiply the horizontal run by the slope factor for the pitch: √(rise² + 12²) ÷ 12. For a 6:12 roof the slope factor is 1.1180, so a 12 ft run gives a 13.42 ft rafter before the overhang. This calculator does that math and converts the overhang along the same slope, so the length it reports is measured along the rafter, tail included.
Is the rafter run half the building width?
For a symmetrical gable, yes — the run is the horizontal distance from the outside of the wall plate to the ridge centerline, which is half the span. The calculated length runs all the way to that centerline, so when you frame to a ridge board, shorten the rafter by half the ridge thickness at the plumb cut — 3/4 in. for 2x ridge stock. On an off-center ridge or shed roof, each side has its own run; enter them separately.
What angle do I cut a rafter for a 6/12 pitch?
26.57° — the calculator's angle output is arctan(rise/12), the angle between the rafter and horizontal. Set a speed square or miter saw to that angle for the plumb cut at the ridge; the level (seat) cut of the birdsmouth is square to it, since the two always total 90°. Every plumb cut on the rafter — ridge, birdsmouth heel, tail — uses the same angle.
Does the rafter length include the overhang?
Yes. Enter the overhang as its horizontal projection in feet; the calculator converts it along the slope with the same slope factor and includes it in the reported length. What is not included: the deduction for half the ridge thickness, and any extra for a decorative tail cut — adjust for those at layout, as the note under the results says.
What is the minimum roof pitch for asphalt shingles?
Asphalt shingles need at least a 2:12 slope, and from 2:12 up to 4:12 the IRC requires doubled underlayment; 4:12 and steeper is standard shingle territory. Below 2:12 you are into low-slope territory — rolled roofing or membrane, not shingles. Manufacturers publish their own slope limits too, so check the wrapper and verify against the building code adopted in your jurisdiction.
What else is the slope factor good for?
It converts any horizontal (plan) dimension into a length along the roof surface, which makes it the fastest route to a roof takeoff: plan area × slope factor = actual roof area for sheathing, underlayment, and shingles. A 1,200 sq ft plan footprint under a 6:12 roof is about 1,342 sq ft of surface. Note it applies to common rafters and roof area only — hip and valley rafters run diagonally in plan and need their own, longer factor.
Method: right-triangle geometry — slope factor √(pitch² + 144) ÷ 12, length = (run + overhang) × factor along the slope, angle = arctan(pitch/12). Pure layout math: it sizes nothing structural. Rafter depth, species, grade, and spacing come from the code span tables (AWC / IRC R802) or an engineer, and roofing materials carry their own pitch limits (asphalt shingles need 2:12 minimum, with doubled underlayment from 2:12 to 4:12 per the IRC) — verify both against the code adopted in your jurisdiction. Ridge deduction and tail details are adjusted at layout, as noted above.
Pair with the Roof Pitch Multiplier for quick pitch-to-factor conversions, the Roof Area & Pitch Calculator to turn the footprint into true roof area, or the Right-Angle (3-4-5) Calculator for any other rise/run/diagonal problem.