Slope Calculator

Find slope, rise, run, angle and the line equation through two points.

Your numbers

Live

Instant result. Updates while you type.

Your result

Updated now
—

Enter your numbers.

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.

Editorial checkSlope, intercept, point-slope and vertical-line cases checked against OpenStax linear-function definitions.Updated September 10, 2026Read the publication standard

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.

Field-by-field reference for Slope Calculator.
InputStarting exampleAccepted valueHow it is used
x₁-3Any finite number supported by the formulaSupplies the x₁ quantity used by the published equation or result breakdown.
y₁-4Any finite number supported by the formulaSupplies the y₁ quantity used by the published equation or result breakdown.
x₂3Any finite number supported by the formulaSupplies the x₂ quantity used by the published equation or result breakdown.
y₂0Any finite number supported by the formulaSupplies the y₂ quantity used by the published equation or result breakdown.
Slope compares vertical change with horizontal changeRise is y₂−y₁ and run is x₂−x₁. Reversing both points changes both signs and preserves their ratio.1Point 12Rise / run3Point 2
Slope compares vertical change with horizontal changeRise is y₂−y₁ and run is x₂−x₁. Reversing both points changes both signs and preserves their ratio.

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+b

Worked 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

Direction assumes x increases from left to right.
SlopeLine direction
m>0Rises
m<0Falls
m=0Horizontal
UndefinedVertical

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.

Sources and references

Manage privacy choices