All math tools
Free online tool

Slope Calculator

Find slope, line equation, midpoint, and distance from two points.

No sign-up · mobile friendly
Enter the coordinates of two points

Slope

1

m=y2−y1x2−x1=33=33=1≈1m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{3}{3} = \frac{3}{3} = 1 \approx 1

Rise = 3, run = 3.

Line equation

y=1x+1y = 1x + 1

Midpoint

(2.5, 3.5)\left(2.5,\ 3.5\right)

Distance

4.24264.2426

Distance formula: d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} · Midpoint: (x1+x22, y1+y22)\left(\frac{x_1 + x_2}{2},\ \frac{y_1 + y_2}{2}\right)

Try an example:

Instant results

No waiting, no page reload.

Shows the steps

Learn the method, not just the answer.

Free forever

No account or payment required.

About the Slope Calculator

Enter two points and get the slope with rise-over-run working, the equation of the line in slope-intercept form, the midpoint, and the distance between the points.

Frequently asked questions

What is the slope formula for two points?+

Slope is rise over run: m = (y₂ − y₁) ÷ (x₂ − x₁). Subtract the y-values, then divide by the difference in x-values.

What does a vertical line have an undefined slope?+

A vertical line has x₁ = x₂, so the run is zero. Division by zero is undefined, so the slope is undefined.

How do I write the equation of the line?+

Use y = mx + b. After finding m, substitute one point to solve for b, the y-intercept.

More math tools