Find the equation of a line through two coordinate points
Result
Line Equation
Step-by-Step Derivation
Line Equation from Two Points Formula
m = (y₂-y₁)/(x₂-x₁), then y = mx + b
A line through two points is determined by its slope and intercept. The slope comes from rise over run, and substituting either point into y=mx+b gives the y-intercept.
⚠If x1 equals x2, the line is vertical and cannot be written as y=mx+b.
How the Two-Point Line Equation Works
Two distinct points determine one line. The calculator first finds slope, then uses one point to solve for the intercept or reports a vertical line.
Two Points
A unique nonvertical line passes through two distinct points.
Slope
Rise over run gives the line direction.
Intercept
Substitution finds where the line crosses the y-axis.
Vertical Case
Equal x values create x=constant.
💡 Example: For (1,2) and (3,6), m=2 and b=0, so y=2x.
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.