Skip to content
ENExplore Calculators

Slope From Two Points Calculator

Work out slope from two points instantly with clear inputs, formula shown and shareable results.

About Slope From Two Points Calculator

The gradient is the rise over the run, (y₂ − y₁)/(x₂ − x₁). Substituting one point into y = mx + c then recovers the intercept.

Formulas

Gradient

m = (y₂ − y₁) / (x₂ − x₁)

Intercept

c = y₁ − m·x₁

Worked example

With the default values below, Slope From Two Points Calculator returns Gradient m of 2.00000000. Change any input above and every figure here is recalculated in your browser.

Inputs used

x₁
2
y₁
3
x₂
8
y₂
15

Results

Gradient m
2.00000000
y-intercept c
-1.00000000
Equation of the line
y = 2x - 1
Angle to the x-axis
63.434949 °

Step by step

  1. 1Values used
  2. 2Gradient
  3. 3Intercept
  4. 4Gradient m= 2.00000000
  5. 5y-intercept c= -1.00000000
  6. 6Equation of the line= y = 2x - 1
  7. 7Angle to the x-axis= 63.434949 °

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 8 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Gradient through (2, 3) and (8, 15)?

12/6 = 2, and the line is y = 2x − 1.

Why is a vertical line undefined?

Because the run is zero, so the ratio divides by zero. Such lines are written x = k instead.

Slope From Two Points Calculator | Calcrivo