Home › Construction & Home › Rafter Calculator
Construction & Home · Framing

Rafter Calculator

Estimate the theoretical straight-line length and slope angle of a common rafter from rise and horizontal run, or from an X/12 roof slope. An optional horizontal eave overhang can be included in the same roof plane.

UFWritten and coded by Umer Farooq, CalcsDone founder/developer•Updated September 24, 2026
Quick answer: for a straight common-rafter line, length = √(horizontal run² + rise²). For an X/12 slope, rise = horizontal run × X ÷ 12. This is geometry only—not structural span sizing or a cut-ready framing plan.

Enter your rafter geometry

L = √(run² + rise²)
ft
ft
in
Rafter slope length
—
theoretical line
Slope angle
—
from horizontal
Equivalent pitch
—
rise per 12 run
Total rise
—
through overhang plane
Enter valid measurements. Run must be greater than zero.
Method

How the Rafter Calculator Works

The calculator models one straight common-rafter line as right-triangle geometry.

Rise & run mode

The entered rise and horizontal run establish the slope ratio. The theoretical line to the ridge is the triangle’s hypotenuse.

Pitch mode

Enter X in an X/12 roof slope. The calculator converts it to a slope ratio of X ÷ 12 and applies that ratio to the horizontal run.

Horizontal overhang

The optional overhang is treated as additional horizontal projection. Its corresponding rise is generated from the same slope ratio before the total slope length is calculated.

Angle

The angle from horizontal is arctan(rise ÷ run). This is a geometric slope angle, not a complete saw-cut or framing layout instruction.

Scope

Rafter Length Is Different From Structural Rafter Span

The result above is a sloped geometric length. Structural rafter design is a different problem. The American Wood Council’s span resources calculate maximum horizontal spans using factors such as lumber species and grade, spacing, bending and shear properties, deflection, and loading conditions.

AWC also describes rafter span as the horizontal projected span, rather than simply the sloping board length. Do not use the number from this page as proof that a proposed rafter size or spacing is structurally adequate.

Worked examples

Rafter Calculator Examples

These examples use the same formulas as the calculator and keep geometric length separate from structural design.

6/12 slope with 12-in overhang

Horizontal run12 ft
Slope6/12
Total horizontal run13 ft
14.53 ft
Total rise through the same plane is 6.50 ft; slope angle ≈ 26.57°.

Measured 3-ft rise over 9-ft run

Rise3 ft
Run9 ft
Overhang0 in
9.49 ft
Equivalent pitch is 4/12 and the slope angle is about 18.43°.

9/12 slope with 18-in overhang

Horizontal run8 ft
Slope9/12
Total horizontal run9.5 ft
11.88 ft
Total rise through the same plane is 7.125 ft; slope angle ≈ 36.87°.
Limitations

What This Calculator Does Not Determine

Structural member size or allowable span

Species, grade, member size, spacing, loads, deflection limits, bearing, moisture/service conditions, and applicable code requirements can affect structural design.

Birdsmouth, ridge, fascia, or connection details

The result is not a cut-ready board dimension. Project-specific ridge conditions, bearing/notches, connections, and eave/fascia details require separate layout and verification.

Hip and valley rafter geometry

This page is intentionally limited to a straight common-rafter plane. Hip and valley layouts require additional plan geometry and are outside this calculator’s scope.

Roof-covering suitability

A mathematical slope does not establish whether a roofing product is permitted at that slope. Check the applicable code and the exact manufacturer’s installation requirements.

Safety

Roof and Framing Work Requires Separate Safety Planning

Under OSHA 29 CFR 1926.501(b)(13), workers engaged in qualifying residential construction 6 feet or more above lower levels must be protected by conventional fall protection or another measure permitted by the standard; OSHA also provides a specific infeasibility/greater-hazard exception requiring a site-specific plan under 1926.502(k). A calculator result does not replace site-specific safety procedures, training, access equipment, or applicable workplace requirements.

FAQ

Rafter Calculator FAQ

What is the difference between run and rafter length?
Run is the horizontal projection. Rafter length here is the theoretical straight-line hypotenuse along the roof slope. Structural span terminology should be checked against the applicable design reference.
What does 6/12 mean?
It represents 6 units of vertical rise for every 12 units of horizontal run. The slope ratio is 0.5 and the geometric angle is about 26.57°.
How is the overhang handled?
Enter the horizontal eave projection in inches. The calculator converts it to feet, adds it to the horizontal run, and applies the same slope ratio to find the corresponding rise and sloped length.
Does the result include a ridge-board deduction?
No. The result is deliberately a theoretical line based on the entered geometry. Ridge details vary by framing configuration and should be laid out from the actual plan rather than assumed here.
Can I use this to choose a rafter size?
No. Choosing a structural rafter size requires load, species/grade, spacing, span, deflection and other design information. Use applicable code/design resources or qualified professional guidance where required.
Related calculators

Continue Your Roof or Framing Calculation

Sources & methodology

References Used for This Calculator

UF

About this calculator

This calculator was written and coded by Umer Farooq, founder/developer of CalcsDone. It provides common-rafter geometry for planning and checking arithmetic; it is not a structural design, stamped framing plan, code-compliance determination, or instruction to work at height.

Scroll to Top