Equation of a Line Given Two Points Calculator
Find the equation of a line through two points, with the working shown.
What is Two-Point Line?
Two distinct points determine exactly one straight line. Finding it is a two-step process: the slope comes from the rise over the run between the points, and the y-intercept comes from substituting either point into y = mx + b and solving for b.
How it works
The engine prints the working rather than only the answer, because the substitution is what a student is usually marked on: the slope as (y₂ − y₁) ÷ (x₂ − x₁) with your numbers, then b = y₁ − m·x₁ with yours, then the two standard forms. A vertical pair (same x) is recognised before the division and reported as x = c instead of an undefined slope.
- Enter your input. Type or paste your input into the field above — the tool responds instantly.
- Review the result. Output updates live as you type. Everything runs entirely in your browser.
- Copy or download. Use the Copy button to grab the result, or Download to save it as a file.
Examples
Realistic sample
Type or paste any realistic input — the tool computes the result locally and instantly.
Common mistakes
Expecting a server round-trip
Nothing is uploaded — every tool in this category runs entirely in your browser.