Slope Calculator
Calculate slope, distance, midpoint, angle, and line equation from two points.
Enter two points
Point 1 (x1, y1)
Point 2 (x2, y2)
Slope (m)
2
Line equation
y = 2x
Distance
6.7082
Midpoint
(2.5, 5)
Angle
63.4349°
Frequently Asked Questions about the Slope Calculator
What is slope?
Slope (m) measures the steepness of a line. It is the ratio of vertical change to horizontal change between two points, often called rise over run.
How do you calculate slope from two points?
Use m = (y2 - y1) / (x2 - x1). Subtract the y-values for the rise, divide by the difference of the x-values for the run.
What is the difference between positive and negative slope?
A positive slope rises from left to right (the line goes up). A negative slope falls from left to right (the line goes down). A slope of 0 is a horizontal line.
Why is the slope of a vertical line undefined?
A vertical line has the same x-value at both points, so x2 - x1 = 0. Division by zero is undefined, so vertical lines have no defined slope.
What is slope-intercept form?
y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis). This calculator computes b as b = y1 - m times x1.