Skip to content
UseCalcNow
Construction

Rafter Length Calculator — Roof Framing Made Easy

Calculate common rafter length from building span and roof pitch. Includes overhang and plumb cut allowance for accurate lumber ordering.

About This Calculator

Calculating rafter length is one of the first steps in framing a gable or shed roof. Get the math right and your ridge board sits level, your eaves line up clean, and your sheathing lays flat. This calculator handles the Pythagorean math for you based on building span and roof pitch. Enter your dimensions and get the exact rafter length including overhang.

The Formula Behind This Calculator

The rafter is the hypotenuse of a right triangle where the run is half the building span and the rise depends on the pitch. For a building with a 24 ft span and a 4/12 pitch, the run is 12 ft and the rise is 4 ft (12 × 4/12). The rafter length equals the square root of (run squared + rise squared). The overhang adds to the total because it follows the same slope beyond the wall plate.

Understanding the math helps you verify results and make better decisions for your project.

How to Use

  1. 1Measure the total building span from outside to outside of the wall framing.
  2. 2Enter your roof pitch as the number of inches of rise per 12 inches of run (e.g., 4 for a 4/12 pitch).
  3. 3Input the desired overhang in inches. A 12-inch overhang is common for most residential roofs.
  4. 4Read the result for total rafter length and add about 6 inches for plumb and seat cuts when ordering lumber.

When to Use

  • Building a new gable, shed, or gambrel roof from scratch
  • Replacing damaged rafters on an existing roof with known dimensions
  • Estimating lumber quantities for a roofing material order
  • Checking that pre-cut rafters or trusses match your building dimensions
  • Planning a dormer addition where rafter lengths need to match the existing roof

Tips

  • Always order lumber about 6 inches longer than the calculated rafter length to allow for plumb cuts at the ridge and birdsmouth cuts at the wall.
  • Double-check your building span by measuring the actual framed walls rather than relying on blueprint dimensions. Framing lumber can vary slightly.
  • For steeper pitches above 8/12, consider hiring a crew. Steep roofs are harder to scaffold and more dangerous to sheathe.
  • Use straight, knot-free 2x8 or 2x10 dimensional lumber for rafters on spans over 16 feet. Engineered lumber like LVL works well for long spans.
  • Remember that the rafter length calculation does not account for the ridge board thickness. Subtract half the ridge board width from the run if you need precision.

Understanding Rafter Geometry and the Pythagorean Theorem

Every common rafter forms the hypotenuse of a right triangle. The horizontal leg is the run, which equals half the building span for a standard gable roof. The vertical leg is the rise, determined by the roof pitch. The rafter itself is the sloped side connecting the two. This relationship means rafter length equals the square root of (run squared plus rise squared).

Roof pitch in North America is traditionally expressed as a ratio of rise over 12 inches of run. A 6/12 pitch means the roof rises 6 inches for every 12 inches of horizontal distance. To convert pitch to rise for the full run, multiply the run in feet by the pitch rise per foot. A 12-foot run at 6/12 gives a 6-foot total rise.

The overhang follows the same slope. A 12-inch horizontal overhang at 6/12 pitch adds about 13.4 inches of rafter length (the square root of 12 squared plus 6 squared). This is why the calculator adds the overhang contribution separately from the main rafter body.

Standard Roof Pitches and When to Use Them

Residential roofs in the US typically fall between 4/12 and 9/12 pitch. A 4/12 pitch is the most common for ranch-style homes and is walkable in dry conditions. Pitches of 6/12 to 8/12 are popular for two-story homes and shed snow reasonably well in most climates. Anything above 9/12 becomes difficult to walk on and requires scaffolding or toe boards during construction.

Low-slope roofs at 2/12 to 3/12 are common in modern architecture but require special underlayment and flashing details to prevent water infiltration. At the other end, steep roofs at 10/12 and above handle heavy snow loads well but cost more to frame and sheathe because every component is longer and harder to handle.

If you are still deciding on pitch, the roof pitch calculator helps you compare angles and visualize how different pitches affect the roof profile. The pitch you choose directly drives rafter length, so it pays to settle on a number early in the design process.

Cutting Rafters: Plumb Cuts, Seat Cuts, and Birdsmouths

Each common rafter needs two critical cuts. The plumb cut sits at the top against the ridge board, cut at the roof pitch angle. The birdsmouth cut sits at the bottom, combining a seat cut that rests on the wall plate with a heel cut that follows the rafter slope. Getting both cuts right is what makes the roof go together cleanly.

The birdsmouth is especially important because it transfers the roof load to the walls. A seat cut that is too shallow can split under load. A seat cut that is too deep weakens the rafter above the wall. Most carpenters aim for a seat cut equal to the full width of the wall plate, typically 3.5 inches for a 2x4 wall.

For step-by-step layout of the birdsmouth, the birdsmouth cut calculator gives you the exact cut depth and seat length based on your rafter size and pitch. The angle cut calculator handles the plumb cut angle so your ridge joint is tight.

Choosing the Right Lumber for Roof Rafters

Rafter lumber needs to be straight, dry, and strong enough to handle the span plus roof live loads from snow and wind. For residential work, No. 2 grade SPF (spruce-pine-fir) or Douglas fir in 2x8 or 2x10 is standard. The species and grade matter because they determine the allowable bending stress, which sets the maximum span.

Engineered lumber like LVL (laminated veneer lumber) or I-joists can span farther than dimensional lumber at the same depth. A 2x10 LVL can span about 30% farther than a standard 2x10. This is useful for great rooms or open floor plans where interior walls do not provide mid-span support.

When ordering lumber, calculate the total board feet needed and check current pricing with the lumber calculator. Buy a few extra pieces to account for crown, knots, or cutting mistakes. Framing crews typically add 10% waste to rafter orders.

Roof Framing Systems and Rafter Spacing

Rafters work as part of a framing system that includes the ridge board, collar ties, ceiling joists, and lookouts. The spacing between rafters is usually 16 or 24 inches on center. Closer spacing allows for smaller rafter stock but uses more pieces. The 24-inch spacing with 2x10 rafters is a cost-effective combination for most residential spans.

Stick framing with rafters gives you flexibility for custom roof shapes like vaulted ceilings or cathedral ceilings. Trusses are faster to install but are engineered as a unit and cannot be modified on site. For complex roofs with valleys or dormers, stick framing with individual rafters is often the practical choice.

The framing calculator helps estimate studs, plates, and headers for the full wall and roof assembly. If you are building a shed or small structure, the framing takeoff ties directly into your rafter count and spacing decisions.

Estimating Roofing Materials From Rafter Dimensions

Once you know the rafter length and building footprint, calculating the roof area is straightforward. Multiply the rafter length by the building length and double it for both roof planes. This gives the total roof deck area in square feet. Add 10% for waste on a simple gable and 15% for roofs with valleys or dormers.

Roofing materials are sold by the square (100 square feet). Divide the total roof area by 100 to get the number of squares. The roofing calculator handles this conversion and factors in waste percentage. For the shingle layer specifically, the roofing shingle calculator breaks down bundles needed by brand and exposure.

Do not forget underlayment, drip edge, and ridge vent when budgeting. These items scale with roof area. A typical 2,000-square-foot roof needs about 7 squares of shingles plus 2 rolls of synthetic underlayment and 40 linear feet of ridge vent.

Plywood Sheathing and Decking Calculations

Roof sheathing is usually 7/16-inch or 1/2-inch OSB or plywood panels measuring 4x8 feet. Each panel covers 32 square feet. Divide your total roof area by 32 to get the panel count, then add one or two extra panels for cutting waste around hips, valleys, and vents.

H-clips or panel edge clips between rafters keep sheathing edges aligned and provide the required 1/8-inch expansion gap. You need one clip per rafter bay per panel edge. On 24-inch rafter spacing, a 4x8 panel spans four rafter bays and needs six clips.

The plywood calculator computes panel count for both roof and wall sheathing. Running it alongside your rafter calculation ensures you order decking and framing in the same trip to the lumber yard.

Alternative Roof Styles and Rafter Considerations

Gable roofs are the simplest to frame because all common rafters are the same length. Hip roofs add diagonal hip rafters and jack rafters that step down in length along the hip line. Gambrel roofs use two different rafter pitches for the upper and lower sections, creating the classic barn profile. The gambrel roof calculator handles the geometry for this two-pitch system.

Vaulted or cathedral ceilings use structural ridge beams instead of ridge boards. The ridge beam carries the roof load at the peak, allowing the ceiling joists to be removed for open interior space. This changes the rafter calculation because the beam replaces the ridge board at the top of each rafter.

For any roof style, the key dimensions remain span, pitch, and overhang. Start with accurate rafter lengths, then branch into the specialized cuts and materials your design requires. Getting the common rafter right is the foundation of a roof that goes together without fight.

FAQ

Does this calculator account for ridge board thickness?

No. The calculation uses half the building span as the run. If you want to account for a ridge board, subtract half the ridge board thickness from the run. For a standard 2x ridge board (1.5 inches actual), subtract 0.75 inches from the run before the math runs.

What is the difference between common rafters and hip rafters?

Common rafters run straight from the ridge board down to the wall plate on a gable roof. Hip rafters run diagonally from the corner of the building to the ridge on a hip roof and require different length calculations because they sit at a 45-degree angle.

Can I use this for a shed roof with a single slope?

Yes, for a shed roof (single-slope or lean-to), use the full building span as the run rather than half the span. A shed roof has no ridge, so the rafter spans the entire width.

What lumber size do I need for my rafters?

Rafter size depends on span, spacing, and snow load. For spans up to 12 feet, 2x6 at 16-inch spacing usually works. For spans of 16 to 20 feet, use 2x8 or 2x10. For spans over 20 feet, consult span tables or an engineer.

How accurate is the rafter length calculation?

The math is exact for theoretical dimensions. In practice, lumber crowns, wall plate thickness, and cutting tolerances can shift the actual length by up to 1/4 inch. Always test-fit one rafter before cutting the full batch.

Related Calculators