How to Find the Slope of a Line From Its Graph (original) (raw)

Last Updated : 23 Jul, 2025

Slope of a line is the measure of its inclination with the positive x-axis. Mathematically, the slope is defined as “rise over run”. The slope is the measure of the inclination or slant of the line, whether it is rising or falling.

In this article, we will be discussing how to calculate the slope of a line on a graph, with an easy-to-understand formula, along with examples and others.

Table of Content

How to Find Slope From a Graph?

**m = (Y 2 - Y 1 ) /(X 2 - X 1 )

This formula will give you the slope of the line, which is represented by the variable 'm' and is calculated as ****(y** 2 - y 1 ) / (x 2 - x 1 ).

slope

Slope of a Line

Finding Slope From a Graph

Slope of any line can easily be calculated using above formula as shown in the example added below:

Let's say a line crosses points (2, 3) and (5, 7).

Use the above formula to find the slope (m):

m = (7 - 3) / (5 - 2)

m = 4 / 3

Slope in this particular case is 4/3, which means that the line is slanting upwards as you move right. We can choose any two separate points on the line, except for the vertical lines, to use in the slope formula.

The direction of the line's slant is indicated by the slope's sign (+ or -). A positive slope means that the line moves up as you travel right, whereas a negative slope makes the line move down.

Calculating Slope From Graph Using Slope Formula

Follow the steps added below to calculate slope from graph using slope formula,

Example: Examine a line that intersects points (2, 3) and (5, 7). Apply the slope formula to determine the slope (m).

**Solution:

Points are as follows: (x₁, y₁) = (2, 3) and (x₂, y₂) = (5, 7)

Equation(formula): m = (x₂ - x₁) / (y₃ - y₁)

To compute: m = (7 - 3) / (5 - 2) = 4 / 3

As a result, the line has a 4/3 slope. This shows a positive slope, which means that as you travel from left to right, the line slants upward.

Finding Slope of a Horizontal Line From a Graph

Why Slope of a Horizontal Line is 0?

**Example: **Imagine that the points (3, 4) are crossed by a horizontal line. Its y-value (4) will not change no matter where you go on the line since it is horizontal. This would be the slope (m).

**Solution:

For any non-zero value,

m = (4 - 4) / (x₂ - x₁)

m = 0

Essentially, the slope of every horizontal line, regardless of its x-coordinate, is always zero.

Finding Slope of a Vertical Line From a Graph

**Understanding Reason

****"Slope formula relies on the change in both x and y values between two points on the line. m = (y₂ - y₁) / (x₂ - x₁)"**

**Why Slope of a Vertical Line is undefined?

All the points that define a vertical line have constant x-values. For this reason, x 2-x 1 is equal to zero in any formula. Every point on a vertical line must have the same x-value. This means that when we divide (x₂ - x₁), it becomes zero. Slope formula is undefined due to division by zero, if the formula has a zero denominator (x₂ - x₁ equals zero) then its slope is undefined.

**Example: Consider a vertical line passing through the point (2, 5).

Since it's vertical, its x-value (2) stays constant.

The slope (m) would be:

m = (y₂ - y₁) / (2 - 2) = (any value) / 0 = undefined

Slope From Graph Examples

**Example: A line passes through points (1, 2) and (4, 6).

Using the formula:

m = (y₂ - y₁) / (x₂ - x₁)

m = (6 - 2) / (4 - 1)

= 4 / 3

Slope (m) is 4/3, which is positive. This indicates that the line slants upwards as you move from left to right.

**Example: Consider a line that goes through points (-2, 5) and (1, 1).

Using the formula:

m = (y₂ - y₁) / (x₂ - x₁)

m = (1 - 5) / (1 - (-2))

= -4 / 3

Slope (m) is -4/3, which is negative. This signifies that the line slants downwards as you move from left to right.

Problems on Finding Slope of a Line

**Problem 1: Imagine a horizontal line passing through the point (3, 4). Since it's horizontal, its y-value (4) will remain constant.

**Solution:

Using formula: **m = (y₂ - y₁) / (x₂ - x₁)

Because it's oriented horizontally, the difference in y-values (y₂ - y₁) is always zero (4-4)

In other words, the slope (m) is always zero irrespective of the x-value

**Problem 2: A line on a graph passes through the points (2,1) and (5,4). Find the slope (m) of this line.

**Solution:

Identify Coordinates: We are given two points on the line: (2, 1) and (5, 4)

Assign variables: Let' (2, 1) as (x₁, y₁) and (5, 4) as (x₂, y₂).

Apply the slope formula: m = (y₂ - y₁) / (x₂ - x₁)

Substitute values: m = (4 - 1) / (5 - 2) = 3 / 3

Slope (m) of the line is 1

This indicates a positive slope, meaning the line slants upwards as you move from left to right.

**Problem 3: Imagine a horizontal line on a graph that goes through the point (7, -2). What is the slope (m) of this line?

**Solution:

Slope of a horizontal line (m) is 0.

**Read More,