Rafter Calculator
Calculate rafter dimensions and cutting angles for your roof
Roof Specifications
Rafter Dimensions
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
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/12 | 14.0° | Low slope |
| 4/12 | 18.4° | Standard residential |
| 6/12 | 26.6° | Moderate slope |
| 8/12 | 33.7° | Steep slope |
| 12/12 | 45.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:
- Building Span: The total width of the building in feet. The run is half the span.
- Roof Pitch: Select the rise per 12 inches from the dropdown (3/12 to 12/12).
- Overhang: The horizontal overhang beyond the wall plate in inches (typically 12–24 inches).
- 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:
- 1Run = 24 / 2 = 12 feet = 144 inches
- 2Rise = (144 × 6) / 12 = 72 inches
- 3Rafter length (without overhang) = √(144² + 72²) = √(20,736 + 5,184) = √25,920 = 161.0 inches = 13.42 feet
- 4Total rafter length = 13.42 + (16/12) = 14.75 feet
- 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:
- 1Run = 20 / 2 = 10 feet = 120 inches
- 2Rise = (120 × 10) / 12 = 100 inches
- 3Rafter length = √(120² + 100²) = √(14,400 + 10,000) = √24,400 = 156.2 inches = 13.02 feet
- 4Total with overhang = 13.02 + 1.0 = 14.02 feet
- 5Rafters for 40 ft building = ceil(40 × 12 / 16) + 1 = 31 rafters
- 6Board feet per rafter (2×6) = (14.02 × 2 × 6) / 12 = 14.02 BF
- 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:
- 1Run = 18 / 2 = 9 feet = 108 inches
- 2Rise = (108 × 4) / 12 = 36 inches
- 3Rafter length = √(108² + 36²) = √(11,664 + 1,296) = √12,960 = 113.8 inches = 9.49 feet
- 4Total with overhang = 9.49 + 2.0 = 11.49 feet
- 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
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.
Formula Source: Standard Mathematical References
by Various