Slope Calculator

Find the slope and equation of a line through two points.

What does this calculator do?

The slope calculator finds the slope, y-intercept and equation of the line passing through two points.

Formula

Slope is the ratio of vertical change to horizontal change.

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

How to use it

Enter the coordinates of two points.

Worked example

(1,2) to (3,6) → slope = 2, equation: y = 2x.

Formula version1.0.0
Formulam = (y₂ − y₁) / (x₂ − x₁)
Precision4 decimals

Frequently asked questions

What if the line is vertical?

A vertical line has undefined slope. The calculator shows x = constant.

Sources

Related calculators

Last updated: 2026-08-05 · v1.0.0 · Report an error