Slope Calculator
Enter two coordinates to get the slope, the equation of the line through them, the distance and the angle.
Enter your values
Result
How to use the Slope Calculator
- 1Enter x₁ in the form on the left.
- 2Fill in the remaining fields — the result updates automatically as you type.
- 3Review the highlighted result and the supporting breakdown on the right.
- 4Use Copy, Share or Print to save or send your result.
The slope formula
Slope measures steepness as the change in y divided by the change in x: m = (y₂ − y₁) / (x₂ − x₁), often remembered as rise over run. A slope of 2 means the line climbs two units for every one unit it travels right.
The sign tells you direction. A positive slope rises left to right, a negative slope falls, and a slope of zero is a flat horizontal line. A vertical line has an undefined slope, because the run is zero and you cannot divide by zero.
From two points to an equation
Once you have the slope, the line's equation follows. Slope-intercept form is y = mx + b, where b is the y-intercept — the value of y when x is zero. Substituting either known point into the equation and solving for b gives the full line.
The same two points also give you the distance between them, via the Pythagorean theorem applied to the horizontal and vertical gaps, and the angle of the line, via the arctangent of the slope.
Frequently Asked Questions
▸What does a slope of 0 mean?
The line is horizontal. The y value never changes as x increases, so the rise is zero.
▸Why is the slope of a vertical line undefined?
Because the run — the change in x — is zero, and the formula requires dividing by it. Division by zero has no defined result, so vertical lines are described by x = a constant instead.
▸How do I find the slope of parallel and perpendicular lines?
Parallel lines share the same slope. Perpendicular lines have slopes that are negative reciprocals: if one is 2, the other is −1/2, since the two multiply to −1.