Browser-onlyLiveMath Calculators
Slope Calculator
Compute slope of a line from two points.
Privacy note. Runs in your browser. The point coordinates you enter never leave this page.
Slope (m)2
Y-intercept (b)0
Equationy = 2x
Distance between points6.708204
Recommended next steps
Related tools
Frequently asked questions
Slope m = (y2 − y1) / (x2 − x1). Y-intercept b = y1 − m × x1. Distance between points = sqrt((x2 − x1)^2 + (y2 − y1)^2). The line equation is y = mx + b.
The line is vertical, and the slope is undefined (division by zero). The calculator shows "undefined" and outputs the equation as x = x1 instead of y = mx + b.
When the y-intercept is zero, the calculator shows y = mx without the "+ 0" for readability. Negative intercepts are written with a minus sign (e.g. y = 3x − 4).
Last updated 2026-06-03.