If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Slope formula

Learn how to write the slope formula from scratch and how to apply it to find the slope of a line from two points.
It's kind of annoying to have to draw a graph every time we want to find the slope of a line, isn't it?
We can avoid this by writing a general formula for slope. Before we start, let's remember how slope is defined:
$\text{Slope}=\frac{\text{Change in y}}{\text{Change in x}}$
Let's draw a line through two general points $\left({x}_{1},{y}_{1}\right)$ and $\left({x}_{2},{y}_{2}\right)$.
An expression for $\text{change in x}$ is ${x}_{2}-{x}_{1}$:
Similarly, an expression for $\text{change in y}$ is ${y}_{2}-{y}_{1}$:
Now we can write a general formula for slope:
$\text{Slope}=\frac{\text{Change in y}}{\text{Change in x}}=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$
That's it! We did it!

## Using the slope formula

Let's use the slope formula to find the slope of the line that goes through the points $\left(2,1\right)$ and $\left(4,7\right)$.
Step 1: Identify the values of ${x}_{1}$, ${x}_{2}$, ${y}_{1}$, and ${y}_{2}$.
${x}_{1}=2$
${y}_{1}=1$
${x}_{2}=4$
Step 2: Plug in these values to the slope formula to find the slope.
$\text{Slope}=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}=\frac{7-1}{4-2}=\frac{6}{2}=3$
Step 3: Gut check. Make sure this slope makes sense by thinking about the points on the coordinate plane.
Yup! This slope seems to make sense since the slope is positive, and the line is increasing.

## Using the slope formula walkthrough

Let's use the slope formula to find the slope of the line that goes through the points $\left(6,-3\right)$ and $\left(1,7\right)$.
Step 1: Identify the values of ${x}_{1}$, ${x}_{2}$, ${y}_{1}$, and ${y}_{2}$.
${x}_{1}=$
${y}_{1}=$
${x}_{2}=$
${y}_{2}=$

Step 2: Plug in these values to the slope formula to find the slope.
$\text{Slope}=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}=$

Step 3: Gut check. Make sure this slope makes sense by thinking about the points on the coordinate plane.
Does this slope make sense?

## Let's practice!

1) Use the slope formula to find the slope of the line that goes through the points $\left(2,5\right)$ and $\left(6,8\right)$.

2) Use the slope formula to find the slope of the line that goes through the points $\left(2,-3\right)$ and $\left(-4,3\right)$.

3) Use the slope formula to find the slope of the line that goes through the points $\left(-5,-7\right)$ and $\left(-2,-1\right)$.

What happens in the slope formula when ${x}_{2}={x}_{1}$?
$\text{Slope}=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$