Maximum decimal places: 4; Nearest, ties away from zero
Grade
50%
Roof pitch
6:12
Ratio (rise : run)
1 : 2
Rise per unit of run
0.5
Rafter length factor
1.118034
Slope length
13.4164cm
This slope rises 0.5 for every 1 of run: 26.57° from horizontal, a 50 % grade, or a 6/12 roof pitch. Its sloped length is 13.4164 cm.
Slope profile, to scale
How it's calculated S
Symbols
h is the rise, l the horizontal run, g the percent grade, p the rise per 12 of run and f the rafter factor.
Slope
m=lh=126=0.5
Angle
θ=arctanm=arctan0.5=26.565051∘
Grade and pitch
g=100m=50%,p=12m=6:12
Rafter factor
1+m2=1+0.52=1.118034
Multiply a horizontal run by this to get the sloped length.
Slope length
h2+l2=12×1.118034=13.416408cm
About the roof pitch and slope calculator
Every way of stating a slope comes from one ratio, m = rise ÷ run. The angle from horizontal is arctan m, the percent grade is 100m, the roof pitch is 12m (units of rise per 12 of run), and the rafter factor √(1 + m²) turns a horizontal run into the sloped length. Enter a rise and run, or any one of the other forms, and the rest follow.
The default rise of 6 over a run of 12 is a 6/12 roof: 26.57°, a 50% grade and a rafter factor of 1.1180, so 12 cm of run needs 13.4164 cm of rafter. Ramps and roads use the same numbers: the general maximum running slope in §405.2 of the US 2010 ADA Standards, 1:12, is an 8.33% grade, or 4.76°.
Percent grade is not an angle: a 100% grade is 45°, and a vertical face has no finite grade or pitch, so angles must lie between −90° and 90°. A negative rise describes a downhill slope.
How to convert roof pitch to degrees
A roof pitch of x/12 is a slope of m = x/12, and its angle is arctan m. A 6/12 roof has m = 0.5, so its angle is arctan 0.5 ≈ 26.57° and its grade is 50%. The same rise ÷ run ratio describes ramps, roads and the slope of a line.
Slope, angle, grade and pitch formulas
All four are ways of writing one ratio, m = rise/run, with the run measured horizontally:
Quantity
Formula from slope m
Meaning
Slope
m = rise/run
Vertical change per horizontal unit
Angle θ
θ = arctan(m)
Degrees from horizontal
Grade
100m percent
Rise per 100 horizontal units
Roof pitch
12m :12
Rise per 12 horizontal units
Length factor
sqrt(1+m²)
Sloped length per horizontal unit
To go back from an angle, use m = tan θ. A 30° roof has m = tan 30° ≈ 0.5774, a pitch of about 6.93/12 and a 57.7% grade.
Common roof pitches in degrees
Each line gives the angle, the percent grade and the rafter length factor:
2/12: 9.46°, 16.7%, 1.014
3/12: 14.04°, 25%, 1.031
4/12: 18.43°, 33.3%, 1.054
5/12: 22.62°, 41.7%, 1.083
6/12: 26.57°, 50%, 1.118
7/12: 30.26°, 58.3%, 1.158
8/12: 33.69°, 66.7%, 1.202
9/12: 36.87°, 75%, 1.250
10/12: 39.81°, 83.3%, 1.302
12/12: 45°, 100%, 1.414
Rafter length from the run
Multiply the horizontal run by the length factor √(1 + m²). At 8/12 the factor is about 1.2019, so 10 ft of run needs a rafter about 12.02 ft long, before any overhang.
On a symmetrical gable roof, the run on each side is half the span: a building 24 ft wide has 12 ft of run per side.
Slope formula for two points
For a line through (x₁, y₁) and (x₂, y₂), m = (y₂ − y₁)/(x₂ − x₁), the rise divided by the run. From (3, −2) to (8, 1), the rise is 3 and the run is 5, so m = 0.6: a 60% grade at about 30.963757°, or a 7.2/12 pitch.
The downhill row drops 3 over a run of 4. Its minus sign records the descent, while the length along the slope stays a positive 5. The mixed-units row is a rise of 1 ft over 12 in, equal lengths, so it is 45°.
One in twelve is the general maximum running slope for a ramp under §405.2 of the 2010 ADA Standards: an 8.33% grade, about 4.76°.
A flat line has slope 0 and a length factor of 1. A vertical face has zero run, so its slope, grade and pitch are undefined; angles must stay strictly between −90° and 90°.
Common mistakes
Reading percent grade as degrees. A 50% grade is 26.57°, and 100% is 45°, not 90°.
Measuring the run along the roof. Pitch uses horizontal run. On an 8/12 roof, 8 divided by the 14.42 sloped length gives 0.5547, the sine of the angle, not the slope.
Using the full span as the run. Halve the width of a symmetrical gable roof first.
Mixing units. Convert rise and run to one unit before dividing; 1 ft over 12 in is 1:1, not 1:12.
Starting from rise and run, angle, grade or pitch
Rise and run: rise is negative for a downhill slope, and run must be greater than zero.
Angle, percent grade or pitch: any one of them gives all the others.
Sloped length needs an actual run, so it appears only when you start from rise and run.
Take the arctangent of the grade divided by 100: θ = arctan(grade/100). An 8% road grade is arctan 0.08 = 4.57°, and a 100% grade is 45°, not 90°. The reverse is grade = 100 × tan θ, so a 30° slope is a 57.7% grade.
What angle is a 6/12 roof pitch?
26.57°. A pitch of x/12 means x units of rise for every 12 of run, so the angle is arctan(x/12): 4/12 is 18.43°, 6/12 is 26.57°, 8/12 is 33.69° and 12/12 is 45°. The rafter factor for 6/12 is √1.25 = 1.118, so 12 ft of horizontal run needs 13.42 ft of rafter before any overhang.
What is the maximum slope for a wheelchair ramp?
The general maximum running slope under the US 2010 ADA Standards (§405.2) is 1:12: one unit of rise for every 12 of run, an 8.33% grade or 4.76°. Each ramp run may rise at most 30 in (§405.6), so a 30 in rise needs at least 30 ft of horizontal run. Section 405.2 permits limited steeper slopes at existing sites where space is constrained: up to 1:10 for a rise of at most 6 in, or up to 1:8 for a rise of at most 3 in. Slope alone does not establish compliance; landings, width, cross slope and other requirements also apply. Other jurisdictions have their own building codes.
How do you calculate rise over run?
Divide the vertical rise by the horizontal run, both in the same unit: m = rise/run. A roof that rises 6 in over 12 in of run has m = 0.5. Measure the run horizontally, not along the surface: the sloped length here is 13.42 in, and dividing by it gives 0.447, the sine of the angle rather than the slope.
This calculator includes 8 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.
Put this calculator on your site
Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.