Rafter Calculator

Calculate rafter dimensions and cutting angles for your roof

Roof Specifications

Rafter Dimensions

Run (Horizontal)
12.00 feet
Rise (Vertical)
72.00 inches
Rafter Length
13.42 feet
Without overhang
Total Rafter Length
14.42 feet
With overhang
Roof Angle
26.57°
Birdsmouth Depth
3.50 inches
Rafters needed (40' building): 31
Total board feet (2×6): 447

Why Use a Rafter Calculator?

A rafter calculator helps you determine the precise length, rise, run, and cutting angles for roof rafters, which are the structural members that form the framework of a pitched roof. Accurate rafter calculations are essential for material ordering, cutting layout, and ensuring the roof structure meets building code requirements.

The rafter calculator uses the building span (total width of the building), roof pitch (steepness), and overhang to compute the rafter dimensions using the Pythagorean theorem. It also calculates the number of rafters needed based on standard spacing, the birdsmouth cut dimensions, and the total board feet of lumber required.

Whether you are framing a new roof, adding an addition, or replacing damaged rafters, this calculator provides the dimensions you need for accurate layout and cutting. The results include the horizontal run, vertical rise, diagonal rafter length, and the roof angle in degrees.

The Rafter Length Formula

The rafter length is calculated using the Pythagorean theorem, where the run and rise form the two legs of a right triangle and the rafter is the hypotenuse:

Rafter Length Formula

Rafter = √(Run² + Rise²) + Overhang

Where:

  • Run= Horizontal distance from ridge to wall plate (half the building span)
  • Rise= Vertical height of the roof at the given pitch
  • Overhang= Horizontal projection beyond the wall plate

Understanding Roof Pitch

Roof pitch is expressed as the number of inches of vertical rise for every 12 inches of horizontal run. For example, a 6/12 pitch means the roof rises 6 inches for every 12 inches of run:

Pitch Angle (degrees) Description
3/1214.0°Low slope
4/1218.4°Standard residential
6/1226.6°Moderate slope
8/1233.7°Steep slope
12/1245.0°Maximum standard pitch

Steeper pitches require longer rafters and more material, but they shed water and snow more effectively. Most residential roofs use a pitch between 4/12 and 8/12.

How to Use This Calculator

Enter the following parameters to calculate rafter dimensions:

  1. Building Span: The total width of the building in feet. The run is half the span.
  2. Roof Pitch: Select the rise per 12 inches from the dropdown (3/12 to 12/12).
  3. Overhang: The horizontal overhang beyond the wall plate in inches (typically 12–24 inches).
  4. Rafter Spacing: The on-center spacing in inches (12, 16, or 24 inches).

Results include the run, rise, rafter length (with and without overhang), roof angle, birdsmouth depth, number of rafters for a 40-foot building, and total board feet for 2×6 rafters.

The Birdsmouth Cut

The birdsmouth is a notch cut into the rafter where it bears on the wall plate. It consists of a horizontal seat cut and a vertical heel cut. The standard birdsmouth depth is 3.5 inches for 2× lumber, which allows the rafter to bear fully on the wall plate while maintaining structural integrity.

The birdsmouth location is measured from the end of the rafter along the bottom edge, at a horizontal distance equal to the run from the ridge. The seat cut is horizontal and the heel cut is vertical, creating a flat bearing surface on the top of the wall plate.

Real-World Applications

Rafter calculations are essential for residential roof framing, where rafters form the primary structural system supporting the roof sheathing and covering. A typical house may require 30 to 60 rafters depending on the building size and rafter spacing.

Commercial buildings with pitched roofs use the same principles but may employ engineered trusses instead of individual rafters. Additions, dormers, and porch roofs all require rafter calculations to ensure proper fit and structural adequacy.

Worked Examples

Standard Residential Roof

Problem:

Calculate the rafter dimensions for a 24-foot wide building with a 6/12 pitch and 16-inch overhang.

Solution Steps:

  1. 1Run = 24 / 2 = 12 feet = 144 inches
  2. 2Rise = (144 × 6) / 12 = 72 inches
  3. 3Rafter length (without overhang) = √(144² + 72²) = √(20,736 + 5,184) = √25,920 = 161.0 inches = 13.42 feet
  4. 4Total rafter length = 13.42 + (16/12) = 14.75 feet
  5. 5Roof angle = arctan(6/12) = 26.57°

Result:

Rafter length = 14.75 feet (with 16-inch overhang), angle = 26.57°

Steep Pitch Roof

Problem:

Calculate rafters for a 20-foot building with a 10/12 pitch and 12-inch overhang at 16-inch spacing.

Solution Steps:

  1. 1Run = 20 / 2 = 10 feet = 120 inches
  2. 2Rise = (120 × 10) / 12 = 100 inches
  3. 3Rafter length = √(120² + 100²) = √(14,400 + 10,000) = √24,400 = 156.2 inches = 13.02 feet
  4. 4Total with overhang = 13.02 + 1.0 = 14.02 feet
  5. 5Rafters for 40 ft building = ceil(40 × 12 / 16) + 1 = 31 rafters
  6. 6Board feet per rafter (2×6) = (14.02 × 2 × 6) / 12 = 14.02 BF
  7. 7Total board feet = 14.02 × 31 = 434.6 BF

Result:

Rafter length = 14.02 ft, 31 rafters needed, 435 board feet total

Low Slope Addition

Problem:

An 18-foot addition with a 4/12 pitch and 24-inch overhang. How many rafters at 24-inch spacing?

Solution Steps:

  1. 1Run = 18 / 2 = 9 feet = 108 inches
  2. 2Rise = (108 × 4) / 12 = 36 inches
  3. 3Rafter length = √(108² + 36²) = √(11,664 + 1,296) = √12,960 = 113.8 inches = 9.49 feet
  4. 4Total with overhang = 9.49 + 2.0 = 11.49 feet
  5. 5Rafters for 20 ft addition = ceil(20 × 12 / 24) + 1 = 11 rafters

Result:

Rafter length = 11.49 ft, 11 rafters needed at 24-inch spacing

Tips & Best Practices

  • Always buy 10–15% extra lumber to account for waste, defects, and cutting errors.
  • Use a framing square to mark plumb cuts, seat cuts, and heel cuts accurately.
  • For rafters longer than standard lumber lengths, consider using steel ridge plates and spliced rafters.
  • Check local building codes for minimum pitch requirements — some materials require minimum slopes.
  • Pre-cut birdsmouths on the ground before lifting rafters into place for faster installation.
  • For complex roof designs with valleys and hips, use a framing plan to layout all cuts before ordering material.
  • Consider using engineered roof trusses for spans over 20 feet — they are more efficient than stick framing.

Frequently Asked Questions

The most common rafter spacing is 16 inches on center (O.C.), which provides a good balance between structural capacity and material efficiency. For heavier loads or longer spans, 12-inch spacing may be required. For lighter loads, 24-inch spacing is acceptable. Always verify with local building codes.
The roof pitch is determined by the architectural design, local climate (steeper pitches shed snow better), and building code minimums. Most residential roofs use 4/12 to 8/12 pitch. You can measure an existing roof by measuring the rise over a 12-inch run from the attic or using a level and tape measure on the roof surface.
The rafter size depends on the span, spacing, and loading conditions. For typical residential construction with 16-inch spacing: 2×6 rafters can span up to 16 feet, 2×8 up to 20 feet, 2×10 up to 25 feet, and 2×12 up to 30 feet. These are rough guidelines — verify with span tables per the building code.
The birdsmouth is cut using a framing square or speed square. Mark the seat cut (horizontal) and heel cut (vertical) at the measured location. The seat cut depth is typically 3.5 inches for standard wall plates. Use a circular saw for straight cuts and finish with a hand saw if needed. Do not cut more than one-third of the rafter depth.
Rafter length is the diagonal distance from the ridge to the wall plate (the structural span). Total rafter length includes the overhang beyond the wall plate. The calculator provides both values so you can order lumber for the full length and plan cuts accordingly.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Rafter Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.

Privacy choices

MyCalcBuddy uses necessary storage for the site to work. Optional analytics, notifications, and future advertising features stay off unless you allow them.