Algebra

Line from Two Points

Find slope-intercept form. Free online Line from Two Points. Calculate line from two points online — fast, accurate, mobile-friendly, no signup needed.

y − y₁ = m·(x − x₁).
Equation
y = 2x + 2

Derivation

  1. ├── 01Givenx1 = 0, y1 = 2, x2 = 5, y2 = 12
  2. ├── 02Formula{let t=e.x1,a=e.y1,n=e.x2;const r=(e.y2-a) / (n-t),o=a-r × t;return"y = ".concat(r,"x + ").concat(o)}
  3. ├── 03Substitute{let t=e.0,a=e.2,n=e.5;const r=(e.12-a) / (n-t),o=a-r × t;return"y = ".concat(r,"x + ").concat(o)}
  4. └── 04Compute Equation
Did you know?

René Descartes introduced coordinate geometry in 1637 in La Géométrie, letting algebra solve geometric problems for the first time.

§01What is

Understanding the Line from Two Points

The Line from Two Points computes Equation from 4 inputs: x₁, y₁, x₂, y₂. Find slope-intercept form.

Algebra is the art of solving for the unknown. Rearranging a formula to isolate the variable you actually need is the single most common real-world math skill — and doing it with real numbers under time pressure is where errors happen. The Line from Two Points sits in that toolkit — it find slope-intercept form. Enter your numbers above and the result updates instantly; every step of the math is shown in the Derivation panel so you can see exactly how the answer was reached.

§02The Formula

How it’s calculated

{let t=e.x1,a=e.y1,n=e.x2;const r=(e.y2-a) / (n-t),o=a-r × t;return"y = ".concat(r,"x + ").concat(o)}

Where

x1
x₁
y1
y₁
x2
x₂
y2
y₂
§03Practical Example

Step-by-step walkthrough

Scenario

Apply the formula to a realistic set of inputs: x₁ = 0, y₁ = 2, x₂ = 5, y₂ = 12.

  1. 01Start by noting the input — x₁: 0.
  2. 02Start by noting the input — y₁: 2.
  3. 03Start by noting the input — x₂: 5.
  4. 04Start by noting the input — y₂: 12.
  5. 05Substitute these values into the formula: {let t=e.x1,a=e.y1,n=e.x2;const r=(e.y2-a) / (n-t),o=a-r × t;return"y = ".concat(r,"x + ").concat(o)}
  6. 06Compute Equation: the calculator returns y = 2x + 2.
  7. 07Cross-check the answer by opening the Derivation panel above — every line of math is shown so you can follow the computation end-to-end.
§04FAQ

Frequently asked questions

Yes. The calculator implements the standard formula as documented and returns exact floating-point results. No approximations are used unless noted in the formula.
Your feedback

How useful was this calculator?

Your ratings stay in your browser — they help us learn which tools people actually rely on.

Rate it
Was this helpful?