Slope of a line

Solve slope of a line with your values and follow each calculation step.

Inputs

Use the units shown
RESULT
—

Enter your values and select Calculate.

Formula & explanation
m = (y₂−y₁)/(x₂−x₁)

Variables & units

First point · x₁
Numeric value · minimum -1000000, maximum 1000000
First point · y₁
Numeric value · minimum -1000000, maximum 1000000
Second point · x₂
Numeric value · minimum -1000000, maximum 1000000
Second point · y₂
Numeric value · minimum -1000000, maximum 1000000

Worked example

From (1,2) to (5,10), slope = 8/4 = 2.

Assumptions

Use the same order of points in the numerator and denominator.

Formula version 1.0.0. JavaScript floating-point arithmetic applies. Results display up to 6 decimal places; stored values retain available precision. Use the units shown.

Practice with an example

Use the default input values to find the answer. The reset icon restores those values.

Calculated on your device. Your latest 100 calculations stay in this browser.