Rafter Length Calculator
Calculate rafter length, count, and total lumber from span and pitch.
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the Rafter Length Calculator
This calculator finds the length of each rafter board, the total number of rafters, and the total linear footage of lumber you need to order. Here is how to get accurate results:
- Enter the building span. The span is the full outside-to-outside width of the building measured in feet. For a 24-foot-wide house, enter 24. The calculator divides this by two to get the run (horizontal distance from wall to ridge).
- Enter the building length. This is the length of the ridge board, measured from one end of the roof to the other. It equals the length of the building.
- Select the roof pitch. Pitch is expressed as rise over run, where the run is always 12 inches. A 6/12 pitch means the roof rises 6 inches for every 12 inches of horizontal travel. Common residential pitches range from 4/12 to 8/12.
- Set the rafter spacing. Most residential roofs use 16" on-center spacing. 24" OC is common for heavier lumber or engineered systems. This determines how many rafters the roof needs.
- Enter the overhang. The overhang (eave) is how far the rafter extends past the exterior wall. A typical overhang is 12 to 24 inches (1 to 2 feet). The default is 1.5 feet.
The calculator shows the total rafter length including overhang, the rise and run, the roof angle in degrees, the rafter count for both sides of the roof, the ridge board length, and the total linear feet of lumber to order. Use Share to send the inputs to your framing crew or lumber yard, or Copy to paste the result into a quote or materials list.
About the Rafter Length Calculator
Rafter length is calculated using the Pythagorean theorem. The run (half the building span) is one leg of a right triangle, the rise is the other leg, and the rafter is the hypotenuse. For a 24-foot-wide building at 6/12 pitch, the run is 12 feet, the rise is 6 feet, and the line length is the square root of (12 squared + 6 squared), which equals about 13.42 feet. Adding a 1.5-foot overhang gives a total rafter board length of approximately 14.92 feet, or about 14 feet 11 inches.
Rafter count is calculated by dividing the building length by the spacing (converted to feet) and adding one rafter at each end, then doubling for both sides of the roof. For a 30-foot building at 16" OC, that is (ceil(30 / 1.333) + 1) x 2 = 48 rafters. Total linear feet is the rafter count multiplied by the individual rafter length, giving you the exact number to call in to the lumber yard.
All calculations run entirely in your browser. No data is stored or transmitted.
Frequently Asked Questions
How do I calculate rafter length from span and pitch?
Divide the building span by 2 to get the run. Multiply the run by the pitch divided by 12 to get the rise. Then use the Pythagorean theorem: rafter line length = square root of (run squared + rise squared). Finally, add your overhang distance to get the total rafter board length. For a 24-foot span at 6/12 pitch: run = 12 ft, rise = 6 ft, line length = 13.42 ft, and with a 1.5-foot overhang the total is about 14.92 ft (14 ft 11 in).
What is a typical roof overhang for residential construction?
Most residential roofs use an overhang (eave) of 12 to 24 inches, with 16 to 18 inches being the most common in single-family homes. Wider overhangs provide more protection from rain and sun, which can be important in wet or hot climates. Minimal overhangs of 6 to 12 inches are typical in areas with high winds or heavy snow loads, where the extra leverage could damage the roof structure. Always check your local building code, as some jurisdictions specify minimum and maximum overhang dimensions.
Should I use 16" or 24" rafter spacing?
16-inch on-center spacing is the most common choice for residential roofs and is required by code in many areas when using 2x6 or 2x8 rafters. It provides a stiffer, stronger roof deck and is recommended for roofs with heavy shingles, tile, or metal roofing. 24-inch spacing uses fewer rafters and is acceptable for lighter roofing materials when larger dimensional lumber (2x10, 2x12) or engineered lumber is used, or when a structural engineer specifies it. When in doubt, use 16" OC for a standard residential gable roof.
What is a birdsmouth cut on a rafter?
A birdsmouth cut is a notch cut into the bottom edge of a rafter where it sits on the top plate of the wall. It consists of two cuts: a plumb cut (vertical) and a seat cut (horizontal). The seat cut depth is typically 1.5 inches for standard 2x lumber, which leaves enough remaining rafter depth to maintain structural integrity. The birdsmouth allows the rafter to bear flat on the wall plate while keeping the rafter line at the correct pitch angle. The size of the birdsmouth is determined by the pitch angle and the width of the top plate.