A clearer way to calculate

Slope Calculator

Two points. One slope. All the steps.

Calculate rise over run between two coordinate points. Free, with no sign-up.

Working with ratios?Proportion Calculator

Enter your two points

rise / run

Use the same coordinate system for both points. Use a decimal point (1.5). Negative numbers and 1e6 work; fractions like 1/3 and commas do not.

Point 1

Point 2

Try an example
Your result

Let’s work it out.

Enter your coordinates to see the slope and understand what it tells you.

The answer is just the beginning.

Calculation stays in your browser Exact fractions, clear rounding How we calculate
01 / THE SLOPE GUIDE

What is slope?

Slope measures the change in y for each unit change in x along a straight line. It is the ratio of vertical change, called rise, to horizontal change, called run.

For example, a slope of 2 means y increases by 2 whenever x increases by 1. A slope of −0.5 means y decreases by 0.5 for each one-unit increase in x. The interpretation depends on the units of both axes.

02 / THE SLOPE GUIDE

How to use the slope calculator

  1. Enter point 1. Put its horizontal coordinate in x₁ and vertical coordinate in y₁.
  2. Enter point 2. Fill in x₂ and y₂ using the same coordinate system and units.
  3. Calculate. Read the slope, rise, run, and the subtraction and division steps.
  4. Check the line type. Vertical lines have undefined slope; identical points do not determine a unique line.

You can use negative coordinates, decimals, and scientific notation. Swap points reverses both differences together and leaves a numerical slope unchanged.

03 / THE SLOPE GUIDE

Slope formula

m = (y₂ − y₁) / (x₂ − x₁) slope = rise / run

Subtract the y-coordinates in the same point order as the x-coordinates. The formula gives a numerical result only when x₂ − x₁ is nonzero.

Between two points on a curve, this is the slope of the connecting secant line. It is not automatically the instantaneous slope of the curve at either point.

04 / THE SLOPE GUIDE

Step by step: from (2, 3) to (6, 11)

  1. Find the rise. y₂ − y₁ = 11 − 3 = 8.
  2. Find the run. x₂ − x₁ = 6 − 2 = 4.
  3. Divide. m = 8/4 = 2.
  4. Interpret. The line rises 2 vertical units for every 1 horizontal unit to the right.

The exact slope is 2. For repeating or long decimals, the calculator shows an approximation to 12 significant figures and retains the exact fraction.

05 / THE SLOPE GUIDE

Positive, negative, zero, or undefined?

Positive slope

Rise and run have the same sign. The line rises from left to right.

Negative slope

Rise and run have opposite signs. The line falls from left to right.

Zero slope

Rise is zero and run is nonzero. The line is horizontal.

Undefined slope

Run is zero and rise is nonzero. The line is vertical; its slope is not infinity.

Identical points are a different case. If both rise and run are zero, only one distinct point has been supplied. Infinitely many lines can pass through it, so there is no unique slope.
06 / THE SLOPE GUIDE

Worked slope examples

Slope between two specified points
Points Calculation Result
(−3, −2), (1, 6) (6 − (−2)) / (1 − (−3)) = 8/4 2, positive
(−2, 7), (4, −5) (−5 − 7) / (4 − (−2)) = −12/6 −2, negative
(1, 4), (8, 4) (4 − 4) / (8 − 1) = 0/7 0, horizontal
(3, −1), (3, 5) Run = 3 − 3 = 0; rise = 6 Undefined, vertical
(0.5, 1.2), (2.5, 2.2) (2.2 − 1.2) / (2.5 − 0.5) = 1/2 0.5, positive
(2, 3), (2, 3) Rise = 0; run = 0 Indeterminate
07 / THE SLOPE GUIDE

What can slope tell you?

A rate on a distance-time graph

Between (2 hours, 10 km) and (5 hours, 25 km), slope = (25 − 10)/(5 − 2) = 5 km per hour. This is the average rate over that interval; it does not establish a constant speed at every moment.

A gradient from measurements

A rise of 0.6 m over a horizontal run of 8 m gives m = 0.6/8 = 0.075. Multiplying by 100 gives a 7.5% grade. Grade is not an angle in degrees, and this arithmetic is not a safety or building-code assessment.

A change in cost

Two price observations, (3 items, 17 units) and (7 items, 29 units), have slope (29 − 17)/(7 − 3) = 3 currency units per item. This describes the line through those observations; it does not prove that other quantities have the same pricing.

08 / THE SLOPE GUIDE

Common slope mistakes

  • Subtracting in different orders. Use y₂ − y₁ with x₂ − x₁, or reverse both.
  • Dividing run by rise. Slope is vertical change divided by horizontal change.
  • Dropping a negative sign. Subtracting −3 means adding 3.
  • Calling vertical slope zero. A horizontal line has zero slope. A vertical line has undefined slope.
  • Confusing slope with visual angle. Unequal axis scales can make a graph look steeper or flatter without changing the numerical slope.
09 / THE SLOPE GUIDE

Slope calculator questions

Does the order of the two points matter?

No, provided you reverse both x and y differences. Both signs change, leaving their ratio unchanged.

Why is a vertical line’s slope undefined?

Its x-coordinates are equal, so the horizontal change is zero. Division by zero is undefined. The equation of the vertical line is x equal to its fixed x-coordinate.

Are gradient and slope the same?

For a straight line in a two-dimensional coordinate plane, gradient commonly means slope. In other contexts, such as multivariable calculus, gradient has a different meaning.

Can slope have units?

Yes. Its units are y-axis units divided by x-axis units, such as metres per second. If both axes measure the same unit, the ratio is dimensionless.

See the exact arithmetic and rounding method for implementation details.