Slope Calculator
Compute the slope between two points and see the rise over run value. Great for coordinate geometry, line graphs, and homework checks.
Enter the Details
Enter coordinates of two points:
Result will appear here...
What this calculator does
So, you have two points on a line and you want to know how steep the line is. This tool takes the coordinates of both points and gives you the slope, a single number that says how much the line rises or falls for each step across.
You enter four values, the x and y of the first point and the x and y of the second, and it returns the slope rounded to two decimal places.
How to use it
- Enter x1 and y1, the coordinates of the first point.
- Enter x2 and y2, the coordinates of the second point.
- Press Calculate.
The two points need different x-values. If both x-values are the same, the line is vertical, and vertical lines do not have a slope, which the tool will tell you rather than return a wrong answer.
What slope actually means
Slope is rise over run. The rise is how far the line goes up or down between the two points, the change in y. The run is how far it goes across, the change in x. Divide the rise by the run and you have the slope: the amount the line climbs for every one unit you move to the right.
A slope of 2 means that every step right takes you two steps up. A slope of one half means two steps right for one step up, a gentler climb. It is the same idea as the grade of a road or the pitch of a roof, just written as a single number.
The two-point formula
From two points the slope, usually written m, is
m = (y2 - y1) / (x2 - x1)
Subtract the y-values for the rise, subtract the x-values for the run in the same order, and divide. The order does not matter as long as you keep it consistent between top and bottom: doing point two minus point one on both gives the same answer as point one minus point two on both.
A worked example, step by step
Take the points (1, 2) and (4, 8).
- Rise: y2 - y1 = 8 - 2 = 6.
- Run: x2 - x1 = 4 - 1 = 3.
- Slope: 6 / 3 = 2.
So the line climbs 2 units for every 1 unit across. The tool shows this as 2.00.
Reading the sign and the steepness
The slope carries two pieces of information at once, its sign and its size. The sign tells you direction: a positive slope climbs as you move right, a negative slope falls, and a slope of zero is a flat, level line. The size tells you steepness: the further the number is from zero, either way, the steeper the line. A slope of 5 is steep, a slope of 0.1 is nearly flat, and a slope of -5 is just as steep as 5 but heading downhill instead of up.
Why a vertical line has no slope
A vertical line is the one case slope cannot describe. On a vertical line the two points share the same x-value, so the run, the change in x, is zero. Slope is rise over run, and dividing by zero has no meaning, so the slope is undefined rather than simply very large. That is why the tool stops and says so when you give it two points with matching x-values: there is no number that honestly fits.
Questions people ask
What does the slope number tell me?
How much the line rises or falls for each unit you move to the right. A slope of 3 climbs three units per step across; a slope of -3 drops three.
Does the order of the points matter?
No, as long as you are consistent. Use the same point first on both the top and the bottom of the fraction, and you get the same slope either way.
What does a slope of zero mean?
A flat, horizontal line. The rise is zero, so there is no climb, and the line stays at the same height.
Why is a vertical line undefined?
Because its run is zero, and slope divides by the run. Dividing by zero is undefined, so a vertical line has no slope.
What does a negative slope mean?
The line falls as you move to the right. The steepness is set by the size of the number, and the minus sign just points it downhill.
References
On slope and the line. Slope is the rise over the run between two points, and it is the m that fixes the steepness of a line in the coordinate plane.
- Christopher Stover and Eric W. Weisstein, "Line," from MathWorld, a Wolfram resource, on the line and its slope in the Cartesian plane.
- Eric W. Weisstein, "Slope-Intercept Form," from MathWorld, a Wolfram resource, on y = mx + b, where m is the slope.
Okan Atalay is a results driven senior operations manager and a graduate of Industrial Engineering from Bilkent University. With over 22 years of experience in textile manufacturing and integrated operations, he has led large scale business process improvements and strategic planning initiatives. Currently, he serves as a top mathematics expert for a global ed tech platform, where he applies his analytical expertise to solve complex mathematical problems. At Eon Tools, he reviews converter and maths tools.
Other Tools
- Average Rate Of Change Calculator
- Cross Product Calculator
- Distance Calculator
- Dot Product Calculator
- End Point Calculator
- Equation Of A Line Calculator
- Gradient Calculator
- Linear Interpolation Calculator
- Midpoint Calculator
- Parabola Calculator
- Perpendicular Line Calculator
- Point Slope Form Calculator
- Slope Intercept Form Calculator
- Unit Vector Calculator
- Vector Calculator
- Vector Magnitude Calculator
- Vertex Form Calculator
- X And Y Intercept Calculator