Construction Calculators
Rafter Length & Roof Pitch Calculator
Enter the run and a pitch (X:12, degrees or percent) to get common and hip/valley rafter length with overhang, plus the pitch in every unit. Pure geometry, imperial or metric.
Inputs
Results
Fill the form and press Calculate.
How rafter length is calculated
A rafter, measured along its slope, is the long side of a right triangle. The horizontal side is the run (the distance from the outside of the wall plate to the ridge, in plan), and the vertical side is the rise. The slope length is then √(run² + rise²). Because rise = run × slope, the length simplifies to run × √(1 + slope²). That square root, the pitch factor, is the only thing that changes between roofs. The calculator applies it to the run plus the horizontal overhang, so the “common rafter (with overhang)” figure is (run + overhang) × √(1 + slope²).
Pitch can be entered three ways, and all three reduce to the same slope number. Rise per 12 is slope × 12 (6:12 means a slope of 0.5). Percent slope is 100 × rise ÷ run, which is 100 × tan(angle), so 45° is exactly 100%. Degrees convert with slope = tan(angle). The results panel shows the pitch in all of these units, so you can move between a framing square (X:12), a digital level (degrees) and a drawing (percent).
Common pitches and their factors
| Pitch (rise per 12) | Degrees | Percent | Length per 1 ft of run |
|---|---|---|---|
| 3:12 | 14.04° | 25% | 1.0308 ft |
| 4:12 | 18.43° | 33.3% | 1.0541 ft |
| 6:12 | 26.57° | 50% | 1.1180 ft |
| 8:12 | 33.69° | 66.7% | 1.2019 ft |
| 9:12 | 36.87° | 75% | 1.2500 ft |
| 12:12 | 45.00° | 100% | 1.4142 ft |
The last column is the pitch factor: multiply the run by it to get the slope length. At 12:12 it is 16.97 inches of rafter for every 12 inches of run, the same figure printed on a framing square's rafter table.
Worked example: the calculator's default roof
Take a 12 ft run, a 6:12 pitch and a 1 ft horizontal overhang. The slope is 6 ÷ 12 = 0.5, so the total rise is 12 × 0.5 = 6 ft. The pitch factor is √(1 + 0.5²) = 1.1180. Plate to ridge, the common rafter is 12 × 1.1180 = 13.416 ft (about 13 ft 5 in). The overhang adds 1 × 1.1180 = 1.118 ft, so the common rafter with its overhang is 14.534 ft, which the tool also writes as feet and inches to the nearest 1/16 in (14 ft 6-7/16 in).
For the hip or valley rafter between two planes of equal pitch meeting at a square corner, the plan run is the common run × √2, here 16.971 ft, and the length is run × √(2 + slope²) = 12 × 1.5 = 18 ft, or 19.5 ft with the 1 ft overhang measured the same way.
A degrees example: a 30° roof with a 5 m run has a slope of tan 30° = 0.5774 (6.93:12). The common rafter plate to ridge is 5 × 1.1547 = 5.774 m, and with a 0.5 m overhang it is 6.351 m. Switch the units box to metres and the labels and results follow.
Calculated length versus the board you buy
The result is the distance measured along the slope from the plate line to the end of the overhang. It is not a cutting length. It ignores ridge-board thickness (the rafter is usually shortened by half the ridge thickness, measured along the slope), the bird's-mouth notch, tail cuts and fascia detail. The tool says so beside the result: it is measured “before any ridge or bird's-mouth deductions”. Add stock for cutting mistakes and for squaring the ends when you pick the lumber length, and confirm the plumb and seat cuts against your plans.
Common mistakes
- Using the full span as the run. On a symmetrical gable roof the run for one rafter is half the building width. Entering the whole width doubles the answer.
- Entering the slope length as the run. The run is horizontal. If you measured along the roof, you already have a slope length.
- Mixing pitch and slope. Strictly, pitch is rise over the whole span and slope is rise over run, so a 6:12 “pitch” on the tape is really a slope of 6 in 12. Site talk uses the two words loosely; this calculator uses rise per 12 of run, which is the usual framing convention.
- Forgetting that overhang is horizontal. Enter the overhang as measured in plan from the wall, not along the tail.
- Using the hip formula on an unusual roof. It assumes two equal-pitch planes meeting at 90°. Different pitches, an L-shaped or non-square corner, or a dormer need a different method.
Low-slope roofs and a note on roofing materials
Roofing manufacturers and building codes treat shallow roofs differently. For example, the National Building Code of Canada defines a low slope as less than 1 in 3 (4:12). If your pitch is below 4:12, the covering, underlayment and flashing details change, and that is a roofing decision rather than a framing one. This calculator only reports geometry.
What this calculator does not cover
It does not size rafters, check spans, account for snow, wind or uplift loads, specify connections, or compute cut angles, roof area or shingle quantities. Rafter size, spacing and species come from your local building code, a span table or an engineer. For roof covering quantities use the roofing calculator, for a single-slope roof the shed roof material takeoff, for framing lumber the lumber calculator, and for water leaving the roof the gutter and downspout flow calculator.
Frequently asked questions
How do I calculate rafter length from roof pitch?
Convert the pitch to a slope (rise per 12 divided by 12), then multiply the horizontal run by the square root of one plus the slope squared. For a 12 foot run at 6:12 the factor is 1.118, so the common rafter is about 13.42 feet plate to ridge before any overhang or cuts.
What is the run of a rafter?
The run is the horizontal distance the rafter covers, measured in plan from the outside of the wall plate to the ridge. On a symmetrical gable roof it is half the building width. It is not the length measured along the slope.
How do I convert roof pitch to degrees?
Divide the rise per 12 by 12 and take the inverse tangent. A 6:12 roof is arctan(0.5), which is 26.57 degrees, and a 12:12 roof is 45 degrees. Percent slope is 100 times the same ratio, so 6:12 is 50 percent and 45 degrees is 100 percent.
What is the difference between pitch and slope?
Strictly, pitch is the rise divided by the full span and slope is the rise divided by the run. In everyday framing, people say a 6 in 12 pitch when they mean a slope of 6 inches of rise for every 12 inches of run, which is how this calculator reads the X:12 value.
How long is a hip or valley rafter?
For two roof planes of equal pitch meeting at a square corner, the hip or valley rafter has a plan run of the common run times the square root of two and a length of the common run times the square root of two plus the slope squared. At 6:12 that is 1.5 feet of rafter per foot of common run.
Does the calculated length include the ridge board and bird's mouth?
No. The result is measured along the slope from the plate line to the end of the overhang, before any ridge-board or bird's-mouth deductions, tail cuts or waste. Use it to choose a stock length and then lay out your cuts from the plans.
What roof pitch counts as low slope?
It depends on the code and the roofing product. The National Building Code of Canada, for example, treats a slope under 1 in 3 (4:12) as low slope. Low-slope roofs usually need different roofing materials and details, so check the manufacturer and your local code.
Can this calculator size my rafters or check the span?
No. It is geometry only. Rafter size, spacing, species, snow and wind loads, and connections must come from your local building code, a span table or an engineer.
Sources
- Roof pitch (Wikipedia) — pitch versus slope, rise per 12, and the National Building Code of Canada low-slope definition (retrieved 2026-10).
- Framing square (Wikipedia) — rafter table: common and hip/valley lengths per 12 in of run (retrieved 2026-10).
- Grade (slope) (Wikipedia) — percent grade as 100 times rise over run and its relation to the tangent; 45 degrees is 100 percent (retrieved 2026-10).
- Rafter Length Calculator (Inch Calculator) — run and rise formulas, and the caveat that calculated length is not necessarily the length of the rafter board (retrieved 2026-10).