Find the slope of a line in seconds.
Enter two points and get the slope, the y-intercept, the full line equation, the distance and the angle of incline, updated live as you type.
Your two points
What this means
Points along the line
| x | y |
|---|
How slope works
How to Calculate Slope
Slope measures the steepness and direction of a line. The formula is m = (y₂ - y₁) / (x₂ - x₁), or "rise over run." A positive slope goes upward left to right, a negative slope goes downward, zero slope is horizontal, and undefined slope is vertical.
Slope-Intercept Form
The slope-intercept form of a line 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, first calculate the slope, then substitute one point into y = mx + b to solve for b.
Point-Slope Form
The point-slope form is y - y₁ = m(x - x₁), useful when you know the slope and one point. It can be converted to slope-intercept form by distributing m and adding y₁ to both sides. Both forms describe the same line.
Parallel and Perpendicular Lines
Parallel lines have equal slopes (m₁ = m₂). Perpendicular lines have negative reciprocal slopes (m₁ × m₂ = -1). For example, a line with slope 2 is perpendicular to a line with slope -1/2. These relationships are fundamental in geometry and coordinate proofs.
Common questions
What does an undefined slope mean?
An undefined slope means the line is vertical (x₁ = x₂). Division by zero occurs in the slope formula because Δx = 0. Vertical lines are written as x = constant.
What is the slope of a horizontal line?
A horizontal line has a slope of 0. There is no rise (Δy = 0), so m = 0/Δx = 0. Horizontal lines are written as y = constant.
How do I find the distance between two points?
The distance formula is d = √((x₂-x₁)² + (y₂-y₁)²), which is derived from the Pythagorean theorem. This calculator computes the distance automatically.
What is the midpoint between two points?
The midpoint is ((x₁+x₂)/2, (y₁+y₂)/2), the average of the x-coordinates and the average of the y-coordinates.
Results are computed from the two points you enter. A vertical line (x₁ = x₂) has an undefined slope.