Slope Calculator
The slope of a line through two points describes how steep it is — the change in y divided by the change in x — and is undefined for a perfectly vertical line. Toolverge computes slope alongside two natural companions: the straight-line distance between the points (via the Pythagorean theorem) and their midpoint, then assembles the full line equation y = mx + b.
How it works
- Enter the coordinates of two points.
- Slope, distance, and midpoint are computed from the same two points.
- The line equation y = mx + b is derived from the slope and one point.
Formula m = (y2−y1)/(x2−x1); distance = √((x2−x1)²+(y2−y1)²); midpoint = ((x1+x2)/2, (y1+y2)/2)
Frequently asked questions
How do I find the slope between two points?
Subtract the y-coordinates and divide by the difference of the x-coordinates: m = (y2−y1)/(x2−x1).
What does an undefined slope mean?
It means the line is vertical (the two points share the same x-coordinate), so the formula divides by zero.
How is distance between two points calculated?
Using the Pythagorean theorem: the square root of the sum of the squared differences in x and y.
What is a midpoint?
The point exactly halfway between two points, found by averaging their x-coordinates and averaging their y-coordinates.
How do I get the line equation from two points?
Compute the slope, then solve y = mx + b for b using either point; a vertical line is written as x = constant instead.