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
- Coordinate geometry in the Euclidean plane: the distance formula follows from the Pythagorean theorem; the midpoint is the coordinate-wise average of the endpoints.
- OpenStax — Algebra and Trigonometry 2e (the rectangular coordinate system, distance and midpoint formulas)
- Khan Academy — Distance and midpoints (accessible explainer)
- Reviewed: 2026-08-05
Related calculators
Distance Between Two Points
Straight-line distance and midpoint between two points on the plane.
Midpoint Calculator
Calculate the midpoint between two 2D points.
Triangle Calculator
Area, perimeter, angles and classification of a triangle from its three sides.
Pythagorean Theorem Calculator
Find the missing side of a right triangle with a² + b² = c², steps included.
Circle Calculator
All four circle measurements from any single one — r, d, C or A.
3D Distance Calculator
Find the distance between two points in 3D.
Cylinder Calculator
Volume and surface areas of a cylinder from its radius (or diameter) and height.
Right Triangle Calculator
Complete a right triangle from two known values — sides, angles, area and perimeter.
Last updated: 2026-08-05 · v1.0.0 · Report an error