Slope Calculator: Line Through Two Points (Free)

Free slope calculator—two (x,y) points for slope and line equation. Runs in your browser.

Two points → slope m and y-intercept b for the line through them (y = mx + b).

How to use

  1. Enter (x₁,y₁) and (x₂,y₂) with different x.
  2. Read m, b, and the direction hint.

Example

(0,0) and (2,4) → m = 2, b = 0.

Notes

Vertical lines (equal x) have undefined slope here.

Frequently asked questions

Slope formula?

m = (y₂−y₁)/(x₂−x₁); b = y₁ − m·x₁ for y = mx + b.

Negative slope?

y decreases as x increases—the line falls left to right.

Same x on both points?

Vertical line—undefined slope here (divide by zero).

Meaning of intercept b?

Where the line crosses the y-axis (y when x = 0).

Can I save my inputs?

Yes. Copy link below the form keeps your current inputs so you can share the scenario or save it for later.

Related calculators