This line equation from two points calculator will help you write down the equation of a **line passing through any pair of points**. Scroll down to find an article explaining how to determine the **slope-intercept linear equation** as well as the **standard form linear equation** from any two points in 2D space. We will also teach you how to find the **3D line equation from two points**!

Of course, we provide all the **formulas** in case you have to solve such a problem by hand. In such a case, don't forget to **check your solution** with Omni's line equation from two points calculator!

ðŸ™‹ Check out our slope intercept form calculator if you're not yet familiar with this type of equation.

## What is the linear equation from two points?

The linear equation from two points **(x _{1}, y_{1}) and (x_{2}, y_{2})** describes the unique line that passes through these points. This equation can be in the standard form (

**Ax + By + C = 0**) or in the slope-intercept form (

**y = ax + b**). A unique line equation also exists for any two points in three-dimensional space.

In what follows, we discuss **how to determine the line equation from two points** â€” first in the slope-intercept form and then in the standard form. Then we will move on to 3D space.

## How do I find the slope-intercept line equation from two points?

To compute the equation of the line passing through points **(x _{1}, y_{1}) and (x_{2}, y_{2})**:

- Compute the slope as
**a = (y**._{2}-y_{1}) / (x_{2}-x_{1}) - Compute the intercept as
**b = y**._{1}- a Ã— x_{1} - The equation you need reads
**y = a Ã— x + b**, with**a**an**b**computed as above. - If
**x**, you cannot compute_{2}= x_{1}**a**â€” the line is vertical and has equation**x = x**._{1}

ðŸ’¡ Does the slope formula from Step 1 remind you of the **rise over run formula**? This is not an accident! Discover more with our rise over run calculator.

## How do I compute the standard form linear equation from two points?

To compute the standard form equation of the line passing through **(x _{1}, y_{1}) and (x_{2}, y_{2})**:

- Compute
**A = y**._{2}- y_{1} - Compute
**B = x**._{1}- x_{2} - Finally, compute
**C = y**._{1}Ã— (x_{2}- x_{1}) - (y_{2}- y_{1}) Ã— x_{1} - The standard form linear equation from two points is
**Ax + By + C = 0**with**A, B, and C**as above.

## 3D line equation from two points

The equation of the line passing through points **(x _{1}, y_{1}, z_{1}) and (x_{2}, y_{2}, z_{2})** is:

**(x, y, z) = v Ã— t + point**

where:

**v**â€“ Directional vector computed as**v = [x**;_{2}-x_{1}, y_{2}-y_{1}, z_{2}-z_{1}]**t**â€“ A real parameter; and**point**â€“ One of the two points we're given.

See our direction of the vector calculator for more information on **v** here.

Explicitly, the 3D line equation from two points reads:

**(x, y, z) = [x _{2}-x_{1}, y_{2}-y_{1}, z_{2}-z_{1}] Ã— t + (x_{1}, y_{1}, z_{1})**

We can rewrite this as the system of equations for each coordinate:

**x = (x _{2} - x_{1}) Ã— t + x_{1}**

**y = (y**

_{2}- y_{1}) Ã— t + y_{1}**z = (z**

_{2}- z_{1}) Ã— t + z_{1}## How to use this line equation from two points calculator?

Omni's line equation from two points calculator is really straightforward to use! Follow these steps:

First, tell us what dimension your problem sits in:

**2D**or**3D**.Enter the

**coefficients**of the points in respective fields.Our tool determines the linear equation immediately and displays it at the bottom of the calculator:

For 2D problems: it shows the

**slope-intercept**equation and**standard form**equation.For 3D problems: it shows the

**parametric equation**, both in vector form and as a system of equations.

You can adjust the

**precision of calculations**by clicking the`advanced mode`

and changing the value of the variable*Precision*.

## FAQ

### What is the two point form formula?

Two point form formula is a way of writing down the equation of a line passing through two points. If the points are **(x _{1}, y_{1}) and (x_{2}, y_{2})**, then the two-point form reads:

**y - y _{1} = (y_{2} - y_{1})/(x_{2} - x_{1}) Ã— (x - x_{1})**.

### What is the equation of a line passing through (1,1) and (3,5)?

This equation is **y = 2x - 1**. To arrive at this answer, we find the slope as follows:

**a = (y _{2} - y_{1}) / (x_{2} - x_{1}) = (5-1) / (3-1) = 4/2 = 2**

Then we find the intercept as **b = y _{1} - a Ã— x_{1} = 1 - 2 Ã— 1 = -1**. So the equation reads

**y = a Ã— x + b = 2x - 1**, as claimed.