Use the free Slope Calculator below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.
Slope Is Rise Over Run
Slope measures how steep a line is. Walk 10 metres forward and climb 3 metres, and the slope is 3/10, or 0.3. In coordinate form, for two points (x1, y1) and (x2, y2), the slope is m = (y2 − y1)/(x2 − x1): the change in height divided by the change in horizontal distance. The same number appears under three names: as a plain ratio, as an angle in degrees, and as a grade percentage. This tool gives you all three from the same two points.
The sign of the slope tells the direction. A positive slope climbs as you move right; a negative slope falls. A slope of zero means a flat, horizontal line. And a vertical line has no slope at all, because the run is zero and division by zero is undefined. That is not a failure of the mathematics; it is the mathematics telling you that “steepness” has hit its limit.
Angle and Grade, From the Same Number
The angle of a line is the arctangent of its slope: angle = arctan(m), converted to degrees. A slope of 1 gives 45 degrees, the diagonal of a square. A slope of 0.1 gives about 5.71 degrees, a gentle ramp. The grade percentage is simpler: grade = m × 100. A slope of 0.08 is an 8 percent grade, the kind of number road signs show. Note that grade is not the angle: a 100 percent grade is a 45-degree slope, not a vertical wall.
Road signs, roof pitches and wheelchair ramps all use these conversions. A roof described as a 6-in-12 pitch rises 6 for every 12 of run, a slope of 0.5, an angle of about 26.57 degrees and a grade of 50 percent. One line, four descriptions, and this tool moves between them without you reaching for tables.
How to Use This Calculator
Enter two points and press Calculate slope. The tool prints the rise and the run, the slope m, the angle in degrees, the grade as a percentage, and the equation of the line in the form y = mx + b. The intercept b is where the line crosses the vertical axis, found from b = y1 − m × x1.
If the two points share the same x value, the line is vertical. The tool says the slope is undefined, gives the angle as 90 degrees, and gives the line as x = that value. If the two points are identical, there is no line at all, and the tool says so. Both guards stop a confusing error message from a division that cannot be done.
A Worked Example: The Ramp
A ramp starts at ground level at x = 0 and reaches a door 1.2 metres high at a horizontal distance of 12 metres. The points are (0, 0) and (12, 1.2). The rise is 1.2, the run is 12, the slope is 0.1, the angle is about 5.71 degrees and the grade is 10 percent. Many accessibility rules cap ramp grades near 8.33 percent, so this ramp at 10 percent would be slightly too steep, and the numbers tell you exactly how much to lengthen it: for an 8.33 percent grade at 1.2 metres of rise, the run must be 1.2/0.0833 ≈ 14.4 metres.
That is the practical value of having all three forms at once. The slope is what the algebra wants, the angle is what a protractor measures, and the grade is what the regulation quotes. One calculation serves all three readers.
Common Mistakes
The most common mistake is swapping rise and run: dividing the horizontal change by the vertical change gives the reciprocal of the slope, a number that is wrong and often wildly so. Always subtract in the same order for both: y2 minus y1 on top, x2 minus x1 underneath. The second mistake is reading a grade percentage as an angle: a 30 percent grade is about 16.7 degrees, not 30 degrees.
A third mistake is forgetting the sign. A line falling to the right has a negative slope, and dropping the minus sign turns a descent into a climb. If your answer disagrees with your sketch, check the sign first.
Try It Yourself
Start with points (1, 2) and (5, 8): slope 1.5, angle about 56.31 degrees, grade 150 percent, line y = 1.5x + 0.5. Then try (0, 0) and (4, 0) for a flat line, and (2, 3) and (2, 9) for a vertical line. Those three cases cover climbing, flat and vertical. Use the tool as often as you like; every calculation runs in your browser, and nothing you type is sent anywhere.
