How to use the Slope Calculator
- Enter the x and y coordinates of the first point, (x₁, y₁).
- Enter the x and y coordinates of the second point, (x₂, y₂).
- Read the slope, line direction and substituted rise-over-run calculation. A vertical line has an undefined slope.
Slope formula: rise over run
Where:
- = two points on the line
- = slope: vertical change divided by horizontal change
Show as plain text
m = (y₂ − y₁) ÷ (x₂ − x₁)
Subtract the first y-coordinate from the second to find the rise, then divide by the change in x, called the run. The order of subtraction must match in both the numerator and denominator.
A positive slope rises from left to right, a negative slope falls, and zero is horizontal. When the run is zero, the line is vertical and the slope is undefined; identical points do not determine a unique line.
Assumptions and limitations
- Coordinates must be finite decimal numbers from −1,000,000,000,000 through 1,000,000,000,000.
- A line graph is not shown because the site's generic chart scales points at equally spaced x-positions; that would misrepresent arbitrary coordinate spacing.
Example: Find the slope between (1, 2) and (3, 6)
- Rise: y₂ − y₁ = 6 − 2 = 4.
- Run: x₂ − x₁ = 3 − 1 = 2.
- Slope: m = 4 ÷ 2 = 2, a positive slope that rises from left to right.
When to use the Slope Calculator
- Checking a line's gradient in algebra or coordinate geometry.
- Comparing rise and horizontal run when interpreting a ramp or a plotted trend.
- Using the quadratic formula calculator alongside straight-line calculations in an algebra exercise.
Slope Calculator FAQs
What does a negative slope mean?
A negative slope means y decreases as x increases, so the line falls from left to right. The sign follows from the rise and run after using the same point order for both.
Can a vertical line have a slope of zero?
No. A vertical line has zero run, which would require division by zero, so its slope is undefined. A zero slope belongs to a horizontal line.
What if both coordinate points are identical?
There is no unique line through one point: infinitely many lines can pass through it. The calculator reports an undefined slope instead of inventing a zero value.
How this calculator was built and tested is explained in our methodology. Spotted a problem? Let us know.