Rafter Calculator (Roof Framing — Length, Birdsmouth & Rafter Count)
Find your rafter length and cuts instantly.
🕒 Last updated: September 2, 2026
Inputs
ℹ️Gable: two equal slopes meeting at a center ridge. Shed/Lean-To: one continuous slope from a low wall to a high wall. Hip and valley roofs aren't modeled.
ℹ️Outside wall to outside wall, perpendicular to the ridge — each rafter's run is half this span.
ℹ️The length running along the ridge (or along the low/high walls for a shed roof) — determines the rafter count.
ℹ️Rise per 12 inches of run — a 6/12 roof rises 6 inches for every 12 inches of horizontal run. Common residential pitches range roughly 4/12 to 12/12.
ℹ️Half of this thickness is subtracted from each rafter's run, since both rafters meet at the ridge board.
ℹ️Horizontal projection of the rafter tail past the outer wall face, before any fascia trim.
ℹ️Sets the rafter's actual depth, used for the birdsmouth notch-depth check and HAP — verify span adequacy separately against a span table.
ℹ️The wall this rafter lands on — sets the birdsmouth seat cut length (2x4 = 3.5", 2x6 = 5.5").
Waste & Lumber
ℹ️Accounts for cut-offs, damaged pieces, and layout adjustments — 10% is a common estimating default.
ℹ️Standard stock length used to buy ridge board lumber — affects how many boards are needed after joints.
Cost
Total Rafters Needed
55
2x8, includes 10% waste — both slopes
Rafter Length to Buy
16 ft
Cut length 173.57" (14.46 ft) including the overhang tail
Rafter Geometry
Pitch: 6/12 (26.57° from horizontal)
Run: 143.25" (11.94 ft)
Rise: 71.63" (5.97 ft)
Line length (ridge to wall): 160.16"
Overhang tail: 13.42" (12" horizontal overhang)
Total rafter length: 173.57"
Birdsmouth & Cuts
Plumb cut angle: 26.57° (speed square/saw bevel setting)
Seat cut length: 3.5" (2x4 plate)
Notch depth (perpendicular to rafter): 1.57"
Max notch depth (1/4 rule): 1.81"
Heel height (plumb rise of the heel cut): 1.75"
Height above plate (HAP): 6.36"
Rafter Count
Rafters per side: 25 (16" O.C. over 32 ft)
Both slopes: 25 × 2 = 50
Total with 10% waste: 55
Ridge Board
Length: 32 ft (building length)
Boards needed: 2 (16 ft stock)
Assumptions Used
Standard US residential common-rafter framing (gable or shed, no hip/valley rafters). Rafter length, run, rise, and cut angles are direct trigonometry from your entered pitch, span, and overhang — not a code-table lookup, so they apply regardless of your local code edition. Notch depth (perpendicular to the rafter) and heel height (the vertical rise of the heel cut) are two distinct birdsmouth measurements — the 1/4 notch-depth limit is commonly cited as required by IRC R802.7.1 (some code editions cross-reference the equivalent R502.8 floor-joist rule) — verify against your locally adopted code edition before cutting. Rafter count uses the same on-center spacing formula as field studs, and total rafter length is rounded up to a real stock lumber length where one covers it — a rafter exceeding the longest standard stock length (24 ft) is flagged for a special-order, spliced, or engineered solution instead. This is a reference estimate for a material takeoff, not a structural design — snow load, wind uplift, and rafter size adequacy for your span must be verified against the adopted code and a structural professional.
Bill of Materials
Main material: 55 pcs + recommended tools
+−
Bill of Materials
Main material: 55 pcs + recommended tools
Computed items reflect your entered span, pitch, and length; consumables below are general recommendations — actual needs vary by product, wind/seismic zone, and site conditions.
For Your Job
Rafters
Ridge Board
General Tools & Consumables
Framing nails / rafter fasteners
Hurricane ties / rafter-to-plate connectors
Rafter ties or collar ties (lumber)
Framing nailer or hammer
Circular saw or miter saw
Speed square / framing square
Tape measure
Chalk line
4 ft level
Roof/ridge bracing or temporary supports
Safety glasses, work gloves & fall protection
Diagram simplified for clarity (not to scale)
What Is a Rafter Calculator?
A rafter calculator finds the length, cut angles, birdsmouth details, and total count of common rafters needed to frame a gable or shed roof — the dominant residential roof-framing method in the US. It starts from your building span and roof pitch (rise per 12" of run), applies trigonometry to find each rafter's run, rise, and diagonal length, then adds the overhang tail and computes the exact seat cut and plumb cut angle.
Rafter takeoffs are done one roof plane at a time — for a roof with multiple sections or mixed pitches, run this calculator once per section and add the results together.
Why pitch changes more than just the roof's look:
- A steeper pitch means a longer rafter for the same building span
- Pitch directly sets the plumb cut angle and the birdsmouth notch depth
- A steep pitch on shallow rafter lumber can exceed the commonly-cited 1/4 birdsmouth-depth rule
- Gable roofs need double the rafters of a shed roof for the same building length, since both slopes need framing
Rafter Calculator Formula: How Is It Determined?
Rafter geometry, birdsmouth cuts, and rafter count, calculated separately and combined into a material takeoff.
Step 1 — Rafter Run, Rise & Length
Run = Gable: (Span − Ridge Thickness) ÷ 2 | Shed: full Span
Angle = arctan(Pitch ÷ 12)
Rise = Run × (Pitch ÷ 12)
Line Length = Run ÷ cos(Angle)
Tail Length = Overhang ÷ cos(Angle)
Total Rafter Length = Line Length + Tail Length
This is direct trigonometry applied to your entered span, pitch, and overhang — a Pythagorean relationship between run and rise, not a code-table lookup, so it applies regardless of code edition. Total length is then rounded up to the nearest real stock lumber length.
Step 2 — Birdsmouth & Cuts
Seat Cut = Wall Plate Width
Plumb Cut Angle = Angle (from horizontal)
Notch Depth = Seat Cut × sin(Angle)
Heel Height = Seat Cut × tan(Angle)
Max Notch Depth (1/4 rule) = Rafter Depth ÷ 4
HAP = (Rafter Depth ÷ cos(Angle)) − Heel Height
The seat cut rests flat on the top plate. Notch depth (measured perpendicular to the rafter, the figure the 1/4 rule applies to) and heel height (the vertical rise of the plumb heel cut) are two distinct measurements — HAP (Height Above Plate) is the rafter's full vertical extent minus the heel height the notch removes. The 1/4 notch-depth rule is commonly cited as required by IRC R802.7.1 — this calculator flags any pitch/lumber combination that exceeds it, but verify against your locally adopted code edition.
Step 3 — Rafter Count & Ridge Board
Rafters per Side = ceil((Building Length in inches) ÷ Spacing) + 1
Total Rafters = Gable: Rafters per Side × 2 | Shed: Rafters per Side
Ridge Board Length = Building Length (Gable roofs only)
Rafter count uses the same on-center spacing formula as field studs. A gable roof doubles the count to cover both slopes; a shed roof has only one slope and no ridge board.
Worked Example
This example walks through your current inputs above, using the same steps as the Formula section.
Input Values Used
| Input | Value | Why it is used |
|---|---|---|
| Roof type / span | Gable / 24 ft | Sets whether run is half or full span |
| Pitch | 6/12 (26.57°) | Sets rise, length, and cut angles |
| Rafter lumber / wall plate | 2x8 / 2x4 | Sets birdsmouth notch depth check and HAP |
Step 1 — Rafter Run, Rise & Length
| Calculation | Result |
|---|---|
| Run | 143.25" |
| Rise | 71.63" |
| Line length | 160.16" |
| Overhang tail | 13.42" |
| Total rafter length | 173.57" (16 ft stock) |
Step 2 — Birdsmouth & Cuts
| Calculation | Result |
|---|---|
| Seat cut | 3.5" |
| Plumb cut angle | 26.57° |
| Notch depth (max 1.81") | 1.57" |
| Heel height | 1.75" |
| HAP | 6.36" |
Step 3 — Rafter Count & Ridge Board
| Calculation | Result |
|---|---|
| Rafters per side | 25 |
| Total rafters (with 10% waste) | 55 |
| Ridge boards (16 ft, 32 ft total) | 2 |
Therefore, this 24 ft span, 6/12 pitch roof needs approximately 55 rafters (16 ft stock) and 2 ridge boards.
Essential Checklist+−
Complete these critical checks before approving the work or proceeding to the next construction stage.
✓Roof Geometry Inputs+-
- Building span and length confirmed from actual field measurements or plans, not assumed
- Roof pitch entered matches the actual design intent, not a rough guess
- Roof type (Gable vs. Shed) matches the actual structure being framed
- Local building code edition and any local amendments confirmed before finalizing
✓Rafter Sizing & Spacing+-
- Rafter lumber size verified against a real span-rating table for your actual snow/live load — not assumed adequate
- Rafter spacing matches the actual roof load (roofing material, snow load) for this project
✓Birdsmouth, Cuts & Ridge+-
- Birdsmouth notch depth confirmed within the commonly-cited 1/4-of-rafter-depth limit for this pitch/plate combination
- Seat cut length matches the actual wall's top plate width
- HAP (Height Above Plate) confirmed identical on every rafter before cutting a full set
- Ridge board confirmed level and adequately supported (posts/walls) along its length before rafters are hung
- Rafter ties or collar ties included in the framing plan, not just the ridge and rafters
✓Installation & Code Compliance+-
- Rafter-to-top-plate connection (toe-nailing or hurricane ties) confirmed against the adopted code and local wind/seismic requirements
- Ground snow load and wind exposure for this specific site verified separately, not assumed
- Permit and framing inspection requirements confirmed before roof sheathing covers the rafters
- Wide spans, unusual loads, or vaulted (tie-less) ceilings reviewed by a structural engineer or licensed contractor
Full QC Checklist+−
Verification checklist for common-rafter roof framing takeoffs — covering span/pitch inputs, rafter sizing and spacing, birdsmouth/cut accuracy, and installation code compliance. Use the Essential Checklist for critical checks before finalizing, expand to Full QC Checklist for complete verification.
✓Roof Geometry Inputs+-
- Building span and length confirmed from actual field measurements or plans, not assumed
- Roof pitch entered matches the actual design intent, not a rough guess
- Roof type (Gable vs. Shed) matches the actual structure being framed
- Overhang value matches the actual planned eave detail
- Calculation confirmed to represent one roof plane/slope at a time
- Local building code edition and any local amendments confirmed before finalizing
✓Rafter Sizing & Spacing+-
- Rafter lumber size verified against a real span-rating table for your actual snow/live load — not assumed adequate
- Rafter spacing matches the actual roof load (roofing material, snow load) for this project
- Rafter count cross-checked against the actual building length and any planned openings (skylights, chimneys)
- Recommended stock rafter length confirmed available from the actual lumber supplier, or a splice/engineered plan made if it exceeds standard stock
- Gable roof rafter count confirmed to cover both roof slopes, not just one
- Lumber grade and species confirmed appropriate for the rafter's span and local availability
✓Birdsmouth, Cuts & Ridge+-
- Birdsmouth notch depth confirmed within the commonly-cited 1/4-of-rafter-depth limit for this pitch/plate combination
- Seat cut length matches the actual wall's top plate width
- HAP (Height Above Plate) confirmed identical on every rafter before cutting a full set
- Plumb cut angle (saw bevel/speed square setting) set correctly before cutting
- Ridge board thickness input matches the actual ridge lumber being used
- Ridge board confirmed level and adequately supported (posts/walls) along its length before rafters are hung
- Rafter ties or collar ties included in the framing plan, not just the ridge and rafters
✓Installation & Code Compliance+-
- Rafter-to-top-plate connection (toe-nailing or hurricane ties) confirmed against the adopted code and local wind/seismic requirements
- Ground snow load and wind exposure for this specific site verified separately, not assumed
- Roof sheathing, underlayment, and roofing material planned and estimated separately
- Roof ventilation (soffit and ridge/gable vents) planned separately from the rafter framing
- Permit and framing inspection requirements confirmed before roof sheathing covers the rafters
- Wide spans, unusual loads, or vaulted (tie-less) ceilings reviewed by a structural engineer or licensed contractor
Framing Reference Tables
Common roof pitches and their angle/diagonal-length factor, and rafter lumber depths used for birdsmouth checks.
| Pitch | Angle from Horizontal | Diagonal Length Factor (per ft of run) |
|---|---|---|
| 3/12 | 14.0° | 1.031 |
| 4/12 | 18.4° | 1.054 |
| 6/12 | 26.6° | 1.118 |
| 8/12 | 33.7° | 1.202 |
| 9/12 | 36.9° | 1.250 |
| 12/12 | 45.0° | 1.414 |
Rafter Lumber Actual Depths
| Nominal Size | Actual Depth |
|---|---|
| 2x4 | 3.5" |
| 2x6 | 5.5" |
| 2x8 | 7.25" |
| 2x10 | 9.25" |
| 2x12 | 11.25" |
Birdsmouth & Rafter Rules
| Item | Rule |
|---|---|
| Seat cut | = Wall plate width |
| Notch depth (perpendicular to rafter) | = Seat cut × sin(pitch angle) |
| Heel height (vertical rise of heel cut) | = Seat cut × tan(pitch angle) |
| Max notch depth | ≤ 1/4 of rafter's actual depth (commonly cited, IRC R802.7.1) |
| HAP | = (Rafter depth ÷ cos(pitch angle)) − Heel height |
| Rafter count (gable) | = (spacing formula) × 2, both slopes |
| Rafter count (shed) | = (spacing formula), single slope |
Angle/length figures are pure trigonometry from your entered pitch — they hold regardless of code edition. Notch depth and heel height are two distinct measurements at the birdsmouth — the 1/4 notch-depth rule is a code-derived reference, commonly cited as required by IRC R802.7.1 (some code editions cross-reference the equivalent R502.8 floor-joist rule) — verify against your locally adopted code edition before cutting.
When should you use this rafter calculator?
- Planning lumber and cuts for a new gable or shed roof.
- Finding the exact birdsmouth seat cut, notch depth, and plumb cut angle before cutting a pattern rafter.
- Estimating rafters and ridge board for a room addition, porch, shed, or garage roof.
- Comparing how pitch, overhang, or spacing changes total rafter length and count before finalizing a design.
- Cross-checking a framer's material list or a pattern rafter's cuts against an independent estimate.
Quick Framing Tips
- Always cut and test-fit one pattern rafter first — confirm HAP, seat cut, and plumb cut angle on the actual wall before cutting the full set.
- A steeper pitch needs a longer rafter for the same span — check the stock length shown before ordering lumber.
- If the birdsmouth notch depth is flagged as exceeding the 1/4 rule, either step up to a deeper rafter size or use an engineered heel detail instead of over-notching.
- Rafter ties or collar ties resist a gable roof's outward wall thrust — plan them from the start, since this calculator doesn't count them.
- Set your saw bevel or speed square to the plumb cut angle shown, not its complement — a common on-site mix-up.
- A 10% waste factor is a reasonable estimating default — increase it for hip/valley-adjacent sections or complex roof shapes cut from this same rafter stock.
Common Mistakes
- Forgetting to subtract the ridge board thickness on a gable roof, making every rafter slightly too long.
- Cutting a full set of rafters from the calculated numbers without test-fitting one pattern rafter first.
- Notching the birdsmouth deeper than 1/4 of the rafter's depth, weakening the rafter at its highest-stress point.
- Confusing heel height (the vertical rise of the heel cut) with notch depth (the perpendicular material removed, which the 1/4 rule actually limits) — they're different numbers.
- Assuming the selected rafter lumber size is structurally adequate for the span and snow load without checking a span table.
- Skipping rafter ties or collar ties on a gable roof, letting the walls spread outward under roof load over time.
- Mixing up the plumb cut angle with its complement when setting a saw bevel gauge or speed square.
Limitations
- US light-frame residential common-rafter practice only — hip, valley, jack rafters, roof trusses, and non-US framing conventions are not modeled.
- Does not verify rafter size adequacy for your actual span, spacing, and snow/live load — confirm against a span table (e.g. IRC Table R802.5.1) or a structural engineer.
- Does not count rafter ties, collar ties, fasteners, hurricane ties, roof sheathing, underlayment, or roofing material.
- The birdsmouth 1/4 notch-depth rule is a code-derived reference (commonly cited as IRC R802.7.1; some editions cross-reference the equivalent R502.8 floor-joist rule) — verify against your locally adopted code edition before cutting.
- A rafter longer than the largest standard stock length (24 ft) is flagged as needing a special-order, spliced, or engineered solution — this calculator doesn't design that connection or splice detail.
- Assumes a single roof plane with uniform pitch and spacing — does not handle multi-section roofs, dormers, or mixed pitches in a single calculation.
- Does not account for skylights, chimneys, or other roof openings that need doubled or trimmer rafters.
Disclaimer: This calculator provides approximate results for planning and estimation purposes only. Actual requirements may vary based on site conditions, materials, workmanship, and local building regulations. Always consult a qualified engineer, architect, or construction professional before making final decisions.