Slope and Line Equation Calculator
Derive a nonvertical line from two points.
Your result
MATHExample values are prefilled. Results update automatically when JavaScript is available.
What this tool calculates
Derive a nonvertical line from two points.
Inputs used: First x, First y, Second x, Second y.
On this page How it works & practical examples
How to use the Slope and Line Equation Calculator
Derive a nonvertical line from two points. Unlike interpolation, no target point is required; the primary result describes the line’s slope.
The calculation
Slope = (y2−y1)/(x2−x1); intercept = y1−slope×x1
Worked example
(1,2) and (3,6) give slope 2 and intercept 0, or y=2x.
Assumptions and limits
Vertical lines have undefined finite slope and are reported as an input limitation. Identical points cannot identify a unique line.