Active experiment

Two Points → Line Equation Calculator

Create line equations from two points.

Step 01 · Set up

Fill in the mathematics

Replace the highlighted values below. Tab moves naturally through the equation.

Step 03 · Answer

Ready when you are

Substitution & process

Enter the known values, then select Calculate. Your working steps will appear here.

Understand the method

What does the two points → line equation calculation mean?

Two distinct points determine exactly one line. The slope comes from the coordinate differences, and either point then supplies the remaining constant through point-slope form.

When to use it

Use it to build the equation of a trend line, a boundary, or a segment from two coordinates.

Formula

m=y2−y1x2−x1;y−y1=m(x−x1)

In plain text: m = (y₂−y₁)/(x₂−x₁); y−y₁=m(x−x₁)

Variables and units

SymbolMeaning
(x₁, y₁), (x₂, y₂)the two points
mslope (y₂ − y₁)/(x₂ − x₁)
by-intercept

How to use the calculator

  1. Enter each known value in its labeled field.
  2. Select the answer precision you want.
  3. Choose Calculate answer to see the result and working.

Worked example

Through (1, 4) and (3, 10): m = 6/2 = 3, so y = 3x + 1. Both points satisfy the equation.

Common mistakes

  • Identical points do not define a line.
  • Equal x-coordinates give a vertical line with an undefined slope and equation x = constant.
  • Subtract coordinates in the same order in numerator and denominator.

Interpret the result

Substituting either original point must reproduce its y-value, which confirms both the slope and the intercept.