Slope Calculator
Find the slope, distance, angle and line equation through any two points in a 2D coordinate system.
How to use the Slope Calculator
- Enter your inputs into the Slope Calculator above.
- Results update instantly as you type — no submit button needed.
- Adjust any value to see how the result changes in real time.
The line formulas
Slope: m = (y₂ − y₁)/(x₂ − x₁) · · · Distance: d = √((x₂ − x₁)² + (y₂ − y₁)²) · · · Line: y − y₁ = m(x − x₁)
Slope is rise over run. Distance is the Pythagorean hypotenuse of the differences. The line equation can be written in point-slope, slope-intercept (y = mx + b) or standard (Ax + By = C) forms.
Worked example
Points (1, 2) and (5, 10): slope = (10−2)/(5−1) = 8/4 = 2. Distance = √((4)² + (8)²) = √80 ≈ 8.94. Line: y = 2x + 0 (y-intercept = 0; passes through origin extension).
Frequently asked questions
What does negative slope mean?
The line goes downward from left to right. A slope of −2 means y decreases by 2 for every 1 unit x increases.
What is the slope of a vertical line?
Undefined — the denominator (x₂ − x₁) is zero. Vertical lines are typically written as x = constant rather than in slope-intercept form.
How do I find a perpendicular line?
A line perpendicular to slope m has slope −1/m. So a line perpendicular to y = 2x + 3 has slope −1/2.