FREE MATH TOOL

Slope Calculator

A slope calculator finds the steepness of a line from two points or rise over run. Enter your values to see the exact simplified slope, step-by-step working, a line equation, and a printable coordinate diagram.

Input method

−10000 to 10000; up to 3 decimal places. Results update as you type.

Try an example

Slope m = 3/2

  1. Rise = y₂ − y₁ = 5 − (2) = 3
  2. Run = x₂ − x₁ = 3 − (1) = 2
  3. m = rise / run = 3 / 2 = 3/2
  4. b = y₁ − m × x₁ = 2 − (3/2) × (1) = 1/2

Line equation

y = (3/2)x + 1/2

Positive slope: y increases as x increases.

ABx →y ↑A (1, 2)B (3, 5)
Dashed segments show run and rise. Each axis is scaled independently; use the coordinates and calculation to measure slope.

How to calculate slope

  1. Enter the values

    Choose two points and enter x₁, y₁, x₂, y₂, or choose rise over run and enter the two changes.

  2. Divide rise by run

    Read the coordinate differences and the simplified slope fraction, or the explanation for an undefined slope.

  3. Check the equation and diagram

    For two points, review y = mx + b and the labeled coordinate diagram. Print the working for class or practice.

The slope-intercept form is y = mx + b, where m is slope and b is the y-intercept. Keep the point order consistent in both subtractions. Swapping both points leaves the slope unchanged.

Slope calculator FAQs

How do you calculate slope from two points?

Subtract the y coordinates to find the rise, subtract the x coordinates in the same order to find the run, then divide: m = (y₂ − y₁) / (x₂ − x₁).

What is the slope of a vertical line?

A vertical line has an undefined slope because its run is zero. Its equation is x = a constant. Undefined slope does not mean a slope of zero.

What does a slope of zero mean?

A slope of zero means the line is horizontal. The y coordinates are equal, so the rise is zero and the equation is y = a constant.

Can two identical points determine a slope?

No. Identical points produce 0/0, which is indeterminate. Infinitely many lines pass through one point, so you need a different second point.

Can I use decimals or negative coordinates?

Yes. Enter coordinates from −10000 to 10000 with up to three decimal places. The calculator reduces slope and intercept to exact fractions, including for decimal inputs.

Related free math tools

Turn math ideas into games and apps. Build with Zap Code →