Calculators Free

Slope calculator

Calculator

The calculator needs JavaScript. The tables below give the same numbers for common cases.

How it is worked out

  1. Rise = y₂ − y₁ = 10 − 2 = 8.
  2. Run = x₂ − x₁ = 7 − 1 = 6.
  3. Slope = rise ÷ run = 1.333333.
  4. y-intercept b = y₁ − m × x₁ = 0.666667.
Worked examples
InputsAnswer
x₁: 1; y₁: 2; x₂: 7; y₂: 10The slope through (1, 2) and (7, 10) is 1.333333.
x₁: 0; y₁: 5; x₂: 4; y₂: 1The slope through (0, 5) and (4, 1) is -1.
x₁: 2; y₁: 2; x₂: 2; y₂: 9The line is vertical (x = 2), so its slope is undefined.

How to use it

The slope of a line is rise over run: m = (y₂ − y₁) ÷ (x₂ − x₁). It says how many units the line goes up for each unit it goes right. A vertical line has an undefined slope because the run is 0.

The calculator also gives the line equation y = mx + b, the angle the line makes with the x-axis, and the distance between the two points.

Frequently asked questions

How do I calculate slope from two points?

Divide the change in y by the change in x. From (1, 2) to (7, 10): 8 ÷ 6 = 1.3333.

What is the slope of a vertical line?

Undefined, because the change in x is 0.

What does a negative slope mean?

The line goes down as you move right.

Method: standard arithmetic shown step by step; no outside data is used. Checked 2026-11-12.

Written by Calculators Free Editorial Team · Data checked 2026-11-12
About · How we verify this · Editorial policy · Corrections

General information only. Results are plain arithmetic on the numbers you enter; check anything important (money, health, school work) against your own records or the official source.