Skip to content
Construction & Home Improvement

Rafter Calculator

A Rafter Calculator helps estimate the sloping length of a common rafter from roof geometry. The basic calculation uses horizontal run and vertical rise; some tools derive those measurements from span and roof pitch.

i The most important distinction is between geometric rafter length and finished cut length. Triangle mathematics gives the distance between defined endpoints. Ridge details, overhang and cut layout determine how that distance applies to a particular roof assembly.

Roof geometry

{{ c.label }}
{{ c.hint }}
{{ c.suf }}
{{ c.hint }}
Geometric line length
{{ bigValue }} {{ bigUnit }}
{{ bigSub }}
{{ st.label }} {{ st.value }}
Your calculation {{ wl }}

No overhang, ridge-board or cut-layout adjustment included. The result is a geometric length, not automatically the finished rafter’s cut-to-cut dimension.

Rafter triangle

Side view, drawn to scale. Run and rise share the same endpoints.

{{ runText }} {{ riseText }} {{ angleLabel }}
Rafter line {{ lenLabel }} Calculation endpoints

How pitch changes the length

Same {{ runLabel }} run. Select a row to use that pitch.

PitchAngleRiseLength

These are geometric comparisons. They do not establish which pitch is suitable for a roofing material, climate or building.

01 — Measurements

Start with the correct roof measurements

MeasurementMeaning
{{ ir.a }}{{ ir.b }}

Johnson Level’s framing guide defines run as horizontal distance and rise as vertical distance. It also explains how common-rafter layout depends on the chosen wall and ridge references. Johnson Level

Same triangle

A rise measured to the ridge centreline should not be combined casually with a run measured to the ridge face. Both measurements must describe the same triangle.

02 — Method

How to prepare a rafter calculation

  1. {{ sp.n }}

    {{ sp.title }}

    {{ sp.text }}

03 — Formula

Rafter Calculator formula

A common-rafter triangle follows the Pythagorean relationship:

L=√R2 + H2
Where:
{{ v.sym }}
= {{ v.text }}
Run and rise must use the same unit. The result uses that unit too.
This relationship describes the distance between the corresponding geometric endpoints. It does not calculate timber strength, spacing or allowable structural span.
04 — Pitch notation

Understanding pitch notation

A roof described as 6:12 rises 6 units for every 12 horizontal units:

Slope ratio=612= 0.5

That is a 50% slope, not a 6% slope and not a 6° angle.

US and UK conventions

In US practice, rise per 12 inches of run is common notation. UK drawings may instead specify the roof angle in degrees. Always read the stated convention rather than assuming the number represents the same quantity.

The angle corresponding to a rise/run ratio is:

θ=arctan(HR) For 6:12θ = arctan(0.5) ≈ 26.57°
05 — Worked example

Worked example: 12 ft run and 6 ft rise

Assume a common-rafter line has:

{{ ea.a }}{{ ea.b }}
Then L = √(12² + 6²) L = √(144 + 36) = √180 L ≈ 13.4164 ft
ResultValue
{{ er.a }}{{ er.b }}

The feet-and-inches conversion uses the unrounded length:

0.4164079 × 12 ≈ 4.9969 in

This is why 13.42 ft does not mean 13 ft 4.2 in.

The result is a geometric length, not automatically the finished rafter’s cut-to-cut dimension.

06 — Run and span

Is rafter run half the roof span?

For a symmetrical gable roof, the horizontal distance from an outside wall reference to the ridge centreline is commonly half the corresponding overall span.

A 24 ft span therefore gives a 12 ft centreline run before framing adjustments.

However, a rafter meeting the face of a ridge board has a different endpoint. Johnson Level’s guide explains a half-ridge-thickness deduction from the run in its common-rafter layout. Johnson Level

The deduction must be applied consistently with the slope and measurement references. Do not subtract half the ridge thickness directly from the sloping length and assume the result is equivalent.

Not universal

Half-span is not a universal rule for offset ridges, unequal roof slopes or every roof type.

07 — Pitch and length

How roof pitch affects rafter length

With horizontal run unchanged, increasing rise increases the sloping length.

The table below uses a constant 12 ft run, with no overhang or framing deductions.

Pitch notationRiseGeometric rafter length
{{ pt.a }}{{ pt.b }}{{ pt.c }}

These are geometric comparisons. They do not establish which pitch is suitable for a roofing material, climate or building.

08 — Overhang

Overhang: horizontal distance or sloping tail?

An overhang measurement needs a stated direction.

Horizontal overhangA horizontal overhang projects beyond the wall. The corresponding rafter tail follows the roof slope, so its sloping length is greater than that horizontal distance on a pitched roof.
Sloping tailA tail already measured along the rafter is a different input. Confusing the two can produce an incorrect overall length.

Johnson Level’s guide calculates the tail using its own horizontal run and roof slope before adding the resulting sloping length. Johnson Level

09 — Cut length

Why line length is not necessarily cut length

A finished rafter depends on more than the triangle.

Relevant details can include:

+{{ ex }}

The triangle result supports layout. It does not specify notch depth, bearing adequacy or connection requirements.

Buying timber

Do not assume that purchasing timber exactly equal to the displayed length provides sufficient material for the intended cuts.

10 — Mistakes

Common rafter measurement mistakes

MistakeHow to avoid it
×{{ mk.m }} →{{ mk.b }}
11 — Related tools

Rafter Calculator versus Roof Pitch Calculator

Rafter lengthFocuses on a sloping distance.
Roof pitchFocuses on the relationship between rise and run, or its equivalent angle.
Structural rafter spanWhether a member can span a distance under specified conditions.

The tools can complement each other, but their names do not establish their capabilities. Check whether a calculator accepts known rise and run, derives them from pitch, or includes framing adjustments.

Likewise, a structural rafter span calculator answers a different question: whether a member can span a distance under specified conditions. American Wood Council guidance considers loads, deflection, timber species, grade and size when assessing rafters. American Wood Council

Not a structural check

Geometry alone does not select adequate timber dimensions or spacing.

12 — FAQ

Frequently asked questions

{{ q.a }}

13 — Sources

External references

Related calculators

More Construction Tools

All construction calculators →
From the blog

Roof Framing Guides

View all posts →
Rafter line length {{ bigValue }}{{ bigUnit }}