Slope Calculator
Find the slope between two points, with the line equation, distance, and angle.
Runs in your browser — nothing is sent or saved.
How to use the slope calculator
- Enter the coordinates of the first point.
- Enter the coordinates of the second point.
- Read the slope, y-intercept, and line equation.
- See the distance and angle too.
What slope means
The slope of a line measures how steep it is: how much y changes for each step in x. It is rise over run, the change in y divided by the change in x, and the gradient of a line is the same thing. A positive slope rises to the right, a negative slope falls, a slope of 0 is flat, and a vertical line has an undefined slope because the run is zero. This slope calculator finds it between any two points and shows the exact fraction when the coordinates are whole numbers.
The slope formula and the line
The slope between two points is m equals y2 minus y1, divided by x2 minus x1. Once you have the slope, the line's equation in slope-intercept form is y equals mx plus b, where b is the y-intercept, the value of y where the line crosses the vertical axis. The tool computes both, so you get the full equation, not just the slope.
Distance and angle
Two points also define a segment, so the tool adds the distance between them, found with the Pythagorean theorem on the horizontal and vertical gaps, and the angle the line makes with the horizontal. These are handy in geometry and in any setting where a gradient matters, like a ramp or a road.
A worked example
Take the points (1, 2) and (4, 8). The rise is 8 minus 2, which is 6. The run is 4 minus 1, which is 3. So the slope is 6 over 3, which simplifies to 2. The y-intercept is 0, so the line is y equals 2x.
FAQ
How do I find the slope between two points?
Subtract the y-values and divide by the difference of the x-values: m equals (y2 minus y1) over (x2 minus x1). The tool shows this as an exact fraction and a decimal.
What is rise over run?
Rise over run is another name for slope: the vertical change (rise) divided by the horizontal change (run) between two points on the line.
Why is a vertical line's slope undefined?
Because the run, the change in x, is zero, and dividing by zero is undefined. The tool flags this and reports the line as x equals a constant.
How do I get the line equation?
Use slope-intercept form, y equals mx plus b. The tool finds the slope m and the y-intercept b and writes out the equation.
Is my information private?
Yes. Everything is calculated in your browser and nothing you enter is uploaded or saved.