Physics Wallah

What is Slope Formula? Equation With Examples

Learn slope formula and how to find the slope of a line using points, equations, and graphs. Understand slope of horizontal, vertical, parallel, and perpendicular lines with simple examples.
authorImageShivam Singh15 May, 2025
Share

Share

Slope Formula

Slope Formula: The slope formula is used to calculate how steep or slanted a line is. It helps us understand the slope of a line by finding the ratio of how much the line moves up or down (change in the y-axis) compared to how much it moves left or right (change in the x-axis). The slope formula is useful in geometry and helps in analyzing the direction of lines on a graph.

Read More: Whole Numbers

What is Slope?

A common question students ask while learning this chapter is, "What is slope?" Let’s understand it in simple words. Slope tells us how slant or steep a line is. It shows how much a line goes up or down when we move to the right.

If the line goes up, the slope is a positive number. If it goes down, the slope is a negative number. A flat line has zero slope, and a line that goes straight up or down has a slope that is not defined. Slope helps us understand how things change on a graph in an easy and clear way.

What is Slope Formula?

The slope formula allows us to measure the steepness of a line on a graph. It compares the vertical change (how much the line goes up or down) with the horizontal change (how much it moves left or right). This ratio helps determine both the slope and the direction of the line. To calculate the slope of a line, we use the formula:

m = (y2 - y1) / (x2 - x1)

In this formula of slope, m represents the slope, and (x1, y1) and (x2, y2) are two points on the line. The difference in the y-values is divided by the difference in the x-values, giving us the slope of the line.

Formula of Slope Derivation

To derive the formula of slope, start by looking at two points on a line, each with x and y coordinates. The slope measures how much the line rises or falls as it moves horizontally. The change in the y-coordinate is referred to as Δy, and the change in the x-coordinate is Δx.

The formula for slope can be written as: m = Δy / Δx

Where:

  • m is the slope.

  • Δy is the change in the y values (vertical change).

  • Δx is the change in the x values (horizontal change).

Now, let’s look at the tan θ. The tan θ of the angle θ, formed by the line with the positive x-axis, also represents the slope. Mathematically, tan θ = height / base. For any two points on the line, the height is the vertical difference (y2 - y1), and the base is the horizontal difference (x2 - x1).

  • Thus, the slope formula becomes: m = tan θ = (y2 - y1) / (x2 - x1).

  • So, the slope formula is derived as: Slope = m = (y2 - y1) / (x2 - x1).

This gives us the slope of a line by measuring how the line rises or falls relative to how far it moves horizontally.

Types of Slope

The slope of a line can be of four types. These types tell us how the line moves on a graph when the values of x and y change. Understanding these slopes helps students know whether a line is going up, down, flat, or straight up and down. To uncover the types of slope, keep reading.

  1. Positive Slope: When a line goes upward from left to right, it has a positive slope. This means that as x increases, y also increases. The line rises as we move to the right. The slope formula or slope equation can be used to find how steep the line goes up. This is one way to learn how to find the slope of a line using numbers.

  2. Negative Slope: When a line goes downward from left to right, it has a negative slope. This means as x increases, y decreases. The line falls as we move to the right. The slope of line formula helps to measure how fast the line goes down.

  3. Zero Slope: If the line is flat and straight, it has a zero slope. This means y stays the same even when x changes. The line does not go up or down—only sideways. In this case, the formula of slope gives zero because there is no vertical change.

  4. Undefined Slope: If the line is standing straight up (vertical), it has an undefined slope. This happens because there is no side movement (x stays the same), and we can’t divide by zero in the slope formula.

These four types of slope help students understand how different lines behave on graphs and how to find slope in various situations.

Read More: Prime Factorization

How to Find the Slope of a Line?

Finding the slope of a line means figuring out how much the line goes up or down as we move from left to right. There are three easy ways to find the slope:

  • Using two points

  • Using the equation of the line

  • Using a graph. Let’s understand these one by one. 

1. Using Two Points

If there are two points on the line given, then use the slope formula: m = (y₂ − y₁) / (x₂ − x₁)

Here,

  • (x₁, y₁) is the first point.

  • (x₂, y₂) is the second point.

  • m is the slope of the line.

For example: Take two points: (2, 4) and (6, 10). Now use the formula:

m = (10 − 4) / (6 − 2)
m = 6 / 4
m = 3 / 2

So, the slope of the line is 3/2. This tells us that for every 2 units we move to the right, the line goes up by 3 units.

2. Using the Equation of the Line

If the line is given in this form: y = mx + b

This is called the slope-intercept form, where

  • m is the slope.

  • b is the y-intercept (where the line cuts the y-axis)

For example: Let’s say the equation is y = −4x + 7. Here, the slope m = −4.

So, the line goes down by 4 units every time we move 1 unit to the right.

3. Using a Graph

If there is a graph with a given line on it:

  • Pick any two clear points on the line.

  • Find the rise (how much y increases or decreases).

  • Find the run (how much x increases).

Use the formula: Slope = Rise / Run

For example: If the line moves up 2 units (rise = 2) and goes right 5 units (run = 5), then the slope of the line is 2/5.

By using these three methods, students can easily learn how to find the slope of a line in different situations, from equations, graphs, or points on a line.

Read More - Real Numbers

What is the Slope Equation?

As explained above, the slope equation is used to find how slant or steep a line is. It tells us how much a line rises or falls when we move from left to right on a graph. This equation is also known as the slope formula and is written in different ways depending on what details we have. The general slope equation is:

m = rise/run = tanθ = Δy / Δx = (y₂ − y₁) / (x₂ − x₁)

Let’s understand what these terms mean:

  • m stands for the slope.

  • Δy (y₂ − y₁) means the change in the y-values (how much the line goes up or down).

  • Δx (x₂ − x₁) means the change in the x-values (how much we move sideways).

  • θ (theta) is the angle the line makes with the positive x-axis.

  • rise/run is another way to describe slope. Rise means vertical change, and run means horizontal change.

  • tanθ means the slope is also equal to the tangent of the angle the line makes with the x-axis.

Another way to find the slope is by using the equation of a line: y = mx + b. Here m is the slope of the line and b is the y-intercept (the point where the line crosses the y-axis). So, if a line is written in this form, you can directly look at the value of m to know the slope.

Slope of a Horizontal Line

A horizontal line is a straight line that runs from left to right or right to left, just like the x-axis on a graph. Since the line does not go up or down, the change in the y-values is zero.

Using the slope of line formula: m = (y₂ − y₁) / (x₂ − x₁)
Since (y₂ − y₁) = 0 →
m = 0 / (x₂ − x₁) = 0

Hence, the slope of a horizontal line is always zero.

Slope of a Vertical Line

A vertical line is a straight line that goes up and down, like the y-axis. It does not move sideways, so the change in x-values is zero.

Using the slope of line formula: m = (y₂ − y₁) / (x₂ − x₁)
Since (x₂ − x₁) = 0 →
m = (y₂ − y₁) / 0, which is undefined.

So, the slope of a vertical line is undefined because we cannot divide by zero.

Read More: Basic Maths Questions

Slope of Perpendicular Lines

Two lines are perpendicular if they meet at a right angle (90°). In such cases, their slopes have a special relationship. If the slope of the first line is m₁, and the slope of the second line is m₂, then: m₁ × m₂ = -1.

This means the product of the slopes of two perpendicular lines is always -1. This rule comes from the angles they make with the x-axis and helps identify if two lines are perpendicular just by checking their slopes.

Slope of Parallel Lines

Two lines are parallel when they go in the same direction and never meet. That means they have the same steepness and the same angle with the x-axis. If one line has a slope m₁, and the other line has a slope m₂, then: m₁ = m₂

So, the slopes of parallel lines are always equal. Students can use the slope of line formula for both lines, and if the results are the same, it means the lines are parallel.

These basic slope rules help students understand how different types of lines behave and how to check their relationships using the slope of line formula.

Practice Questions Using Slope Formula

As previously stated, to find the slope of a line, students can use the slope formula, which calculates how steep the line is. Practice these questions to understand how to apply the slope formula in different problems.

Question 1: Find the slope of a line that passes through the points (3, 10) and (7, 2).

Solution: Use the slope of line formula: m = (y₂ − y₁) / (x₂ − x₁)

Given:
(x₁, y₁) = (3, 10) and (x₂, y₂) = (7, 2)

m = (2 − 10) / (7 − 3)
m = (−8) / (4) = −2

Ans. The slope of the line is −2.

Question 2: The slope of a line passing through the points (x, 5) and (9, −1) is −1. Find the value of x.

Solution: Using the slope formula:
m = (y₂ − y₁) / (x₂ − x₁)

Given:
m = −1, (x₁, y₁) = (x, 5), (x₂, y₂) = (9, −1)

−1 = (−1 − 5) / (9 − x)
−1 = (−6) / (9 − x)

Cross-multiplying:
−1 × (9 − x) = −6
−9 + x = −6
x = 3

Ans. The value of x is 3.

Question 3: Find the slope of the line passing through the points (−4, 3) and (2, −9).

Solution: Using the slope formula:
m = (y₂ − y₁) / (x₂ − x₁)

m = (−9 − 3) / (2 − (−4))
m = (−12) / (6) = −2

Ans. The slope of the line is −2.

Question 4: A line makes an angle of 135° with the positive x-axis. What is the slope of the line?

Solution: We know that slope m = tan(θ).

m = tan(135°) = −1

Ans. The slope of the line is −1.

Knowing slope formulas and how to find the slope of a line provides a solid foundation for understanding important math concepts. To further improve calculation speed and accuracy, explore Mental Math Online Classes by CuriousJr, as they can be a good way to sharpen skills.

Slope Formula FAQs

Why do we use slope formula in geometry?

The slope formula is used in geometry to find how steep a line is and to understand the direction of the line on a graph. It helps in studying shapes, angles, and lines clearly.

What is the slope formula?

The slope formula can be written as m = (y₂ - y₁) / (x₂ - x₁), where (x₁, y₁) and (x₂, y₂) are two points on the line.

How to find the slope of a line using two points?

To find the slope of a line using two points, use the slope of line formula: subtract the y-values and divide by the difference in x-values, like m = (y₂ - y₁) / (x₂ - x₁).

What is the slope of a horizontal line?

The slope of a horizontal line is zero because there is no change in the y-values while moving along the line.
Join 15 Million students on the app today!
Point IconLive & recorded classes available at ease
Point IconDashboard for progress tracking
Point IconMillions of practice questions at your fingertips
Download ButtonDownload Button
Banner Image
Banner Image
Free Learning Resources
Know about Physics Wallah
Physics Wallah is an Indian edtech platform that provides accessible & comprehensive learning experiences to students from Class 6th to postgraduate level. We also provide extensive NCERT solutions, sample paper, NEET, JEE Mains, BITSAT previous year papers & more such resources to students. Physics Wallah also caters to over 3.5 million registered students and over 78 lakh+ Youtube subscribers with 4.8 rating on its app.
We Stand Out because
We provide students with intensive courses with India’s qualified & experienced faculties & mentors. PW strives to make the learning experience comprehensive and accessible for students of all sections of society. We believe in empowering every single student who couldn't dream of a good career in engineering and medical field earlier.
Our Key Focus Areas
Physics Wallah's main focus is to make the learning experience as economical as possible for all students. With our affordable courses like Lakshya, Udaan and Arjuna and many others, we have been able to provide a platform for lakhs of aspirants. From providing Chemistry, Maths, Physics formula to giving e-books of eminent authors like RD Sharma, RS Aggarwal and Lakhmir Singh, PW focuses on every single student's need for preparation.
What Makes Us Different
Physics Wallah strives to develop a comprehensive pedagogical structure for students, where they get a state-of-the-art learning experience with study material and resources. Apart from catering students preparing for JEE Mains and NEET, PW also provides study material for each state board like Uttar Pradesh, Bihar, and others

Copyright © 2025 Physicswallah Limited All rights reserved.