Line Equation from Two Points Calculator

Quick answer

The line equation from two points calculator finds the equation of the line through two points – slope-intercept, standard and point-slope form in 2D, or parametric and symmetric form in 3D – with exact fractions.

Line equation
y = (5/2)x − 1/2
Standard form / components
5x − 2y = 1
Slope
5/2 ≈ 2.5
y-intercept
−1/2
Point-slope / symmetric form
y − 2 = (5/2)(x − 1)

Two points determine a unique line. Finding its equation is a basic skill for graphing, physics (position–time graphs) and data modelling.

How to use the Line Equation from Two Points Calculator

  1. Dimension
  2. x₁
  3. y₁
  4. z₁
  5. x₂
  6. y₂
  7. z₂

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

The slope comes from the two points; the intercept from substituting one of them. Integer standard-form coefficients are found by clearing fractions. In 3D the direction vector is the difference of the points.

Formula

m = (y₂ − y₁)/(x₂ − x₁), b = y₁ − m·x₁ Standard: (y₂ − y₁)x + (x₁ − x₂)y = (y₂ − y₁)x₁ + (x₁ − x₂)y₁

Worked example

Inputs — Dimension: 2D; x₁: 1; y₁: 2; x₂: 3; y₂: 7.
Results — Line equation = y = (5/2)x − 1/2; Standard form / components = 5x − 2y = 1; Slope = 5/2 ≈ 2.5; y-intercept = −1/2; Point-slope / symmetric form = y − 2 = (5/2)(x − 1).

Key terms

Slope-intercept form
y = mx + b.

Frequently asked questions

How do I find a line from two points?

Find the slope, then substitute one point into y = mx + b to get b.

What if the x-coordinates are equal?

The line is vertical: x = constant.

What is standard form?

Ax + By = C with integers and A ≥ 0.

How do I describe a line in 3D?

With a point and a direction vector: (x, y, z) = P + t·d.

Sources

  1. OpenStax – College Algebra 2e
  2. OpenStax – Precalculus 2e

Cite this calculator

Speedy Calculator. (2026). Line Equation from Two Points Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/line-equation-from-two-points/