Skip to main content

Rafter Length Calculator

Calculate rafter length accurately for your build. Get material quantities, waste allowances, and project cost breakdowns.

Skip to calculator
Construction & Engineering

Rafter Length Calculator

Calculate rafter length from building width and roof pitch. Includes ridge shortening, overhang tail length, pitch multiplier, and cut angles for roof framing.

Last updated: December 2025

Calculator

Adjust values & calculate
Total Rafter Length
14 ft 5 9/16 in
14.465 ft | 26.6ยฐ roof angle | 6/12 pitch
Run
12.00 ft
Rise
6.00 ft
Line Length
13.416
ft (before adjustments)
Tail Length
1.118
ft

Cut Details

Plumb Cut Angle26.6ยฐ from horizontal
Seat Cut Angle63.4ยฐ from vertical
Ridge Shortening0.839 in
Pitch Multiplier1.1180
Lumber Tip: Round up to the next standard lumber length (8, 10, 12, 14, 16, 18, 20 ft) and add at least 6 inches for cutting waste. Check local span tables (IRC R802.5) to verify the rafter size is adequate for the span, spacing, and load conditions.
Your Result
Total: 14 ft 5 9/16 in (14.465 ft) | Angle: 26.6ยฐ
Share Your Result
Understand the Math

Formula

Rafter = sqrt(Runยฒ + Riseยฒ) - Shortening + Tail

The run is half the building width. The rise equals run times pitch divided by 12. The rafter line length is the hypotenuse of the run-rise right triangle. Subtract the ridge shortening (half ridge thickness along the slope). Add the tail length (overhang divided by cosine of roof angle) to get the total rafter length including overhang.

Last reviewed: December 2025

Worked Examples

Example 1: 24-ft Wide House, 6/12 Pitch

Calculate rafter length for a 24 ft wide building with 6/12 pitch, 12 inch overhang, and 1.5 inch ridge board.
Solution:
Run = 24/2 = 12 ft Rise = 12 x (6/12) = 6 ft Line length = sqrt(144 + 36) = 13.416 ft Shortening = (0.75/12) / cos(26.57) = 0.070 ft Tail = (12/12) / cos(26.57) = 1.118 ft Total = 13.416 - 0.070 + 1.118 = 14.464 ft
Result: Total rafter = 14 ft 5 9/16 in (buy 16 ft lumber)

Example 2: 30-ft Wide Garage, 4/12 Pitch

Calculate for 30 ft wide, 4/12 pitch, 18 inch overhang, 1.5 inch ridge.
Solution:
Run = 15 ft, Rise = 5 ft Line length = sqrt(225 + 25) = 15.811 ft Shortening = 0.066 ft Tail = 1.5 / cos(18.43) = 1.581 ft Total = 15.811 - 0.066 + 1.581 = 17.326 ft
Result: Total rafter = 17 ft 3 15/16 in (buy 18 ft lumber)
Expert Insights

Background & Theory

The Rafter Length Calculator applies the following established principles and formulas. Structural and construction engineering is governed by fundamental load analysis, material science, and regulatory standards that ensure the safety and durability of built structures. The primary distinction in load analysis is between dead loads โ€” the permanent self-weight of structural elements, finishes, and fixed equipment โ€” and live loads, which represent variable occupancy, furniture, and environmental forces such as wind and snow. These are combined using factored load equations, such as the ASCE 7 formula U = 1.2D + 1.6L, where D is dead load and L is live load. Concrete mix design is governed by the water-cement (w/c) ratio, which is the primary determinant of compressive strength and durability. A w/c ratio of 0.40โ€“0.45 typically yields concrete with 28-day compressive strengths of 30โ€“40 MPa. Common mix ratios by weight for structural concrete are approximately 1 part cement : 1.5โ€“2 parts sand : 3 parts coarse aggregate. Structural steel is characterized by its yield strength (the stress at which permanent deformation begins, typically 250โ€“350 MPa for mild steel) and ultimate tensile strength (typically 400โ€“500 MPa). Mid-span deflection of a simply supported beam under a central point load is given by ฮด = FLยณ / (48EI), where F is force, L is span length, E is Young's modulus, and I is the second moment of area. Building insulation is rated by R-value, a measure of thermal resistance in units of mยฒยทK/W (SI) or ftยฒยทยฐFยทh/BTU (imperial). Higher R-values indicate greater resistance to heat flow. Foundation design depends on the allowable bearing capacity of the underlying soil, which ranges from approximately 75 kPa for soft clay to over 10,000 kPa for bedrock. Drainage gradients for surface water are typically specified as a minimum of 1โ€“2% slope away from building foundations to prevent hydrostatic pressure and water infiltration.

History

The history behind the Rafter Length Calculator traces back through the following developments. The history of construction engineering spans thousands of years of accumulated empirical knowledge and, more recently, rigorous scientific analysis. The ancient Egyptians built the Great Pyramid of Giza around 2560 BCE using an estimated 2.3 million stone blocks, demonstrating sophisticated logistics, geometry, and workforce organization. Roman engineers advanced the field dramatically through the use of pozzolanic concrete โ€” a mixture of volcanic ash, lime, and seawater โ€” enabling the construction of the Pantheon dome (43.3 m diameter, completed around 125 CE) and a vast network of aqueducts and roads across the empire. Cast iron emerged as a structural material during the Industrial Revolution, first used prominently in the Iron Bridge at Coalbrookdale, England, completed in 1779. Wrought iron and later steel allowed far greater spans and heights. The Eiffel Tower, completed in 1889, demonstrated the structural possibilities of wrought iron at scale and influenced the development of steel-frame skyscraper construction in Chicago and New York. Reinforced concrete was systematically developed by Joseph Monier, a French gardener, who patented iron-reinforced concrete pots and panels in the 1860s, and later by engineers including Franรงois Hennebique who created the first comprehensive reinforced concrete framing system in the 1890s. The 1906 San Francisco earthquake caused widespread devastation and galvanized the engineering profession to develop seismic design provisions. Subsequent earthquakes โ€” including the 1971 San Fernando and 1994 Northridge events โ€” drove successive improvements in seismic codes, base isolation technology, and ductile detailing of reinforced concrete and steel frames. Building codes became increasingly standardized in the twentieth century, with the International Building Code (IBC) first published in 2000 providing a unified model code adopted across much of the United States. Building Information Modeling (BIM) emerged in the 2000s as a digital workflow integrating architectural, structural, and MEP design into a unified three-dimensional model, fundamentally changing coordination practices across the industry.

Share this calculator

Explore More

Frequently Asked Questions

Divide the building width by 2 to get the run (horizontal distance from the outside wall to the center of the ridge). Multiply the run by the pitch ratio (rise per 12 inches of run divided by 12) to get the total rise. The rafter line length is the hypotenuse: square root of (run squared plus rise squared). Then subtract the shortening at the ridge (half the ridge board thickness divided by cosine of the roof angle) and add the tail length for any overhang. The tail length equals the overhang distance divided by cosine of the roof angle.
When rafters meet at a ridge board, they do not extend all the way to the centerline of the building. Each rafter must be shortened by half the thickness of the ridge board, measured horizontally. For a standard 2x ridge board (1.5 inches actual), each rafter is shortened by 0.75 inches measured horizontally. This horizontal dimension must be converted along the rafter slope by dividing by the cosine of the roof angle. For a 6/12 pitch, the shortening along the rafter is 0.75 / cos(26.57) = 0.839 inches.
Calculate the total rafter length including the tail (overhang) and round up to the next standard lumber length. Standard dimensional lumber comes in 8, 10, 12, 14, 16, 18, and 20 foot lengths. Add 6 to 12 inches to your calculated length for trimming and cutting waste. For example, if your total rafter length calculates to 13 feet 4 inches, purchase 14-foot boards. For longer rafters, some lumberyards stock 22 and 24 foot lengths, but these may need to be special ordered and are more expensive per board foot.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

Rafter = sqrt(Runยฒ + Riseยฒ) - Shortening + Tail

The run is half the building width. The rise equals run times pitch divided by 12. The rafter line length is the hypotenuse of the run-rise right triangle. Subtract the ridge shortening (half ridge thickness along the slope). Add the tail length (overhang divided by cosine of roof angle) to get the total rafter length including overhang.

Frequently Asked Questions

How do I calculate rafter length from building width and pitch?

Divide the building width by 2 to get the run (horizontal distance from the outside wall to the center of the ridge). Multiply the run by the pitch ratio (rise per 12 inches of run divided by 12) to get the total rise. The rafter line length is the hypotenuse: square root of (run squared plus rise squared). Then subtract the shortening at the ridge (half the ridge board thickness divided by cosine of the roof angle) and add the tail length for any overhang. The tail length equals the overhang distance divided by cosine of the roof angle.

What is the rafter shortening at the ridge?

When rafters meet at a ridge board, they do not extend all the way to the centerline of the building. Each rafter must be shortened by half the thickness of the ridge board, measured horizontally. For a standard 2x ridge board (1.5 inches actual), each rafter is shortened by 0.75 inches measured horizontally. This horizontal dimension must be converted along the rafter slope by dividing by the cosine of the roof angle. For a 6/12 pitch, the shortening along the rafter is 0.75 / cos(26.57) = 0.839 inches.

How do I determine what lumber length to buy for my rafters?

Calculate the total rafter length including the tail (overhang) and round up to the next standard lumber length. Standard dimensional lumber comes in 8, 10, 12, 14, 16, 18, and 20 foot lengths. Add 6 to 12 inches to your calculated length for trimming and cutting waste. For example, if your total rafter length calculates to 13 feet 4 inches, purchase 14-foot boards. For longer rafters, some lumberyards stock 22 and 24 foot lengths, but these may need to be special ordered and are more expensive per board foot.

How do I verify Rafter Length Calculator's result independently?

The Formula section on this page shows the equation used. You can reproduce the calculation manually or in a spreadsheet using those steps. Compare your answer against the worked examples in the Examples section, which use known reference values so you can confirm the calculator is behaving as expected.

What inputs do I need to use Rafter Length Calculator accurately?

Each field is labelled with the required unit (metric or imperial). Gather your source values before starting โ€” for example, a weight measurement in kilograms, a distance in metres, or a dollar amount โ€” and enter them exactly as measured. The formula section on this page lists every variable and explains what each represents.

Is my data stored or sent to a server?

No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.

References

Reviewed by Abdullah, Technical Content Specialist ยท Editorial policy