KiloAtlas
EN
EnglishBahasa IndonesiaTiếng Việt

Slope calculator

Find a line’s slope and y-intercept from two points.

Slope m

2.00000000
Y-intercept b
0.00000000

Formula

m = (y₂ − y₁) / (x₂ − x₁); b = y₁ − mx₁

Slope m ≈ ((6)-(2))÷((3)-(1)) · Y-intercept b ≈ (2)-(2)×(1)

How to use

  1. Enter the first point.
  2. Enter the second point with a different x.
  3. Read m and b for y=mx+b.

Examples

  • (1,2) and (3,6): m=2, b=0.
  • (0,5) and (2,1): m=−2, b=5.

Frequently asked questions

What if both x coordinates match?

The line is vertical, or the points coincide; this slope formula is undefined.

What does a negative slope mean?

The line falls as x increases.

Does swapping the points change the result?

No. Both the rise and run change signs, so their ratio stays the same.

Sources

Updated:

Related tools

Search conversion tools