Slope Calculator

Calculate slope instantly in your browser.

Loading calculator…

What this tool does

Calculate slope instantly in your browser. A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.

How to use the Slope Calculator

  1. Enter or select x₁.
  2. Enter or select y₁.
  3. Enter or select x₂.
  4. Enter or select y₂.
  5. Read the calculated result; change any measurement to compare alternatives.

Formula

slope m = (y₂ − y₁)/(x₂ − x₁) — rise over run; the line's equation is y = mx + b with intercept b = y₁ − m·x₁.
x1
x₁
y1
y₁
x2
x₂
y2
y₂

A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.

Worked example

For slope calculator, the following measurements illustrate the exact method: x₁: 1; y₁: 2; x₂: 5; y₂: 8.

Inputs

  • x₁1
  • y₁2
  • x₂5
  • y₂8

Result

  • Slope (m)1.5
  • Y-intercept (b)0.5
  • Equation of the liney = 1.5x + 0.5
  • Angle of incline (degrees)56.31
  • Distance between the points7.21

Results explained

Slope (m)
Slope (m) from the formula above. A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.
Y-intercept (b)
Y-intercept (b) from the formula above. A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.
Equation of the line
Equation of the line from the formula above. A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.
Angle of incline (degrees)
Angle of incline (degrees) from the formula above. A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.
Distance between the points
Distance between the points from the formula above. A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.

Frequently asked questions

slope m = (y₂ − y₁)/(x₂ − x₁) — rise over run; the line's equation is y = mx + b with intercept b = y₁ − m·x₁.

A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.

Where mathematically meaningful, yes. Fields specify permitted ranges and undefined operations display an error.

Exact integer calculations use safe integers; decimal calculations use browser floating point, so small rounding differences can occur.

All values remain in your browser and are never uploaded.