Slope Calculator — Line Equation, Distance & Midpoint

Calculate slope, y-intercept, line equation (y=mx+b), distance between two points, and midpoint from coordinates (x1,y1) and (x2,y2).

,
,
Examples:
Slope (m)
Line Equation
Y-Intercept (b)
X-Intercept
Distance
Midpoint
Parallel Slope
Perpendicular Slope

Calculation Steps

Frequently Asked Questions

What is slope?
Slope (m) measures the steepness and direction of a line. It is calculated as the "rise over run": m = (y₂ - y₁) / (x₂ - x₁). A positive slope means the line rises left to right; negative means it falls; zero means horizontal; undefined means vertical.
What is the slope-intercept form?
The slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis). Given two points, you can find m, then solve for b using one of the points.
How do I find the midpoint between two points?
The midpoint formula: M = ((x₁+x₂)/2, (y₁+y₂)/2). It gives the point exactly halfway between two points on the coordinate plane.
How do I calculate the distance between two points?
Using the Pythagorean theorem: d = √((x₂-x₁)² + (y₂-y₁)²). This is called the Euclidean distance.
What are parallel and perpendicular slopes?
Parallel lines have the same slope. Perpendicular lines have slopes that are negative reciprocals: if one line has slope m, the perpendicular slope is -1/m. For example, slopes 2 and -1/2 are perpendicular.