Slope Calculator

Slope, line equation, and graph from any two points — rise over run, drawn out.

Point P1

How to use the slope calculator

  1. Enter two points. Type the (x1, y1) and (x2, y2) coordinates — decimals are fine.
  2. Press Calculate. You get the slope as rise/run, the line equation, and whether the line rises, falls, or is flat.
  3. Read the graph. The violet line passes through both marked points on a labeled grid — check it against your homework sketch.
  4. Try the edge cases. Equal x values give a vertical line with undefined slope; equal y values give a flat line with slope 0.

Frequently asked questions

How do you calculate slope from two points?

Slope m = (y2 − y1) / (x2 − x1), read as “rise over run”. It tells you how many units y changes for every unit x changes.

What is the slope of a vertical line?

Undefined. A vertical line has run = 0, and dividing by zero is not allowed — there is no number for the slope, only the equation x = k.

How do you get the line equation from two points?

First find the slope m, then solve for the intercept with b = y − mx using either point. Plug both into y = mx + b.

What does a negative slope mean?

The line falls as you move left to right — y decreases while x increases. Positive slopes rise, zero slope is flat.

Can slope be a fraction?

Yes, and it usually is. A slope of 1/3 means y rises 1 unit for every 3 units of x — a gentle climb.

More from the codex