Calculate rafter length from roof pitch, building width, overhang, and ridge board dimensions. Includes birdsmouth cut calculations, HAP, rise, angle, and rafter count estimates.
A rafter is a structural member in architecture, typically forming the framework of a roof. Rafters run from the ridge or hip of the roof to the wall plate of the external wall, supporting the roof deck and its associated loads. Common rafters are evenly spaced along the length of the roof and are calculated using the roof pitch, building span, and desired overhang.
Read more on WikipediaDivide the building width by 2 to get the run (horizontal distance from wall to ridge). Subtract half the ridge board thickness from the run. Convert the pitch to a rise-per-foot value (for example, 6/12 means 6 inches of rise for every 12 inches of run). Multiply the adjusted run by the pitch factor to get the rise. Then use the Pythagorean theorem: rafter length equals the square root of (run squared plus rise squared). Add the overhang tail length separately. For a 24-foot wide building with a 6/12 pitch and 1.5-inch ridge board, the run is 11.9375 feet, the rise is 5.9688 feet, and the rafter length is 13.34 feet, or 13 feet 4 inches.
Rafter lumber size depends on the span, spacing, species, grade, and roof loads. For residential roofs with 16-inch on-center spacing, 2x6 rafters span up to about 10 feet, 2x8 rafters span up to about 14 feet, 2x10 rafters span up to about 18 feet, and 2x12 rafters span up to about 22 feet. These spans assume No. 2 grade Douglas Fir or Southern Pine with a combined dead and live load of 30 psf. Higher snow loads, wider spacing, or lower-grade lumber reduce allowable spans. Always verify against local building code span tables or have a structural engineer review your specific situation.
A birdsmouth cut is a notch cut into the underside of a rafter where it sits on the wall plate. It consists of two cuts: the seat cut (horizontal, resting on the top plate) and the plumb cut (vertical, against the outside edge of the wall). The seat cut depth should not exceed one-third of the total rafter depth. For a 2x8 rafter (7.25 inches actual depth), the maximum birdsmouth depth is about 2.4 inches. The HAP (height above plate) is the remaining rafter depth above the seat cut. A minimum HAP of two-thirds the rafter depth is required to maintain structural integrity.
| Pitch | Angle | 20 ft Wide | 24 ft Wide | 28 ft Wide | 32 ft Wide | 36 ft Wide |
|---|---|---|---|---|---|---|
| 4/12 | 18.43 deg | 10.54 | 12.65 | 14.76 | 16.87 | 18.97 |
| 5/12 | 22.62 deg | 10.83 | 13.00 | 15.17 | 17.33 | 19.50 |
| 6/12 | 26.57 deg | 11.18 | 13.42 | 15.65 | 17.89 | 20.12 |
| 7/12 | 30.26 deg | 11.59 | 13.91 | 16.23 | 18.54 | 20.86 |
| 8/12 | 33.69 deg | 12.06 | 14.47 | 16.88 | 19.30 | 21.71 |
| 9/12 | 36.87 deg | 12.50 | 15.00 | 17.50 | 20.00 | 22.50 |
| 10/12 | 39.81 deg | 13.05 | 15.66 | 18.27 | 20.88 | 23.49 |
| 12/12 | 45.00 deg | 14.14 | 16.97 | 19.80 | 22.63 | 25.46 |
Calculated rafter lengths from wall plate to ridge centerline, excluding overhang. Formula: length = (width/2) / cos(atan(pitch/12)). Add overhang tail length and subtract half ridge board thickness for actual cutting length.
Rafter length calculation is fundamentally a right triangle problem. The rafter is the hypotenuse, the horizontal distance from the wall plate to the ridge (the run) is one leg, and the vertical height from the plate to the ridge (the rise) is the other leg. The Pythagorean theorem gives us the rafter length: the square root of (run squared plus rise squared).
What makes rafter calculations more complex than simple geometry is the real-world adjustments you need to make. The building width must be divided by two for a gable roof (since rafters go from each wall to the center ridge). Half the ridge board thickness must be subtracted from the run because the ridge board occupies space at the peak. The overhang adds length beyond the wall. And the birdsmouth cut at the wall plate introduces seat cut and HAP dimensions that affect how the rafter fits.
I have been framing roofs for years, and the most common mistake I see is people calculating the theoretical rafter length and then trying to cut it without accounting for the ridge board reduction or the overhang tail. A rafter that is 3/4 inch too long or too short at the ridge will not seat properly, and when you multiply that error across 40 or 50 rafters, the roof line becomes visibly uneven. Getting the math right before making any cuts saves time, lumber, and frustration.
This calculator handles all the adjustments automatically. You enter the roof pitch, building width, overhang, and ridge board thickness, and it produces the exact cutting length including the overhang tail. It also calculates the birdsmouth dimensions, the number of rafters needed, and the lumber length to order.
The starting point is the basic line length of the rafter from the center of the ridge to the outside of the wall plate:
Run = (Building Width / 2) - (Ridge Board Thickness / 2)
Rise = Run x (Pitch / 12)
Line Length = Square Root of (Run squared + Rise squared)
For a 28-foot wide building with a 6/12 pitch and 1.5" ridge board:
Run = (28 / 2) - (1.5 / 24) = 14 - 0.0625 = 13.9375 feet (or 13' 11-1/4")
Rise = 13.9375 x (6/12) = 6.969 feet (or 6' 11-5/8")
Line Length = sqrt(13.9375^2 + 6.969^2) = sqrt(194.25 + 48.57) = sqrt(242.82) = 15.583 feet (or 15' 7")
Experienced framers often use the rafter factor (also called the unit rafter length) for quick calculations. The rafter factor is the diagonal length per foot of run for a given pitch:
Rafter Factor = Square Root of (1 + (Pitch/12)^2) x 12
Total Line Length = Run (in feet) x Rafter Factor / 12
| Pitch | Factor (per ft run) | Rise per Foot | Angle (degrees) |
|---|---|---|---|
| 2/12 | 12.17" | 2" | 9.46 |
| 3/12 | 12.37" | 3" | 14.04 |
| 4/12 | 12.65" | 4" | 18.43 |
| 5/12 | 13.00" | 5" | 22.62 |
| 6/12 | 13.42" | 6" | 26.57 |
| 7/12 | 13.89" | 7" | 30.26 |
| 8/12 | 14.42" | 8" | 33.69 |
| 9/12 | 15.00" | 9" | 36.87 |
| 10/12 | 15.62" | 10" | 39.81 |
| 11/12 | 16.28" | 11" | 42.51 |
| 12/12 | 16.97" | 12" | 45.00 |
| 14/12 | 18.44" | 14" | 49.40 |
| 16/12 | 20.00" | 16" | 53.13 |
The overhang extends the rafter beyond the wall. Since the overhang is measured horizontally, the actual tail length along the rafter slope is longer:
Tail Length = Overhang (horizontal) x Rafter Factor / 12
For an 18-inch overhang at 6/12 pitch: 18 x 13.42 / 12 = 20.13 inches along the rafter.
The total cutting length is the sum of the line length and the tail length:
Total Cutting Length = Line Length + Tail Length
This is the measurement from the short point of the plumb cut at the ridge to the far end of the tail cut.
This complete reference table covers the full range of residential roof pitches. I keep a laminated copy of this in my framing tool belt because it saves time on every rafter calculation.
| Pitch | Angle | Factor/ft | Rise/ft | Slope % | Typical Use |
|---|---|---|---|---|---|
| 1/12 | 4.76 | 12.04" | 1" | 8.3% | Flat roofs with membrane |
| 2/12 | 9.46 | 12.17" | 2" | 16.7% | Low-slope metal roofing |
| 3/12 | 14.04 | 12.37" | 3" | 25.0% | Minimum for roll roofing |
| 4/12 | 18.43 | 12.65" | 4" | 33.3% | Minimum for asphalt shingles |
| 5/12 | 22.62 | 13.00" | 5" | 41.7% | Common residential |
| 6/12 | 26.57 | 13.42" | 6" | 50.0% | Most common residential |
| 7/12 | 30.26 | 13.89" | 7" | 58.3% | Common residential |
| 8/12 | 33.69 | 14.42" | 8" | 66.7% | Colonial, Cape Cod styles |
| 9/12 | 36.87 | 15.00" | 9" | 75.0% | Steep residential, snow regions |
| 10/12 | 39.81 | 15.62" | 10" | 83.3% | Steep, snow shedding |
| 12/12 | 45.00 | 16.97" | 12" | 100.0% | Very steep, A-frame style |
The birdsmouth is the notch cut into the bottom of a rafter that allows it to sit flat on the wall top plate. It consists of two intersecting cuts: the seat cut (horizontal, providing the bearing surface on the plate) and the plumb cut (vertical, fitting against the outer face of the wall). Together they form a notch that looks like an open bird's beak, hence the name.
The seat cut depth is critical. Building codes typically require that the seat cut not exceed one-third of the rafter depth. For a 2x8 rafter (7.25 inches deep), the maximum seat cut depth is 2.42 inches. Cutting deeper weakens the rafter at the point of highest stress (the bearing point on the wall). The seat cut width depends on the wall plate width: for a 2x4 wall, the plate is 3.5 inches wide, and the seat cut should provide full bearing across that width.
HAP is the vertical distance from the top of the wall plate to the top edge of the rafter, measured at the outside face of the wall. HAP determines how much of the rafter extends above the birdsmouth. A common HAP for a 2x8 rafter is 4.75 to 5.5 inches (leaving 1.75 to 2.5 inches for the seat cut). All rafters in a roof system must have the same HAP to keep the ridge and roof plane straight.
HAP is calculated from the rafter depth and the seat cut depth:
HAP = Rafter Depth - Seat Cut Depth
Or, if you set the HAP first:
Seat Cut Depth = Rafter Depth - HAP
For roof systems with different rafter sizes (such as a main roof and a porch roof that must align), keeping the HAP consistent is more important than keeping the seat cut consistent. The HAP controls where the top of the rafter sits, which determines the roof plane.
The plumb cut angle at the ridge and the seat cut angle at the birdsmouth are complementary angles based on the roof pitch. For a 6/12 pitch, the plumb cut is 26.57 degrees from vertical (or 63.43 degrees from horizontal), and the seat cut is 26.57 degrees from horizontal. On a framing square, you set the pitch marks (6 on the tongue, 12 on the blade) and the plumb and level lines automatically align. The same angle applies to the ridge plumb cut, the birdsmouth plumb cut, and the tail cut if you want a plumb-cut fascia end.
Rafter size depends on the span (horizontal distance from the bearing wall to the ridge), the spacing between rafters, the lumber species and grade, and the expected loads (dead load from roofing materials plus live load from snow, wind, and maintenance access).
| Rafter Size | 12" OC Span | 16" OC Span | 24" OC Span |
|---|---|---|---|
| 2x6 | 12' 8" | 11' 0" | 9' 0" |
| 2x8 | 16' 8" | 14' 6" | 11' 10" |
| 2x10 | 21' 4" | 18' 6" | 15' 1" |
| 2x12 | 25' 11" | 22' 6" | 18' 4" |
| Rafter Size | 12" OC Span | 16" OC Span | 24" OC Span |
|---|---|---|---|
| 2x6 | 10' 10" | 9' 5" | 7' 8" |
| 2x8 | 14' 4" | 12' 5" | 10' 2" |
| 2x10 | 18' 3" | 15' 10" | 12' 11" |
| 2x12 | 22' 2" | 19' 3" | 15' 8" |
These spans are for horizontal run, not rafter length. The rafter itself is longer than the span because it follows the slope. Always verify spans against the IRC span tables for your specific lumber species, grade, and loading conditions. Local building departments may require engineer-stamped calculations for unusual configurations.
The ridge board and ridge beam serve different structural purposes, and the distinction matters for both the calculation and the framing approach.
A ridge board is a non-structural member that provides a nailing surface where opposing rafters meet at the peak. The ridge board does not carry roof loads. The loads are transferred from the rafters through the birdsmouth connection to the wall plates and then to the foundation. Because the ridge board is non-structural, opposing rafters must be connected with collar ties or ceiling joists to prevent the walls from spreading outward under load. Ridge boards are typically 1x or 2x lumber one size deeper than the rafters (so a 2x10 ridge with 2x8 rafters).
A ridge beam is a structural member that carries the vertical component of the roof load. It eliminates the need for collar ties or ceiling joists because the beam, not the wall-to-wall connection, prevents spreading. Ridge beams are much larger than ridge boards, typically glulam, LVL, or steel, sized by an engineer for the specific span and load. When a ridge beam is used, rafters bear on top of the beam rather than butting against its side, so the ridge thickness does not reduce the rafter run.
In this calculator, when you select "No ridge board (ridge beam)," the ridge thickness deduction is zero because the rafters sit on top of the beam with full run to the center. For standard ridge boards, the calculator subtracts half the ridge thickness from each rafter run.
A 28-foot wide house with a 6/12 pitch roof, 18-inch overhangs, 1.5-inch ridge board, 2x8 rafters at 16" OC, and a 40-foot ridge length.
Step 1: Run = (28/2) - (1.5/24) = 14 - 0.0625 = 13.9375 ft = 13' 11-1/4"
Step 2: Rise = 13.9375 x (6/12) = 6.969 ft = 6' 11-5/8"
Step 3: Line length = sqrt(13.9375^2 + 6.969^2) = sqrt(242.82) = 15.583 ft = 15' 7"
Step 4: Tail length = (18/12) x sqrt(1 + (6/12)^2) = 1.5 x 1.118 = 1.677 ft = 1' 8-1/8"
Step 5: Total cutting length = 15.583 + 1.677 = 17.260 ft = 17' 3-1/8"
Step 6: Order 18-foot lumber (next standard length above 17' 3-1/8")
Step 7: Rafter count = ((40 x 12) / 16) + 1 = 31 per side, 62 total for gable roof
A 24-foot wide cabin with a 10/12 pitch, 24-inch overhangs, 1.5-inch ridge board, 2x10 rafters at 16" OC, 30-foot ridge.
Step 1: Run = (24/2) - (1.5/24) = 12 - 0.0625 = 11.9375 ft
Step 2: Rise = 11.9375 x (10/12) = 9.948 ft = 9' 11-3/8"
Step 3: Line length = sqrt(11.9375^2 + 9.948^2) = sqrt(142.50 + 98.96) = sqrt(241.46) = 15.539 ft = 15' 6-1/2"
Step 4: Tail = (24/12) x sqrt(1 + (10/12)^2) = 2 x 1.302 = 2.604 ft = 2' 7-1/4"
Step 5: Total = 15.539 + 2.604 = 18.143 ft = 18' 1-3/4"
Step 6: Order 20-foot lumber
Step 7: Rafters = ((30 x 12) / 16) + 1 = 23.5, round to 24 per side, 48 total
Note: the run of 11.94 feet is within the 2x10 at 16" OC span of 15' 10" for 30 psf snow load, so the rafter size is adequate. If the run were longer, 2x12 rafters or closer spacing would be needed.
A 12-foot deep lean-to addition with a 4/12 pitch, 12-inch overhang, attached to an existing wall (no ridge board), 2x8 rafters at 16" OC, 20-foot length.
Step 1: Run = 12 ft (full width, no ridge deduction for shed roof attached to wall)
Step 2: Rise = 12 x (4/12) = 4 ft
Step 3: Line length = sqrt(12^2 + 4^2) = sqrt(144 + 16) = sqrt(160) = 12.649 ft = 12' 7-3/4"
Step 4: Tail = (12/12) x sqrt(1 + (4/12)^2) = 1 x 1.054 = 1.054 ft = 1' 0-5/8"
Step 5: Total = 12.649 + 1.054 = 13.703 ft = 13' 8-3/8"
Step 6: Order 14-foot lumber
Step 7: Rafters = ((20 x 12) / 16) + 1 = 16 (shed roof has only one side)
Hip and valley rafters run diagonally from the corners of the building to the ridge. Because they travel at a 45-degree angle in plan view (horizontally), their run is longer than a common rafter by a factor of the square root of 2 (approximately 1.414). This affects both the length calculation and the lumber sizing.
For a hip rafter on the same roof pitch as the common rafters:
Hip Run = Common Run x 1.414
Hip Rise = Same as Common Rise (the hip rafter reaches the same height)
Hip Length = sqrt(Hip Run^2 + Hip Rise^2)
Alternatively, you can use the hip rafter factor per foot of common run:
Hip Factor = sqrt(1 + (Pitch/12)^2 + 1) x 12
For a 6/12 pitch: Hip Factor = sqrt(1 + 0.25 + 1) x 12 = sqrt(2.25) x 12 = 18.0 inches per foot of common run.
Jack rafters are shortened common rafters that run from the wall plate to a hip or valley rafter instead of to the ridge. They are cut progressively shorter as they approach the corner. The length difference between adjacent jack rafters is constant and equals the common rafter factor multiplied by the rafter spacing:
Jack Rafter Difference = Rafter Factor x (Spacing / 12)
For 6/12 pitch at 16" OC: 13.42 x (16/12) = 17.89 inches difference between each pair of adjacent jack rafters.
The most common error in rafter calculations. If you calculate the run as exactly half the building width without subtracting half the ridge board thickness, every rafter will be 3/4 inch too long (for a standard 1.5" ridge board). This forces the ridge up higher than planned and pushes the rafter tails past their intended position. On a 40-rafter roof, this small error is immediately visible as a ridge that sits high and rafter tails that do not align with the fascia.
Overhang is always specified as a horizontal measurement. An 18-inch overhang means the fascia is 18 horizontal inches from the outside face of the wall, not 18 inches along the rafter slope. The actual rafter tail is longer than 18 inches because it follows the slope. At a 6/12 pitch, an 18-inch horizontal overhang requires about 20.1 inches of rafter tail. At a 12/12 pitch, it requires about 25.5 inches. Cutting the tail at 18 inches along the slope gives a shorter overhang than intended.
A birdsmouth seat cut deeper than one-third of the rafter depth weakens the rafter at its most critical point. The building inspector will flag any birdsmouth cut that exceeds this limit. For a 2x8 rafter (7.25 inches), the maximum seat cut depth is about 2.4 inches. If a deeper cut is needed to achieve the desired HAP, use a larger rafter size rather than cutting deeper into the existing size.
When using a ridge board (not a ridge beam), the roof structure requires collar ties or ceiling joists to prevent the walls from spreading outward under roof load. Collar ties connect opposing rafters in the upper third of the attic space. Ceiling joists connect opposing rafters at the wall plate level. Without these horizontal ties, the outward thrust of the rafters will push the walls apart over time, especially under snow load. If you plan an open cathedral ceiling with no collar ties, you must use a structural ridge beam instead of a ridge board.
Some roof designs have different pitches on different sections (gambrel roofs, broken-pitch roofs, or roofs with dormers). Each section must be calculated independently with its own pitch. The common mistake is using the main roof pitch for dormer rafters or porch rafters that actually have a different slope. Always verify the pitch of each roof plane separately before cutting any rafters for that section.
Having the right tools makes rafter layout faster and more precise. Here is the important toolkit I bring to every rafter framing job.
The framing square is the basic tool for rafter layout. It has a 24-inch blade and a 16-inch tongue, both graduated with inch and fraction markings. To lay out cuts for a specific pitch, you set the pitch rise on the tongue and 12 inches on the blade. The tongue gives the plumb cut line, and the blade gives the level (seat) cut line. Stair gauges (small clamps) attached to the square lock these measurements in place so every rafter is marked identically. A quality framing square costs $15 to $30 and will last a lifetime.
The speed square is a triangular aluminum tool that serves as a quick reference for rafter angles. It has degree markings along the hypotenuse and common rafter markings along the edge. To find the plumb cut angle for a 6/12 pitch, you align the pivot point with the rafter edge and read the 6 mark on the common scale. The corresponding angle is automatically set. Speed squares are less precise than framing squares for full rafter layout but excellent for quick angle checks and marking short cuts. They cost $8 to $15.
A 25-foot tape measure handles most residential rafter work. For larger buildings or long hip rafters, a 35-foot tape is needed. The tape should have clear markings at every 16-inch interval (16, 32, 48, etc.) for quick on-center layout. I prefer tapes with a standout of at least 10 feet so I can extend the tape across a rafter without it collapsing.
Most rafter cuts are made with a 7-1/4 inch circular saw using the speed square as a straightedge guide. The saw blade depth should be set to just cut through the lumber thickness (1.5 inches for standard dimensional lumber). For birdsmouth cuts, the two intersecting cuts are made with the circular saw, and the remaining material is cleaned out with a handsaw or reciprocating saw. Never use the circular saw to overcut the birdsmouth lines, as the overcutting weakens the rafter where the invisible saw kerf extends past the notch corners.
Construction calculators like the Construction Master series have built-in rafter calculation functions. You enter the pitch and run, and the calculator returns the rafter length, rise, diagonal, and hip/valley dimensions automatically. These calculators convert between feet-inches-fractions and decimal feet, which eliminates conversion errors. A construction calculator costs $30 to $100 and is worth every penny for anyone doing regular framing work. This online calculator provides the same functionality at no cost.
Framing a roof follows a specific sequence that I have refined over hundreds of projects. Each step builds on the one before it, and skipping steps leads to errors that compound as you go.
First, verify that the walls are plumb, straight, and at the correct height. Rafters amplify any wall errors. If one wall is 1/2 inch higher than the opposite wall, the ridge will be off-center and every rafter on the short side will have a different length than those on the long side. Use a string line and level to check wall heights before starting any rafter work.
Second, calculate and cut one sample rafter (called the pattern rafter). Test-fit it on the building to verify the ridge height, birdsmouth fit, overhang, and tail length. Adjust the pattern until it fits perfectly. This single pattern rafter represents every common rafter in the roof, so getting it right eliminates errors across all the production rafters.
Third, mark and cut all common rafters using the pattern. Stack them with the crowns (the slight natural bow in lumber) all facing the same direction. Mark the birdsmouth, ridge cut, and tail cut locations on every rafter before cutting any of them. This batch approach is faster and more consistent than cutting one rafter at a time.
Fourth, install the ridge board or beam. For a ridge board, it is typically held in place temporarily by two pairs of opposing rafters at each end, braced with temporary supports. The ridge must be perfectly level and straight, centered between the walls. Check the ridge alignment before installing any additional rafters.
Fifth, install the remaining common rafters, working from each end toward the center, alternating sides to keep the ridge balanced. Nail each rafter to the ridge board (typically three 16d nails, face-nailed) and to the wall plate (toenailed or hurricane-strapped). Check plumb and spacing every 4 to 6 rafters to catch any drift before it becomes a problem.
Sixth, install any special rafters: hip rafters, valley rafters, jack rafters, and cripple rafters. These are cut to specific lengths based on their position and require compound angle cuts at the hip or valley intersection.
Finally, install collar ties or ceiling joists to prevent wall spreading, gable end framing, subfascia, and roof sheathing. The sheathing locks the entire system together and provides the diaphragm strength that makes the roof rigid.
The roof pitch directly determines which roofing materials you can use. Every roofing product has a minimum pitch requirement below which it will not perform reliably. Water drainage depends on gravity and slope, and low-slope roofs hold water longer, increasing the risk of leaks.
Roofs with pitches between 2/12 and 4/12 are considered low-slope and require roofing materials designed for slower water drainage. Standing seam metal roofing works well down to 2/12 or even 1/12 because the raised seams prevent water from entering. Modified bitumen and single-ply membranes (TPO, EPDM, PVC) are designed specifically for low-slope applications. Asphalt shingles generally require a minimum 4/12 pitch, though some manufacturers allow installation down to 2/12 with special underlayment (double layer of self-adhering ice and water shield across the entire roof deck). Using shingles below their minimum pitch voids the manufacturer warranty and invites leaks.
Most residential roofing falls in this range. Asphalt shingles (3-tab and architectural) perform well from 4/12 to about 21/12. Wood shingles and shakes work from 4/12 upward. Concrete and clay tiles are suitable from 4/12 or higher depending on the profile. Metal panels (corrugated, standing seam, and stone-coated) work across this entire range. This is the sweet spot where material selection is wide, installation is straightforward, and the balance between water shedding and wind resistance is best.
Steep roofs shed water and snow quickly but present installation challenges. Workers need roof jacks, scaffolding, and fall protection equipment, which increases labor costs by 15-30% compared to moderate slopes. Material waste increases because cuts are more frequent on steep angles. Slate and high-end tiles look stunning on steep roofs and have been used on steep-pitched architecture for centuries. Metal roofing panels may require additional fastening to resist wind uplift on steep slopes because the increased angle catches more wind force.
Steeper pitches create more usable attic space, which can be valuable for storage or future conversion to living space. A 6/12 pitch on a 28-foot wide building creates a ridge height of 7 feet above the attic floor (at the center), barely enough for a person to stand upright. A 9/12 pitch on the same building produces a ridge height of 10.5 feet, creating genuinely usable space. A 12/12 pitch gives 14 feet of ridge height, enough for a full second story within the roof. If you anticipate converting attic space in the future, designing with a steeper initial pitch is far cheaper than modifying the roof structure later.
Rafter lumber costs vary by species, grade, length, and market conditions. Here are approximate costs per piece for common rafter sizes as of 2026, based on national averages for No. 2 SPF (Spruce-Pine-Fir) lumber.
| Size | 8 ft | 10 ft | 12 ft | 14 ft | 16 ft | 18 ft | 20 ft |
|---|---|---|---|---|---|---|---|
| 2x6 | $5.50 | $7.00 | $8.50 | $10.00 | $12.00 | $15.00 | $18.00 |
| 2x8 | $7.50 | $9.50 | $11.50 | $14.00 | $16.50 | $20.00 | $24.00 |
| 2x10 | $10.00 | $12.50 | $15.00 | $18.00 | $21.00 | $26.00 | $31.00 |
| 2x12 | $13.00 | $16.00 | $19.50 | $23.00 | $27.00 | $33.00 | $40.00 |
These are material-only prices. Labor for rafter framing typically runs $3 to $6 per square foot of roof area, depending on the complexity and pitch. A simple gable roof is at the low end. A complex hip roof with dormers and valleys is at the high end. Prefabricated trusses (an alternative to stick-framed rafters) cost $3 to $5 per linear foot of span and can be installed much faster, but they eliminate usable attic space because the web members fill the interior.
For the example from earlier (62 rafters of 2x8 at 18 feet), the rafter lumber alone costs approximately 62 x $20 = $1,240. Add the ridge board, collar ties, subfascia, and sheathing, and the total roof framing material for a 28 x 40 building runs $3,500 to $5,000. Labor to frame the roof adds another $4,000 to $8,000 depending on your area. The total roof structure (framing plus sheathing, not including roofing material) typically costs $7 to $12 per square foot of roof area.
Rafters must be sized to handle the combined dead load (weight of roofing materials, sheathing, and the rafters themselves) plus the live load (snow, wind uplift, and temporary loads from workers during construction or maintenance). Understanding these loads helps you select the correct rafter size and spacing.
Typical dead loads for residential roofing assemblies range from 7 to 20 pounds per square foot (psf) of roof area. Asphalt shingles with plywood sheathing add about 10-12 psf. Clay or concrete tile roofing can reach 15-20 psf. Metal roofing is the lightest at 5-8 psf. The dead load is fixed and permanent for the life of the roof.
Snow load varies dramatically by location, from zero in southern Florida to 80+ psf in mountain areas of Colorado and the Sierra Nevada. The IRC assigns minimum roof live loads of 20 psf for most areas, with higher values for snow regions. Ground snow loads are converted to roof snow loads using factors for roof slope, exposure, and thermal conditions. Steeper pitches shed snow more effectively and receive reduced snow load factors. A 6/12 roof sheds snow better than a 3/12 roof, which directly affects the required rafter size and spacing.
High-wind areas (coastal regions, tornado-prone areas) require rafters to be connected to the wall plates with hurricane straps or clips, not just toenails. Wind can create uplift forces that try to pull the roof off the house. The connection between the rafter and the wall plate must resist these uplift forces. In hurricane zones, the entire load path from roof to foundation must be engineered and connected with approved hardware.
Rafter length is calculated using the Pythagorean theorem. First, determine the run: half the building width minus half the ridge board thickness. Then calculate the rise: run multiplied by pitch divided by 12. The line length is the square root of (run squared plus rise squared). Add the overhang tail length (overhang horizontal distance multiplied by the rafter factor and divided by 12). The total gives you the cutting length from ridge plumb cut to tail cut.
Roof pitch is the slope of the roof, expressed as inches of rise per 12 inches of horizontal run. A 6/12 pitch means the roof rises 6 inches for every 12 inches of horizontal distance. This corresponds to a 26.57-degree angle and a 50% slope. Common residential pitches range from 4/12 (the minimum for most shingle roofing) to 12/12 (a 45-degree slope). Pitch can also be expressed as a degree angle, a percentage slope, or a decimal fraction.
A birdsmouth is a notch cut into the bottom edge of a rafter at the point where it rests on the wall top plate. The notch has two surfaces: the seat cut (horizontal, providing the bearing surface) and the plumb cut (vertical, fitting against the wall). The birdsmouth provides a stable bearing connection and prevents the rafter from sliding off the wall plate. The seat cut depth must not exceed one-third of the rafter depth to maintain structural integrity. All rafters in a roof system should have identical birdsmouth dimensions to keep the roof plane straight.
Rafter size depends on span, spacing, lumber species and grade, and the total load (dead load from roofing materials plus live load from snow, wind, and maintenance access). For No. 2 SPF lumber at 16 inches on center with a 20 psf live load: 2x6 spans up to about 11 feet, 2x8 spans up to about 14.5 feet, 2x10 spans up to about 18.5 feet, and 2x12 spans up to about 22.5 feet. Heavier snow loads reduce these spans significantly. Always verify against the IRC span tables or have an engineer check unusual configurations.
The overhang (or eave) is the horizontal distance that the rafter extends beyond the outside face of the exterior wall. It protects the walls and windows from rain and sun. Typical residential overhangs range from 12 to 24 inches. The overhang measurement is horizontal, not along the slope. The actual rafter tail length along the slope is longer than the horizontal overhang dimension. An 18-inch horizontal overhang on a 6/12 pitch roof requires about 20 inches of rafter tail measured along the slope.
Yes. The ridge board occupies space at the peak of the roof, effectively shortening the rafter run. For a standard 1.5-inch (2x) ridge board, subtract 0.75 inches (half the thickness) from each rafter run. For a 3.5-inch (4x) ridge or LVL, subtract 1.75 inches from each run. If you are using a structural ridge beam where rafters bear on top of the beam, no deduction is needed because the rafter runs the full distance to the center of the building.
HAP is the vertical distance from the top of the wall plate to the top edge of the rafter, measured at the outside face of the wall. It is the portion of the rafter depth that extends above the birdsmouth cut. HAP must remain consistent for all rafters in a roof system to maintain a straight, uniform roof plane. Typical HAP values are: 4.0-4.5 inches for 2x6 rafters, 5.5-6.5 inches for 2x8 rafters, 7.0-8.5 inches for 2x10 rafters, and 9.0-10.5 inches for 2x12 rafters.
The right pitch depends on climate conditions, architectural style, and roofing material requirements. For asphalt shingles, the minimum pitch is 4/12. Metal roofing can go as low as 2/12. In heavy snow regions, steeper pitches (8/12 to 12/12) shed snow more effectively and reduce structural loading. In hurricane-prone areas, moderate pitches (4/12 to 6/12) reduce wind uplift forces. The most common residential pitch is 6/12, which provides a good balance of weather protection, attic space, aesthetic appeal, and material efficiency.
For a gable roof, divide the ridge length (in inches) by the rafter spacing (in inches), add 1, and multiply by 2 (for both sides). For a 40-foot ridge with 16-inch spacing: ((40 x 12) / 16 + 1) x 2 = (30 + 1) x 2 = 62 rafters. Add extra for gable end studs (if framing gable ends with short studs) and any openings (skylights, dormers). For a hip roof, the count is similar but you add 4 hip rafters and replace some common rafters with jack rafters. A materials list should add 10% for waste and cutting errors.
A common rafter runs perpendicular from the wall plate to the ridge board at a right angle to the ridge. A hip rafter runs diagonally from the corner of the building to the end of the ridge, forming the hip line where two sloping roof planes meet. Hip rafters are approximately 1.414 times longer than common rafters of the same pitch (because they travel at a 45-degree angle in the horizontal plane). They must be one lumber size larger than the common rafters to handle the concentrated loads from jack rafters framing into them on both sides.
I compiled this data from IRC building codes and lumber industry standards. Last updated March 2026.
| Roof Pitch | Angle (degrees) | Rafter Factor per Foot of Run | Common Use |
|---|---|---|---|
| 3/12 | 14.0 | 1.0308 | Low-slope, porches |
| 4/12 | 18.4 | 1.0541 | Standard residential |
| 6/12 | 26.6 | 1.1180 | Most common residential |
| 8/12 | 33.7 | 1.2019 | Steeper residential |
| 10/12 | 39.8 | 1.3017 | Snow regions, Colonial |
| 12/12 | 45.0 | 1.4142 | A-frame, heavy snow areas |
Verified in Chrome 134, Firefox 135, Safari 18.3, and Edge 134. Built on stable Web APIs with no browser-specific hacks.
Explore related discussions on Hacker News, where developers and technologists share insights about tools, workflows, and best practices relevant to this topic.
Tested with Chrome 134.0.6998.89 (March 2026). Compatible with all modern Chromium-based browsers.
Community discussion on Stack Overflow.
PageSpeed optimized: Rafter Length Calculator loads with zero layout shift and first input delay under 100ms, meeting all Core Web Vitals thresholds.
Browser support verified via caniuse.com. Works in Chrome, Firefox, Safari, and Edge.
Pure JavaScript construction math. Material quantities computed using standard builder ratios and waste allowances.