Rafter Length Calculator

For any carpenter or ambitious DIYer, framing a roof is a masterclass in geometry and precision. The most fundamental component of a standard gable roof is the common rafter, and calculating its exact length is a critical step that can be intimidating. Our Rafter Length Calculator is a powerful tool designed to simplify this essential task. By using the building's span and the roof's pitch, it applies the Pythagorean theorem to give you the precise length of the rafter, helping you make accurate cuts and build a strong, symmetrical roof structure with confidence.

How to Use the Rafter Length Calculator

Calculating the true length of your common rafters is easy:

  1. Select Units: Choose your preferred measurement system, imperial (feet) or metric (meters).
  2. Enter Building Span: Input the total width of the building, from the outside of one wall to the outside of the opposite wall.
  3. Enter Roof Pitch: Input the "rise" of your roof, which is the number of inches it goes up vertically for every 12 inches it runs horizontally (e.g., enter '6' for a 6/12 pitch).
  4. Calculate Rafter Length: Click the "Calculate" button to see the true length of the rafter from the ridge to the wall plate, as well as the total height of the roof's ridge.

The Geometry of a Rafter: The Pythagorean Theorem

Calculating the length of a rafter is a classic application of the Pythagorean theorem, which relates the sides of a right-angled triangle: a² + b² = c². In the context of a simple gable roof, the rafter itself forms the hypotenuse (the long side, 'c') of a right triangle.

The Sides of the Triangle

Understanding Roof Pitch

Roof pitch is a measure of steepness, expressed as a ratio of rise to run. A "6/12 pitch" means the roof rises 6 inches for every 12 inches of horizontal run. Our calculator first determines the total run (span / 2) and then uses the pitch to calculate the total rise. For example, on a 24-foot wide building, the run is 12 feet. With a 6/12 pitch, the total rise would be 6 feet.

Putting It All Together

Once the calculator determines the total run and total rise, it plugs them into the Pythagorean theorem to find the rafter length.

Rafter Length = √(Run² + Rise²)

The result is the true diagonal measurement of the rafter, from the center of the ridge down to the outside edge of the wall plate.

Important Considerations for Rafter Layout

This calculator gives you the fundamental length of the rafter. In a real-world project, you must also account for several other factors.

Frequently Asked Questions

What is a common roof pitch?

Roof pitches vary widely based on climate and architectural style. A "low-slope" roof might be 3/12 or 4/12. A "conventional" slope is typically between 4/12 and 9/12. A "steep-slope" roof is anything over 9/12. In snowy regions, steeper pitches like 6/12 or 8/12 are common to help shed snow.

Does this calculator work for a hip roof?

No, this calculator is specifically for the "common rafters" of a simple gable roof. A hip roof is more complex and has different types of rafters (hip rafters, jack rafters) that require different trigonometric calculations to determine their lengths and complex bevel cuts.

What tool do carpenters use for this?

A specialized tool called a framing square (or steel square) is the traditional tool for laying out rafters. It has tables stamped onto it that provide the length of the rafter per foot of run for various pitches, allowing a carpenter to make the calculations without a calculator.

Related calculators