Slope & Distance Calculator
Enter two points to get the slope, the equation of the line, the distance and midpoint between them, with a graph.
Steps
How to use the Slope Calculator
- Enter two pointsType the x and y coordinates of both points. Whole numbers, decimals and fractions like 1/2 all work.
- Read the lineSee the slope as a fraction and decimal, the equation in y = mx + b and standard form, and a graph.
- Check the extrasThe distance between the points, the midpoint and the angle of the line are shown too, with each step explained.
Example
For (1, 2) and (5, 8): slope = 6 ÷ 4 = 3/2, so the line is y = 3/2x + 1/2, or 3x − 2y = −1 in standard form.
The distance is √52 = 2√13 ≈ 7.211103, the midpoint is (3, 5), and the line rises at 56.31°.
Frequently asked questions
What is the slope formula?
Slope m = (y₂ − y₁) ÷ (x₂ − x₁): the rise divided by the run. A positive slope rises to the right, a negative one falls, 0 is flat, and a vertical line has no defined slope.
How do you find the y-intercept?
Put one point and the slope into y = mx + b and solve for b: b = y₁ − m·x₁. For (1, 2) with m = 3/2, b = 2 − 3/2 = 1/2.
How is the distance between two points found?
With the Pythagorean theorem: distance = √((x₂ − x₁)² + (y₂ − y₁)²). The horizontal and vertical changes are the two short sides of a right triangle.