Slope of a Line Calculator
Enter the coordinates of two points on a line to find its slope and where it crosses the y-axis.
Slope of a Line Calculator
Finds the slope and y-intercept of the line through two given points.
Given two points, this calculator finds the slope using the rise-over-run formula m = (y₂-y₁)/(x₂-x₁), then uses the slope-point form to find where the line crosses the y-axis. Together, slope and y-intercept fully describe the line in the familiar y = mx + b form. It's useful for algebra and coordinate-geometry homework, plotting trend lines from two data points, or checking the steepness of a ramp, road grade, or graph by hand.
Example
- With the default values shown above, this calculator returns: Slope (m) ≈ 2; y-Intercept (b) ≈ 0.
Frequently Asked Questions
What does the slope value mean?
The slope is the change in y divided by the change in x (rise over run) — a larger positive slope means a steeper upward line, negative means it slopes downward, and zero means it's flat.
What happens if both points share the same x-coordinate?
That describes a vertical line, whose slope is technically undefined; the calculator uses a very small denominator in that case to avoid an error, so the reported value will be extremely large rather than a true 'undefined' result.
Sources
- Standard formula, publicly documented method
