Positive slope
Rise and run have the same sign. The line rises from left to right.
A clearer way to calculate
Two points. One slope. All the steps.
Calculate rise over run between two coordinate points. Free, with no sign-up.
Use the same coordinate system for both points. Use a decimal point (1.5). Negative numbers and 1e6 work; fractions like 1/3 and commas do not.
Enter your coordinates to see the slope and understand what it tells you.
The answer is just the beginning.Slope measures the change in y for each unit change in x along a straight line. It is the ratio of vertical change, called rise, to horizontal change, called run.
For example, a slope of 2 means y increases by 2 whenever x increases by 1. A slope of −0.5 means y decreases by 0.5 for each one-unit increase in x. The interpretation depends on the units of both axes.
You can use negative coordinates, decimals, and scientific notation. Swap points reverses both differences together and leaves a numerical slope unchanged.
Subtract the y-coordinates in the same point order as the x-coordinates. The formula gives a numerical result only when x₂ − x₁ is nonzero.
Between two points on a curve, this is the slope of the connecting secant line. It is not automatically the instantaneous slope of the curve at either point.
The exact slope is 2. For repeating or long decimals, the calculator shows an approximation to 12 significant figures and retains the exact fraction.
Rise and run have the same sign. The line rises from left to right.
Rise and run have opposite signs. The line falls from left to right.
Rise is zero and run is nonzero. The line is horizontal.
Run is zero and rise is nonzero. The line is vertical; its slope is not infinity.
| Points | Calculation | Result |
|---|---|---|
| (−3, −2), (1, 6) | (6 − (−2)) / (1 − (−3)) = 8/4 | 2, positive |
| (−2, 7), (4, −5) | (−5 − 7) / (4 − (−2)) = −12/6 | −2, negative |
| (1, 4), (8, 4) | (4 − 4) / (8 − 1) = 0/7 | 0, horizontal |
| (3, −1), (3, 5) | Run = 3 − 3 = 0; rise = 6 | Undefined, vertical |
| (0.5, 1.2), (2.5, 2.2) | (2.2 − 1.2) / (2.5 − 0.5) = 1/2 | 0.5, positive |
| (2, 3), (2, 3) | Rise = 0; run = 0 | Indeterminate |
Between (2 hours, 10 km) and (5 hours, 25 km), slope = (25 − 10)/(5 − 2) = 5 km per hour. This is the average rate over that interval; it does not establish a constant speed at every moment.
A rise of 0.6 m over a horizontal run of 8 m gives m = 0.6/8 = 0.075. Multiplying by 100 gives a 7.5% grade. Grade is not an angle in degrees, and this arithmetic is not a safety or building-code assessment.
Two price observations, (3 items, 17 units) and (7 items, 29 units), have slope (29 − 17)/(7 − 3) = 3 currency units per item. This describes the line through those observations; it does not prove that other quantities have the same pricing.
No, provided you reverse both x and y differences. Both signs change, leaving their ratio unchanged.
Its x-coordinates are equal, so the horizontal change is zero. Division by zero is undefined. The equation of the vertical line is x equal to its fixed x-coordinate.
For a straight line in a two-dimensional coordinate plane, gradient commonly means slope. In other contexts, such as multivariable calculus, gradient has a different meaning.
Yes. Its units are y-axis units divided by x-axis units, such as metres per second. If both axes measure the same unit, the ratio is dimensionless.
See the exact arithmetic and rounding method for implementation details.