Data source and methodology
Authoritative source: NIST Digital Library of Mathematical Functions (DLMF), Chapter 4 — Trigonometric Functions, Release 1.1.9 (2023-06-15). Link: https://dlmf.nist.gov/4.
All calculations are strictly based on the formulas and definitions provided by this source.
Note: Minimum allowable roof slopes for various materials are regulated by building codes (e.g., ICC International Residential Code, 2021, Section R905). Always verify code requirements for your jurisdiction.
The formula explained
Given rise r and run a (same units), the fundamental trig relation is:
$$\theta = \arctan\!\left(\frac{r}{a}\right)$$
Pitch in-12 (x-in-12):
$$x = 12 \cdot \frac{r}{a}$$
Slope percentage:
$$\text{slope}\% = 100 \cdot \frac{r}{a}$$
For an actual horizontal run A, the actual rise R and rafter length L are:
$$R = A \cdot \frac{r}{a} \quad\text{and}\quad L = \sqrt{A^2 + R^2} = A \cdot \sqrt{1 + \left(\frac{r}{a}\right)^2}$$
Glossary of variables
- Rise (r)
- Vertical increase over the run (any length unit).
- Run (a)
- Horizontal distance corresponding to the measured rise (any length unit).
- Pitch (x-in-12)
- How many inches of rise for every 12 inches of run.
- Angle (θ)
- Roof inclination measured from the horizontal, in degrees.
- Slope (%)
- Rise divided by run, expressed as a percentage.
- Actual run (A)
- Real project horizontal distance for the rafter span from plate to ridge/centerline.
- Actual rise (R)
- Vertical height corresponding to the actual run A.
- Rafter length (L)
- Hypotenuse of the right triangle formed by run and rise (before plumb/seat cuts and overhangs).
Worked example
How it works: A step-by-step example
Inputs: rise r = 6 in, run a = 12 in. Optional actual run A = 10 ft.
- Pitch (in-12): x = 12 × (r/a) = 12 × (6/12) = 6-in-12.
- Angle: θ = arctan(r/a) = arctan(0.5) ≈ 26.565°.
- Slope %: 100 × (r/a) = 100 × 0.5 = 50%.
- Convert A = 10 ft (keep units consistent). Rise R = A × (r/a) = 10 × 0.5 = 5 ft.
- Rafter length L = √(A² + R²) = √(10² + 5²) = √125 ≈ 11.180 ft.
This matches the calculator’s outputs when you enter the same values.
Frequently asked questions (FAQ)
What does 6-in-12 mean?
It means the roof rises 6 inches for every 12 inches of horizontal run. This is equivalent to 26.565° and 50% slope.
How do I convert pitch to degrees?
Use θ = arctan(rise/run). For pitch x-in-12, substitute rise/run = x/12. Example: 9-in-12 → θ = arctan(9/12) ≈ 36.87°.
Can I enter metric measurements?
Yes. Rise and run can be entered in mm, cm, or m. The ratio is unitless, so final angle and pitch are independent of unit choice.
How accurate is the rafter length?
The geometric length is exact given your inputs. In practice, account for plumb/seat cuts, ridge thickness, overhangs, and material allowances.
What pitch should I use for my roof?
It depends on climate, roofing material, and architectural design. Check manufacturer specifications and local codes (e.g., IRC R905) and consult a licensed professional.
How do I measure pitch on an existing roof?
On a safe, stable surface, place a level so that 12 in is horizontal; measure the vertical rise at the 12-in mark. That reading is your pitch in-12. Always follow fall protection best practices.
Is slope (%) the same as grade?
Yes—both express rise/run × 100. A 6-in-12 roof is 50% grade.