Skip to main content

DigitalCalculators.net

Slope Calculator

Find the slope between two points, with the line equation, angle, distance and midpoint.

Results

ItemValue

Steps

StepWorking
Answers are rounded to 6 decimal places.

Quick Answer

Slope is rise over run: m = (y₂ − y₁) ÷ (x₂ − x₁). Between the points (1, 2) and (4, 8), the rise is 6 and the run is 3, so the slope is 2. The line equation is y = 2x + 0.

Last updated: 2 November 2026 · How we calculate this: the two-point slope formula

Table of Contents

How This Slope Calculator Works

Slope measures how steep a line is. Enter two points, and the calculator finds the slope, the line equation in y = mx + b form, the angle, the distance between the points, and the midpoint.

Quick explanation: m = rise ÷ run.

  • Positive slope: the line rises from left to right.
  • Negative slope: the line falls from left to right.
  • Zero: a flat line. A vertical line has an undefined slope.

Core Formulas

  • Slope: m = (y₂ − y₁) ÷ (x₂ − x₁)
  • Y-intercept: b = y₁ − m × x₁
  • Angle: arctan(m)
  • Distance: √((x₂ − x₁)² + (y₂ − y₁)²)
  • Midpoint: ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)

Worked Example

Find the slope between (0, 0) and (2, −1).

  • Rise = −1 − 0 = −1
  • Run = 2 − 0 = 2
  • Slope = −1 ÷ 2 = −0.5
  • Equation: y = −0.5x + 0

Common Mistakes

  • Mixing the order: subtract x and y in the same point order.
  • Dropping a negative: take care when subtracting a negative number.
  • Dividing by zero: if both x values match, the line is vertical.

Frequently Asked Questions

Subtract the y values, subtract the x values in the same order, then divide: m = (y₂ − y₁) ÷ (x₂ − x₁).

It means the line is flat, because y does not change.

It is the slope of a vertical line. The run is 0, and you cannot divide by 0.

It is the slope-intercept form of a line. m is the slope, and b is where the line crosses the y-axis.

Take the arctangent of the slope. A slope of 1 is an angle of 45°.

References & Sources

SourceUsed ForLink
Wikipedia, Slope Definition and formula for slope. https://en.wikipedia.org/wiki/Slope
Wikipedia, Linear equation Slope-intercept form. https://en.wikipedia.org/wiki/Linear_equation