Slope Calculator
Find slope (m) between two points
What is it?
Slope measures the steepness and direction of a line between two points on a graph. This calculator finds the slope and the equation of the line passing through your two points.
Formula
m = (y₂ − y₁) / (x₂ − x₁)
Formula Explanation
Slope is the ratio of vertical change ("rise") to horizontal change ("run") between two points — dividing the difference in y-values by the difference in x-values gives a single number describing how steeply the line rises or falls.
Example Calculation
Between (1, 2) and (3, 6): m = (6−2) / (3−1) = 2.
How to Use
- Enter the coordinates of the first point (x₁, y₁).
- Enter the coordinates of the second point (x₂, y₂).
- Click Calculate Slope to see the slope and line equation.
Benefits
- Computes both the slope and the full line equation (y = mx + c) in one step.
- Correctly flags vertical lines as undefined slope instead of erroring silently.
- Works with negative and decimal coordinates.
Use Cases
- Graphing lines in algebra or coordinate geometry homework.
- Calculating grade/steepness in road design or construction.
- Analyzing rate of change between two data points, like speed or growth rate.
What Your Result Means
A positive slope means the line rises left to right; a negative slope means it falls. A slope of 0 is a horizontal line, and an undefined slope means the line is vertical. The equation shown lets you find y for any x on that line.
Tips
- A steeper line has a slope further from zero (positive or negative).
- Parallel lines always have the same slope.
- Perpendicular lines have slopes that are negative reciprocals of each other.
Common Mistakes
- Subtracting coordinates in the wrong order (must be consistent: y₂−y₁ over x₂−x₁, not mixed).
- Assuming every pair of points has a defined slope — vertical lines (same x-coordinate) do not.
- Confusing slope (rate of change) with the y-intercept (where the line crosses the y-axis).
FAQs
What does a negative slope mean?
A negative slope means the line goes downward from left to right; a positive slope means it goes upward.
What does "undefined slope" mean?
When both points share the same x-coordinate, the line is vertical, and its slope is undefined since the denominator (x₂ − x₁) would be zero.
What does a slope of 0 mean?
A slope of 0 means the line is perfectly horizontal — the y-value stays the same regardless of x.
How do I find the equation of the line?
Once you know the slope (m), substitute one point into y = mx + c and solve for c (the y-intercept) — this calculator does that step for you automatically.
What is the slope of two perpendicular lines?
Perpendicular lines have slopes that multiply to -1 — for example, a line with slope 2 is perpendicular to a line with slope -1/2.
Results are rounded to 4 decimal places.
Last updated: July 25, 2026