How to find the slope of a line

Here you will learn about the slope of a line, including how to calculate the slope of a straight line from a graph, from two coordinates and state the equations of horizontal and vertical lines.

Students will first learn about how to find the slope of a line as part of ratios and proportions in 7 th grade and functions in 8 th grade, and continue to work with slope in high school.

What is the slope of a line?

The slope of a line is a measure of how steep a straight line is. In the general equation of a line or slope intercept form of a line, y=m x+b, the slope is denoted by the coefficient m.

Imagine walking up a set of stairs. Each step has the same height and you can only take one step forward each time you move. If the steps are taller, you will reach the top of the stairs quicker, if each step is shorter, you will reach the top of the stairs more slowly.

Let’s look at sets of stairs,

US Webpages_ How to find the slope of a line 1 US

The blue steps are taller than the red steps and so the slope is steeper (notice the blue arrow is steeper than the red arrow).

The green steps are not as tall as the red steps so the slope is shallower (the green arrow is shallower than the red arrow).

Just like the example with the stairs above, slope can be thought of as a measure of the steepness of a line. The slope of a line can be positive or negative but is always observed from left to right.

US Webpages_ How to find the slope of a line 2 US

[FREE] Algebra Worksheet (Grade 6 to 8)

[FREE] Algebra Worksheet (Grade 6 to 8)

[FREE] Algebra Worksheet (Grade 6 to 8)

Teaching how to find the slope of a line? Use this quiz to check your grade 6 – grade 8 students’ understanding of algebra. 10+ questions with answers covering a range of algebra topics to identify areas of strength and support!

DOWNLOAD FREE NOW
x
[FREE] Algebra Worksheet (Grade 6 to 8)

[FREE] Algebra Worksheet (Grade 6 to 8)

[FREE] Algebra Worksheet (Grade 6 to 8)

Teaching how to find the slope of a line? Use this quiz to check your grade 6 – grade 8 students’ understanding of algebra. 10+ questions with answers covering a range of algebra topics to identify areas of strength and support!

DOWNLOAD FREE NOW

The linear relationship between two variables can be drawn as a straight line graph and the slope of the line calculates the rate of change between the two variables.

The rate of change is the slope of a line.

For example,

The exchange rate between two currencies can be represented by a linear relationship where the exchange rate represents the slope. When calculating the exchange rate of two currencies, you can calculate the slope of the line to find the rate of change between them.

Here, the exchange rate between pounds (£) and dollars (\$) is equal to \cfrac{3}{5}, for every 3 pounds there are 5 dollars. Let’s look at this linear relationship on the graph.

US Webpages_ How to find the slope of a line 3 US

In order to calculate the slope of a straight line given the two coordinates \left(x_1, y_1\right) and \left(x_2, y_2\right), you find:

  • The change in x is the difference between the x coordinates: x_2-x_1
  • The change in y is the difference between the y coordinates: y_2-y_1

The slope formula is:

\\m=\cfrac{y_{2}-y_{1}}{x_{2}-x_{1}}\\

It can be helpful to think about this formula as:

‘Change in y divided by change in x’ OR ‘Rise over run’

For example,

Let’s have a closer look at the slope of 4 lines

US Webpages_ How to find the slope of a line 4 US

  • When m=1, for each unit square you move to the right, you move 1 unit square upwards.
  • When m=2, for each unit square you move to the right, you move 2 unit squares upwards.
  • When m=- 3, for each unit square you move to the right, you move 3 unit squares downwards.
  • When m=\cfrac{1}{2}, for each unit square you move to the right, you move \cfrac{1}{2} a unit square upwards.

How far apart do the coordinates you choose need to be?

Let us look at the example of m=2.

US Webpages_ How to find the slope of a line 5 US

  • The first blue line has a slope of m=\cfrac{2}{1}=2.
  • The second blue line has a slope of m=\cfrac{6}{3}=2.
  • The third blue line has a slope of m=\cfrac{10}{5}=2.

No matter how far apart the coordinates are on the line, the slope \cfrac{y_2-y_1}{x_2-x_1} will always simplify to the same number, here m=2.

Tip: Use two coordinates that cross the corners of two grid squares so that you can accurately measure the horizontal and vertical distance between them. Use integers as much as possible!

Remember: the change in x is horizontal, the change in y is vertical.

Let’s look at horizontal and vertical lines.

Let us look at a couple of examples to further understand the equations of horizontal and vertical lines.

US Webpages_ How to find the slope of a line 6 US

In the diagram above, all the coordinates share an x value of 4, regardless of the y value, so if you join the coordinates together to make a straight line, you get the vertical line with the equation x=4. Notice the line crosses the x -axis at (4,0) (the x -intercept is 4 ). Vertical lines have an undefined slope.

You can also use the formula for slope on vertical lines. Using the points (4,1) and (4, -3), substitute the values into the formula, \cfrac{y_2-y_1}{x_2-x_1}.

\begin{aligned} & (4,1)→ x_1=4 \text{ and } y_1=1 \\\\ & (4, - 3) → x_2=4 \text{ and } y_2=-3\\\\ & \cfrac{y_2-y_1}{x_2-x_1}=\cfrac{-3-1}{4-4}=\cfrac{-4}{0}= \text{undefined} \end{aligned}

Now let’s look at horizontal lines.

For example,

US Webpages_ How to find the slope of a line 7 US

In the diagram above, all the coordinates share a y value of 2, regardless of the x value, so if you join the coordinates together to make a straight line, you get the horizontal line with the equation y=2. Notice the line crosses the y -axis at (0,2) (the y -intercept is 2 ). Horizontal lines have a slope of 0.

You can also use the formula for slope on horizontal lines. Using the points (-2, 2) and (4, 2), substitute the values into the formula, \cfrac{y_2-y_1}{x_2-x_1}.

\begin{aligned} & (-2, 2)→ x_1=-2 \text{ and } y_1=2 \\\\ & (4,2) → x_2=4 \text{ and } y_2=2 \\\\ & \cfrac{y_2-y_1}{x_2-x_1}=\cfrac{2-2}{4-(-2)}=\cfrac{0}{6}= 0 \end{aligned}

All vertical lines are of the form x=a and all horizontal lines are of the form y=b where a and b can be any number.

The x axis is a horizontal line and the y axis is a vertical line. So, you can represent them with equations.

For example,

The equation y=0 is where you draw the x -axis as the line y=0 is horizontal and crosses the y -axis at 0. The y-axis is drawn using the equation x=0 as this line is vertical and crosses the x -axis at 0.

What is the slope of a line?

What is the slope of a line?

Common Core State Standards

How does this relate to 7 th grade math, 8 th grade math, and high school math?

  • Grade 7 – Ratios and Proportional Relationships (7.RP.A.2b)
    Identify the constant of proportionality (unit rate) in tables, graphs, equations, diagrams, and verbal descriptions of proportional relationships.

  • Ratios and Proportional Relationships (7.RP.A.2e)
    Explain what a point (x, y) on the graph of a proportional relationship means in terms of the situation, with special attention to the points (0, 0) and (1, r) where r is the unit rate.

  • Grade 8 – Functions (8.F.A.3)
    Interpret the equation y = mx + b as defining a linear function, whose graph is a straight line; give examples of functions that are not linear. For example, the function A = s2 giving the area of a square as a function of its side length is not linear because its graph contains the points (1,1), (2,4) and (3,9), which are not on a straight line.

  • Grade 8 – Expressions and Equations (8.EE.B.5)
    Graph proportional relationships, interpreting the unit rate as the slope of the graph. Compare two different proportional relationships represented in different ways.

  • High School: Algebra – Reasoning with Equations and Inequalities (HSA.REI.B.3)
    Solve linear equations and inequalities in one variable, including equations with coefficients represented by letters.

  • High School Algebra – Creating Equations (HSA-CED.A.2)
    Create equations in two or more variables to represent relationships between quantities; graph equations on coordinate axes with labels and scales.

How to calculate the slope of a line

In order to calculate the slope of a line:

  1. Select two points on the line.
  2. Sketch a right angled triangle and label the change in \textbf{y} and the change in \textbf{x} .
  3. Divide the change in \textbf{y} by the change in \textbf{x} to find \textbf{m} .

How to find the slope of the line examples

Example 1: using a straight line graph (positive slope)

Calculate the slope of the line:

US Webpages_ How to find the slope of a line 8 US

  1. Select two points on the line.

US Webpages_ How to find the slope of a line 9 US

2Sketch a right angled triangle and label the change in \textbf{y} and the change in \textbf{x} .

US Webpages_ How to find the slope of a line 10 US

3Divide the change in \textbf{y} by the change in \textbf{x} to find \textbf{m} .

Here, \cfrac{4}{2}=2 so m=2.

Example 2: using a straight line graph (negative slope)

Calculate the slope given the graph of the line:

US Webpages_ How to find the slope of a line 11 US

Select two points on the line.

Sketch a right angled triangle and label the change in \textbf{y} and the change in \textbf{x} .

Divide the change in \textbf{y} by the change in \textbf{x} to find \textbf{m} .

Example 3: using a straight line graph with two coordinates (positive slope)

Calculate the slope of the line:

US Webpages_ How to find the slope of a line 14 US

Select two points on the line.

Sketch a right angled triangle and label the change in \textbf{y} and the change in \textbf{x} .

Divide the change in \textbf{y} by the change in \textbf{x} to find \textbf{m} .

Example 4: find the slope of the line given two points

Calculate the slope of the line:

US Webpages_ How to find the slope of a line 16 US

Select two points on the line.

Sketch a right angled triangle and label the change in \textbf{y} and the change in \textbf{x} .

Divide the change in \textbf{y} by the change in \textbf{x} to find \textbf{m} .

Example 5: given two coordinates (positive slope)

Calculate the slope of the line with coordinates A(4,3) and B(7,12).

Select two points on the line.

Sketch a right angled triangle and label the change in \textbf{y} and the change in \textbf{x} .

Divide the change in \textbf{y} by the change in \textbf{x} to find \textbf{m} .

Example 6: given two coordinates (negative slope)

Calculate the slope of the line with coordinates P(-10,-3) and Q(2,-7).

Select two points on the line.

Sketch a right angled triangle and label the change in \textbf{y} and the change in \textbf{x} .

Divide the change in \textbf{y} by the change in \textbf{x} to find \textbf{m} .

Teaching tips for how to find the slope of a line

  • Give students plenty of time to work with slope on a graph before moving to manipulating coordinates algebraically to find the slope.

  • Let students use a graphing calculator or digital graphing platforms such as Desmos to explore how changing a slope changes the slope of a line. For example, have them graph y=-2 x+3, \, y=2 x+3, \, y=-\cfrac{1}{2} x+3 and y=\cfrac{1}{2} +3 and ask them to compare and contrast the slopes with each other.

Easy mistakes to make

  • Mixing up the coordinates when calculating the horizontal change and the vertical change
    Two coordinates are subtracted from each other to find the change in y and the change in x. If you labeled each coordinate \left(x_1, y_1\right) and \left(x_2, y_2\right) you take the values from the first coordinate away from the second coordinate:
    • The change in x is x_2-x_1
    • The change in y is y_2-y_1

  • Incorrectly simplifying m with negative number division
    When you subtract one coordinate from another, one or both of the numerator and the denominator can be negative. If one is negative, the slope is negative. If both are negative, remember a negative number divided by another negative number is a positive number, so the slope is positive.
    For example, \cfrac{6}{-2}=\cfrac{-6}{2}=-3 or \cfrac{-8}{-4}=\cfrac{8}{4}=2

  • Dividing the change in \textbf{x} by the change in \textbf{y}
    It is easy to mistake the calculation of m to be the change in x divided by the change in y. This would result in the reciprocal of the slope which, most of the time (not always) is incorrect.

  • Reading scales incorrectly
    Sometimes the scale of the axis can change. For example, 1 square can be a half unit, or 2 units, etc. For this reason, it is important to use the coordinates and the axes to make sure these values are correct. Example 4 highlights this fact as each square on the y -axis is 2 units.

Practice how to find the slope of a line questions

1. Calculate the slope of the line:

 

US Webpages_ How to find the slope of a line 18 US

m=\cfrac{2}{5}
GCSE Quiz True

m=\cfrac{5}{2}
GCSE Quiz False

m=-\cfrac{2}{5}
GCSE Quiz False

m=-\cfrac{5}{2}
GCSE Quiz False

US Webpages_ How to find the slope of a line 19 US

 

The change in x is +5. The change in y is +2.

 

US Webpages_ How to find the slope of a line 20 US

 

\text { Slope }(\mathrm{m})=\cfrac{\text { change in } y}{\text { change in } x}.

 

m=\cfrac{2}{5}

2. Calculate the slope of the line:

 

US Webpages_ How to find the slope of a line 21 US

m=\cfrac{14}{9}
GCSE Quiz False

m=\cfrac{9}{14}
GCSE Quiz False

m=-\cfrac{9}{14}
GCSE Quiz True

m=-\cfrac{14}{9}
GCSE Quiz False

US Webpages_ How to find the slope of a line 22 US

 

The change in x is +14. The change in y is -9.

 

US Webpages_ How to find the slope of a line 23 US

 

\text { Slope }(\mathrm{m})=\cfrac{\text { change in } y}{\text { change in } x}.

 

m=\cfrac{-9}{14}

3. Calculate the slope of the line given the coordinates:

 

US Webpages_ How to find the slope of a line 24 US

m=\cfrac{14}{4}
GCSE Quiz False

m=\cfrac{3}{4}
GCSE Quiz False

m=\cfrac{8}{3}
GCSE Quiz False

m=\cfrac{4}{3}
GCSE Quiz True

Notice, each square on the x -axis is 2 units.

 

The change in x is +6.  The change in y is +8.

 

US Webpages_ How to find the slope of a line 25 US

 

\text { Slope }(\mathrm{m})=\cfrac{\text { change in } y}{\text { change in } x}.

 

m=\cfrac{8}{6}=\cfrac{4}{3}

4. Calculate the slope of the line given the coordinates:

 

US Webpages_ How to find the slope of a line 26 US

m=-\cfrac{1}{2}
GCSE Quiz True

m=\cfrac{1}{2}
GCSE Quiz False

m=-2
GCSE Quiz False

m=-4
GCSE Quiz False

Notice, each square on the x -axis is \cfrac{1}{2} a unit.

 

The change in x is +6. The change in y is -3.

 

US Webpages_ How to find the slope of a line 27 US

 

\text { Slope }(\mathrm{m})=\cfrac{\text { change in } y}{\text { change in } x}.

 

m=\cfrac{-3}{6}=-\cfrac{1}{2}

5. Calculate the slope of the line given the coordinates A(2,6) and B(8,24).

m=4
GCSE Quiz False

m=\cfrac{1}{3}
GCSE Quiz False

m=-3
GCSE Quiz False

m=3
GCSE Quiz True
\begin{aligned}m & =\cfrac{y_2-y_1}{x_2-x_1} \\\\ m & =\cfrac{24-6}{8-2} \\\\ m & =\cfrac{18}{6} \\\\ m & =3\end{aligned}

6. Calculate the slope of the line given the coordinates A(-3,-8) and B(-5,10)

m=\cfrac{10-8}{-5-3}=\cfrac{2}{-8}=\cfrac{-1}{4}
GCSE Quiz False

m=\cfrac{10-5}{-8–3}=\cfrac{5}{-5}=-1
GCSE Quiz False

m=\cfrac{-8-10}{-3-(-5)}=\cfrac{-18}{2}=-9
GCSE Quiz True

m=\cfrac{-8-10}{-5-(-3)}=\cfrac{-18}{-2}=9
GCSE Quiz False
-8 \rightarrow y_2 \text { and } 10 \rightarrow y_1

 

-3 \rightarrow x_2 \text { and }-5 \rightarrow x_1

 

\begin{aligned}& m=\cfrac{y_2-y_1}{x_2-x_1} \\\\ & m=\cfrac{-8-10}{-3-(-5)}=\cfrac{-18}{2}=-9\end{aligned}

How to find the slope of the line FAQs

Is finding the slope of a line the same as how to find \textbf{k} , the constant of proportionality?

Yes, because they both represent a rate of change or steepness of a line. So, you can either count the vertical distance and the hortizontal distance between two points (rise over run) or you can use the formula for slope, \cfrac{y_2-y_1}{x_2-x_1}.

What are some different forms for an equation of a line?

There are different ways to write the equation of the line. Some of the most popular forms are point-slope form, standard form, and slope-intercept form.

What is the ‘gradient’ of a line?

The gradient is another name of slope. It is the change in y over the change in x.

How are the slopes of parallel lines connected?

Lines that are parallel have the same slope, which is why they never intersect. You can tell two lines are parallel by looking at the slope of a given line and seeing if the other line has the same m value.

How are the slopes of perpendicular lines connected?

Lines that are perpendicular have slopes that are opposite reciprocals. You can tell two lines are perpendicular by looking at their slope equations and seeing if the m values are opposite reciprocals.

The next lessons are

Still stuck?

At Third Space Learning, we specialize in helping teachers and school leaders to provide personalized math support for more of their students through high-quality, online one-on-one math tutoring delivered by subject experts.

Each week, our tutors support thousands of students who are at risk of not meeting their grade-level expectations, and help accelerate their progress and boost their confidence.

One on one math tuition

Find out how we can help your students achieve success with our math tutoring programs.

x

[FREE] Common Core Practice Tests (3rd to 8th Grade)

Prepare for math tests in your state with these 3rd Grade to 8th Grade practice assessments for Common Core and state equivalents.

Get your 6 multiple choice practice tests with detailed answers to support test prep, created by US math teachers for US math teachers!

Download free