Skip to content

Search topics

Practice for free Sign in

Calculator Coordinate proofs

Equation of a line through two points calculator

In one sentence

Equation of a line through two points: y − y₁ = m(x − x₁) with m = (y₂ − y₁)/(x₂ − x₁).

Last checked Source: own words Source: own words www.corestandards.org (opens in a new tab)

Key facts

Equation of a line through two points calculator

Formula ref
y − y₁ = m(x − x₁) with m = (y₂ − y₁)/(x₂ − x₁)
Topic
Coordinate proofs

Inputs

  • Two points (x₁, y₁) and (x₂, y₂) with different x-coordinates

Worked input

  • Points (1, 2) and (4, 8): m = 2, line y = 2x.
  • Take (1, 5) and (3, 11), a pair with a whole-number slope, so the equation is the easiest kind to write. The slope is 3, the point-slope form passes through (1, 5), the y-intercept works out to 2, and the simplified result is y = 3x + 2. Check: substituting x = 3 gives y = 11, which is the y-coordinate of the second point, so the line really contains both.
  • Take (−2, 1) and (4, 6), a pair with a fractional slope and a fractional y-intercept, so the arithmetic needs care with denominators. The slope is 5/6 and the y-intercept is 8/3, which gives y = (5/6)x + 8/3. Check: at x = −2 the line gives y = 1, the first point, and at x = 4 it gives y = 6, the second point.
  • Take (5, −3) and (5, 4), two points with the same x-coordinate, so the run is 0 and the slope formula cannot be used. A line through them cannot be written as y = mx + b at all, and the tool instead reports the vertical line x = 5. Check: every point on that line has x equal to 5, including both of the given points, so the vertical-line form is the right one here.

How to use it

  • Enter both points.
  • The tool finds the slope first.
  • It then writes point-slope form and simplifies to slope-intercept form.
  • A vertical line has the equation x = constant.

Equation of a line through two points calculator for the Geometry Regents exam, with its source.

Related pages include Slope calculator, Right triangle solver calculator, Parallel and perpendicular line calculator and Angle of elevation height calculator.

Practice for free

Test yourself with exam-style questions and see why each answer is right or wrong.

Start practicing
Free practice, no card Start without an account Sources checked Every fact names its official source
Works on any device Phone, tablet or desktop
Contact us Questions or a correction