Measuring something real? Put point 1 at (0, 0) and point 2 at (horizontal run, height gained), in the same unit. Measure the run level across, not along the sloping surface.
One slope, four ways to write it
Engineers write a ratio, road signs a percent grade, roofers a pitch in 12 and maths class an angle. They are the same number, m, dressed four ways. These are real limits and landmarks, gentlest first, so you can see where your answer sits.
| Where you meet it | Ratio | Grade | Angle | Pitch | Kind |
|---|---|---|---|---|---|
| Steepest cross slope on an ADA ramp | 1 : 48 | 2.08% | 1.19° | 0.25 in 12 | Access |
| Steepest ADA walkway before it counts as a ramp | 1 : 20 | 5% | 2.86° | 0.6 in 12 | Access |
| Interstate grade generally allowed in mountains | 1 : 16.67 | 6% | 3.43° | 0.72 in 12 | Road |
| Steepest running slope on an ADA ramp | 1 : 12 | 8.33% | 4.76° | 1 in 12 | Access |
| A 10% hill sign, which is not 10 degrees | 1 : 10 | 10% | 5.71° | 1.2 in 12 | Road |
| Lowest pitch allowed for asphalt shingles | 1 : 6 | 16.67% | 9.46° | 2 in 12 | Roof |
| Where a low slope roof ends and a steep one begins | 1 : 3 | 33.33% | 18.43° | 4 in 12 | Roof |
| Baldwin Street, Dunedin | 1 : 2.87 | 34.8% | 19.19° | 4.18 in 12 | Street |
| Pilatus Railway, its steepest section | 1 : 2.08 | 48% | 25.64° | 5.76 in 12 | Rail |
| A common 6 in 12 house roof | 1 : 2 | 50% | 26.57° | 6 in 12 | Roof |
| Rise equals run | 1 : 1 | 100% | 45° | 12 in 12 | Maths |
Limits from the 2010 ADA Standards (sections 403.3, 405.2 and 405.3), the 2021 International Residential Code (R905.2.2), the AASHTO Interstate standards and the low slope band quoted from Canadian code. Street and railway grades as listed on Wikipedia. Read 23 September 2026.
Slope from two points, and every way to write it
Rise over run, the line equation, parallel and perpendicular slopes, and how a slope becomes an angle, a percent grade or a roof pitch.
Slope is one number that tells you how steep a line is and which way it leans. It is the rise divided by the run: how far the line climbs, over how far it travels across. This calculator takes two points, works out that number exactly, then writes it every other way you are likely to need: as an angle, as a percent grade, as a ratio, as a roof pitch and as the equation of the line.
The slope formula, and what rise over run means
Pick any two points on a line, (x₁, y₁) and (x₂, y₂). The rise is the change in y, y₂ minus y₁. The run is the change in x, x₂ minus x₁. The slope, written m, is the rise divided by the run:
m = (y₂ - y₁) / (x₂ - x₁)
Take (-2, 1) and (6, 5), the points the calculator opens with. The rise is 5 - 1 = 4 and the run is 6 - (-2) = 8, so m = 4 / 8 = 1/2. For every step of 1 to the right the line climbs half a step. The letter m for slope is old; its first known use in English is in a textbook by O'Brien from 1844, and it has stuck in y = mx + b ever since.
The sign carries the direction. Reading left to right, a positive slope climbs and a negative slope falls. A slope of 0 is a horizontal line, because the rise is zero. A vertical line has a run of zero, and since nothing can be divided by zero its slope is undefined rather than zero. The calculator says so and gives the line as x = c instead.
Which point goes first
Either one. Swapping the two points flips the sign of the rise and of the run together, and a negative over a negative is the same fraction. What you cannot do is mix the order: y₂ - y₁ on top with x₁ - x₂ underneath gives the right size with the wrong sign. The working panel prints the subtraction in full with your numbers, so this slip is easy to spot. The other classic mistake is putting the run on top. Rise always goes over run, up over across.
From slope to the equation of the line
Two points fix a line, so once you have m you can write the whole line three ways. The calculator gives all three, in exact fractions where your inputs allow it, so a slope of one third is printed as 1/3 and not only as 0.3333.
- Slope intercept form, y = mx + b. The b is the y-intercept, where the line crosses the y axis. Find it with b = y₁ - m × x₁. For the opening example, b = 1 - (1/2)(-2) = 2, so the line is y = 0.5x + 2.
- Point slope form, y - y₁ = m(x - x₁). This one needs no intercept at all, which makes it the quickest to write from a single known point: y - 1 = 0.5(x + 2).
- Standard form, Ax + By = C, with whole numbers. The same line is x - 2y = -4. Standard form is the only one of the three that can also describe a vertical line, which is why the calculator keeps it even when the slope is undefined.
The x-intercept, where the line meets the x axis, comes from setting y to zero: x = -b / m, which is -4 here. A horizontal line that is not the x axis never meets it, and the calculator says that rather than printing an error.
Parallel and perpendicular slopes
Parallel lines never meet, so they must rise at the same rate: parallel lines have equal slopes. Perpendicular lines meet at a right angle, and their slopes multiply to -1. In practice you flip the fraction and change the sign. The perpendicular to a slope of 1/2 is -2, and the perpendicular to 4/3 is -3/4. The one exception is the pair that has no number to flip: a horizontal line, slope 0, is perpendicular to a vertical line, whose slope is undefined.
Slope as an angle
Slope is the tangent of the angle the line makes with the horizontal, m = tan θ, so the angle comes back with the arctangent: θ = arctan(m). A slope of 1 is 45 degrees, a slope of 1/2 is 26.57 degrees, and 4/3 is 53.13 degrees.
For a falling line there are two honest answers, and the calculator gives both. In coordinate geometry the angle of inclination is measured anticlockwise from the positive x axis, so it always sits between 0 and 180 degrees; a slope of -0.4 has an inclination of 158.2 degrees. On a hill what you want is the steepness, the angle down from the horizontal, which for the same line is 21.8 degrees.
Slope as a percent grade, and why 10% is not 10 degrees
Road signs and site plans quote grade: the slope times 100. A 5% grade climbs 5 metres, or 5 feet, for every 100 across. The trap is that percent and degrees do not scale together, because the tangent does not grow in a straight line. A 10% grade is only 5.71 degrees, while a 10 degree slope is a 17.63% grade. At 45 degrees rise equals run and the grade is 100%, and past that the percentage keeps going: 60 degrees is a 173.2% grade, and as a line approaches vertical the grade grows without limit. So a grade above 100% is not an error; it just means steeper than 45 degrees.
Railways in Europe often use per mille instead, rise over run times 1000, so a 1% grade is 10‰. Builders in the UK and Australia like a ratio, 1 in 12 or 1:12, meaning one unit up for every twelve across. The calculator prints the ratio as rise to run, and as a roof pitch, which is the rise over a run of 12: a slope of 1/2 is a 6 in 12 roof.
Real grades, and what the limits actually are
The reference table above this guide lines up the numbers people most often need to check, and the badge under the result tells you which band your slope falls within. A few are worth knowing by heart.
- Wheelchair ramps. The 2010 ADA Standards cap a ramp's running slope at 1:12, an 8.33% grade or 4.76 degrees, and a single ramp run may rise no more than 30 inches before a landing. The cross slope, sideways across the ramp, may be no steeper than 1:48. A walking route no steeper than 1:20, which is 5%, is not treated as a ramp at all.
- Highways. US Interstate standards generally allow up to 6% in mountainous terrain, 5% in rolling country and 4% on level ground, with one extra percentage point in urban areas.
- Roofs. The 2021 International Residential Code allows asphalt shingles only on a pitch of 2 in 12 or steeper, which is 16.67% or about 9.46 degrees, and asks for a double layer of underlayment from 2 in 12 up to 4 in 12. Canadian code treats anything under 4 in 12 as a low slope roof.
- Streets and railways. Baldwin Street in Dunedin is listed at 34.8%, Canton Avenue in Pittsburgh at 37% and Bradford Street in San Francisco at 41%. The Pilatus Railway in Switzerland climbs at up to 48%, which is still under 26 degrees.
Measuring a real slope
To use the calculator on something physical, put point 1 at (0, 0) and point 2 at (run, rise), both in the same unit. A ramp that climbs 2 feet over 24 feet of floor is (0, 0) to (24, 2): exactly 1:12, 8.33%. The key word is horizontal. Rise over run uses the level distance across, taken from a plan or a level line, not the length measured along the sloping surface. Dividing by the sloped length instead is a common shortcut that is close for gentle slopes, about 1.5% out at 10 degrees, and gets worse the steeper you go. Over longer distances the same rule holds: climbing 396 feet over 3 miles, which is 15,840 feet, is a 2.5% grade, 1 in 40, or 1.43 degrees.
Reading the diagram
The drawing redraws with every keystroke. It shows both points, the full line through them, the run as a dashed blue leg and the rise as a dashed orange leg, and the angle at the first point. It is drawn to scale, one unit across the same length as one unit up, so a slope of 1 really does look like 45 degrees. Most graphing tools stretch one axis to fill the frame, which makes a gentle grade look steep and a steep one look gentle.
The run and rise form a right triangle with the segment between the points as its long side. That is why the calculator can also give the straight line distance between the points, shown as a single row. For more on that length, including distance in three dimensions and across the Earth, use the distance calculator; to solve the sides of a right triangle directly, use the Pythagorean theorem calculator. If your slope is a ratio you want to scale up, say a 1:12 ramp that must climb 21 inches, the proportion calculator finds the missing run.
Frequently Asked Questions
Does it matter which point I call the first one?
No. Swapping the points changes the sign of both the rise and the run, and the two signs cancel, so (3, 8) to (-2, 10) and (-2, 10) to (3, 8) both give -2/5. The only thing that matters is that you subtract in the same order top and bottom. The point slope form looks slightly different because it is built on the first point, but it describes the same line.
Is a 10 percent grade the same as a 10 degree slope?
No, and the gap grows with steepness. A 10% grade is a slope of 0.1, which is arctan(0.1) = 5.71 degrees. A 10 degree slope is tan(10°) × 100 = 17.63%. Percent and degrees only agree at zero. The reference table on this page lists the common pairs side by side.
Can a percent grade be more than 100 percent?
Yes. 100% only means the rise equals the run, which is 45 degrees. Anything steeper goes past 100%: 60 degrees is 173.2%. The grade grows without limit as a line approaches vertical, and a truly vertical line has no grade at all, which is why the calculator reports it as undefined.
How do I work out the slope of a ramp or path I can measure?
Enter point 1 as (0, 0) and point 2 as (horizontal run, height gained), in the same unit. Measure the run level across, from a plan or with a level and a tape, not along the sloping surface. A ramp that rises 2 ft over 24 ft of floor comes out as 1:12, 8.33% and 4.76 degrees.
How steep is a wheelchair ramp allowed to be?
Under the 2010 ADA Standards the running slope of a ramp can be no steeper than 1:12, which is 8.33%, and one run can rise no more than 30 inches before a landing. The cross slope can be no steeper than 1:48, about 2.08%. A route no steeper than 1:20, or 5%, counts as a walking surface rather than a ramp. Local codes can be stricter, so check yours before you build.
How do I get the slope of a line at right angles to mine?
Take the negative reciprocal: flip the fraction and change the sign. A slope of 2/3 becomes -3/2, and a slope of -4 becomes 1/4. Multiply the two and you always get -1, which is the test for perpendicular lines. Horizontal and vertical lines are the exception, since 0 has no reciprocal; they are perpendicular to each other. The calculator prints the perpendicular slope for every line you enter.
What slope is a roof pitch like 6 in 12?
A pitch of 6 in 12 means the roof rises 6 inches for every 12 inches across, so the slope is 6/12 = 0.5. That is a 50% grade and 26.57 degrees. Divide the first number by 12 for any pitch: 4 in 12 is 0.333, or 18.43 degrees, and 2 in 12, the lowest pitch the 2021 IRC allows for asphalt shingles, is 0.167, or 9.46 degrees.