Rafter Calculator
Find rafter length and roof angle from run and roof pitch.
Rafter length including overhang
How rafter length and roof angle are calculated
A common rafter forms the hypotenuse of a right triangle whose two legs are the horizontal run (half the building width for a gable roof, plus any overhang) and the total rise (how much the roof climbs over that run). Once run and rise are known, the rafter length follows directly from the Pythagorean theorem: Length = √(run² + rise²).
Roof pitch is expressed as rise per 12 inches of run (a "6/12" pitch rises 6 inches for every 12 inches of horizontal run). Total rise for a given run is therefore rise = run × (pitch ÷ 12), and the roof angle in degrees is angle = arctan(pitch ÷ 12).
This calculator adds the overhang as its own small right triangle (using the same pitch) and adds its length to the main span length to give a full ridge-to-tail rafter length. Actual cut length in the field will be shortened slightly at the ridge for the ridge board thickness and adjusted for the birdsmouth notch at the wall plate — this figure gives the working line length to start from.
Where these numbers come from
The formula and default values in this calculator are based on:
- Right-triangle roof framing method (run, rise, and pitch expressed as rise-per-12) is the standard approach used in carpentry framing squares and framing reference tables such as those published by the American Wood Council and traditional rafter-square manuals.
These are planning estimates. Check your local building code, product specifications, and a licensed contractor before you buy materials or build.
Frequently asked questions
What is "run" in rafter framing?
Run is the horizontal distance the rafter spans, measured from the outside of the wall plate to the center of the ridge for a common rafter, not including the overhang. For a simple gable roof it's typically half the building width.
Does this account for the ridge board thickness?
Not automatically. This calculator gives the theoretical line length from the run and pitch; in the field, carpenters shorten the rafter by half the ridge board's thickness at the top cut so two opposing rafters meet correctly at the ridge.
How do I convert the roof angle to a pitch, or vice versa?
Pitch (rise per 12) and angle are related by angle = arctan(pitch/12). This calculator gives you the angle once you enter the pitch; to go the other way, pitch = 12 × tan(angle).
Not happy with our calculations or how it works? Let us know.
Have a suggestion for a calculator you don't see here? Let us know.
All LumberCalcs tools
Framing & Structural
Board Foot Calculator Plywood Calculator Rafter Calculator Rafter Length Calculator Joist Span CalculatorNo calculators match your search.