Slope calculator with two points, angle and line equation
Enter two distinct points. HitEquals reports rise, run, slope, direction angle, intercept and both point-slope and slope-intercept equations when defined.
Inputs used by this calculator
Slope Calculator uses the fields below. The starting values reproduce the page example; replace them with values from the same units and time period before using the result.
| Input | Starting example | Accepted value | How it is used |
|---|---|---|---|
| x₁ | -3 | Any finite number supported by the formula | Supplies the x₁ quantity used by the published equation or result breakdown. |
| y₁ | -4 | Any finite number supported by the formula | Supplies the y₁ quantity used by the published equation or result breakdown. |
| x₂ | 3 | Any finite number supported by the formula | Supplies the x₂ quantity used by the published equation or result breakdown. |
| y₂ | 0 | Any finite number supported by the formula | Supplies the y₂ quantity used by the published equation or result breakdown. |
How to find slope
Subtract coordinates in the same order and divide the y difference by the x difference.
m=(y₂−y₁)/(x₂−x₁)Positive, negative and zero slope
A positive slope rises left to right, a negative slope falls, and zero slope is horizontal.
Vertical lines
If the run is zero, division by zero is impossible. The slope is undefined and the equation is x equal to the shared x-coordinate.
Line equations
Point-slope form works directly from a point and slope. Solving for y gives slope-intercept form when the line is not vertical.
y−y₁=m(x−x₁)y=mx+bWorked two-point example
From (−3,−4) to (3,0), rise is 4 and run is 6, so m=4/6=2/3.
Angle interpretation
atan2(rise,run) preserves quadrant and returns a directed angle. A line direction may also be described by an equivalent angle 180 degrees away.
Slope classifications
| Slope | Line direction |
|---|---|
| m>0 | Rises |
| m<0 | Falls |
| m=0 | Horizontal |
| Undefined | Vertical |
Frequently asked questions
What is rise over run?
It is (y₂−y₁)/(x₂−x₁).
Why is vertical slope undefined?
Its run is zero, so the ratio divides by zero.
Does point order change slope?
No. Reversing points changes both difference signs.
What is the y-intercept?
It is b=y₁−mx₁ for a nonvertical line.
Can slope be zero?
Yes. A horizontal line has zero slope.
Is slope the same as angle?
No. They are related by m=tan(angle) for nonvertical lines.
What to keep in mind
When x₁=x₂, the line is vertical, slope is undefined and the equation is x=x₁. Angle is reported from the positive x-axis.
Results are rounded for display in US format, with money in dollars and cents; CSV exports keep full calculation precision. This is a calculation summary, not an official certificate.