Roof Framing Calculator: Formulas, Methods, and a Worked Example
Enter building length, width, pitch & overhang to calculate rafter length, ridge board, hip rafters, rafter count, board feet & roof area instantly.
Roof Framing Calculator: Formulas, Methods, and a Worked Example
Roof framing involves calculating rafter lengths, ridge board dimensions, rafter spacing, and material quantities before any cutting begins. This guide breaks down the core formulas used in a roof framing calculator, along with a complete worked example.
1. Roof Angle (Plumb Cut Angle)
The roof angle is derived from the pitch (rise per 12 inches of run) and is the base value used in every other calculation.
Formula: θ = arctan(Pitch ÷ 12)
2. Common Rafter Length
The run is half the building width, adjusted for half the ridge board thickness. The rise is the run multiplied by the pitch ratio. Overhang is added along the slope.
Formula:
3. Ridge Board Length
For a gable roof, the ridge runs the full building length. For a hip roof, it's shortened by the building width.
Formula (Gable):
Formula (Hip):
4. Hip / Valley Rafter Length
A hip rafter spans the diagonal of the square formed by two common rafter runs, so its run is the common run multiplied by √2.
Formula:
5. Number of Rafters
Based on building length, spacing (on-center), and one extra rafter to close the run. Multiply by 2 for both roof sides.
Formula:
6. Total Lumber Length & Board Feet
Total linear footage comes from multiplying rafter count by rafter length. Board feet converts that into a lumber order quantity using nominal stock dimensions.
Formula:
7. Seat Cut Angle
The seat cut is complementary to the plumb cut angle.
Formula:
8. Birdsmouth Depth
Building codes typically cap the birdsmouth notch at one-third of the rafter's actual depth to preserve structural strength.
Formula:
9. Roof Area
For a gable roof, total roof area is both slopes combined.
Formula:
Worked Example
Let's calculate a gable roof with the following inputs: Building Width = 30 ft, Building Length = 40 ft, Pitch = 6/12, Overhang = 18 in, Rafter Spacing = 16 in o.c., Ridge Thickness = 1.5 in, Rafter Stock = 2×6.
Step 1 — Roof Angle:
Step 2 — Run and Rise:
Step 3 — Common Rafter Length:
Step 4 — Ridge Board Length:
Step 5 — Number of Rafters:
Step 6 — Total Lumber & Board Feet:
Step 7 — Seat Cut Angle:
Step 8 — Birdsmouth Depth (2×6, actual depth 5.5"):
Step 9 — Roof Area:
So for a 30×40 ft gable roof at a 6/12 pitch, you'd need rafters roughly 18'4-5/8" long, 62 rafters total, around 1,140 board feet of 2×6 lumber, and the roof covers approximately 1,470 square feet.