The slope formula helps you determine how steep a line is on a graph. The slope value tells you whether a line rises or falls when you go from left to right and its steepness. It compares how much the line goes up or down (the rise) to how much it moves sideways (the run).
You can take any two points on a line and use the slope formula to find a number that tells you the line’s direction and steepness. The slope tells you how a line moves. More precisely, if you move right one unit on a line, the value indicates how many units the line rises or falls.
For example, a positive slope means the line goes up as it moves right. A slope of 2 indicates that for every 1 unit the line moves right, it moves up by 2 units. Conversely, a negative slope means the line goes down as it moves right. Hence, a negative slope of -0.5 indicates that when you move right on a line by 1 unit, it declines by half a unit. The higher the absolute value of the slope, the steeper the line.
In this post, you will learn the slope formula, the idea of rise over run, how to find the slope of a line using two points, the point slope formula, and how the slope connects to angles.
What Is the Slope Formula?
The slope formula calculates how slanted or tilted a line is and the direction of the slant. Mathematically, it compares the relative change in the y-values (vertical direction) to the change in the x-values (horizontal direction) between two points. In plain words, the slope is the ratio of a line’s rise over run. The graph below helps you connect the geometry to the equation.
Learn more about the X and Y Axes in Graphs.

The slope equation looks like this:

Where:
- m is the slope.
- (x1, y1) and (x2, y2) are two points on the line.
- Δy = y2 − y1 is the vertical change (rise).
- Δx = x2 − x1 is the horizontal change (run).
So, the slope formula is the ratio of the rise over run:

How to Find the Slope of a Line
Here’s how you use the slope formula to find the slope of a line when you have two points:
- Specify that one of the points is point 1 (x1, y1) and the other is point 2 (x2, y2).
- Enter the coordinate values for both points into the equation.
- Calculate the solution.
Note: It doesn’t matter which point you decide is 1 and 2 because the slope formula produces the same solution either way.
Examples: Using the Slope Formula with two points
In the following examples, I’ll show you both the graphs and the math so you can link the concepts to the calculations.
Let’s say you have two points: (1, 3) and (4, 9), as shown below.

We enter those values into the slope equation.

This line rises 2 units for every 1 unit it moves right.
Here’s another example. Your points are (2, 5) and (6, 1).


This line drops 1 unit for every 1 unit it moves right. That’s another way to think about rise over run—if the rise is negative, the line slopes downward.
Point Slope Formula and Line Equation
Another way to use slope is with the point slope formula, which lets you write the equation of a line when you know a point and the slope:

This form is helpful when you don’t know the y-intercept because it allows you to find other points on the line. Stayed tuned because I’ll be writing about this formula soon!
You can also write the full line using the slope equation in slope-intercept form:
y = mx + b
Where:
- m is the slope.
- b is the y-intercept.
Learn more about the Slope-Intercept Form of Linear Equations: A Guide.
How Is Slope Related to Angles?
The slope formula can also help you find the angle a line makes with the x-axis. That’s because the slope is the same as the tangent of the angle. In trigonometry, the tangent is the ratio of the opposite side to the adjacent side in a right triangle:


In the above graph:
- The opposite side is the rise (Δy)
- The adjacent side is the run (Δx)
So, the slope becomes:

How to Find the Angle of a Line
If you already know the slope m, you can use your calculator to find the angle using the inverse tangent, also called arctan:
![]()
This process gives you the angle between the line and the x-axis.
? Be sure your calculator is in degree mode when you do this. Use the tan⁻¹ or arctan button on your calculator—usually found by pressing 2nd and then TAN.
Let’s walk through an example.
Say you have the points (2, 5) and (6, 9):

So, this line makes a 45-degree angle with the x-axis.
What about a negative slope? When your line goes down instead of up, the angle will be negative.
Summary
The slope formula helps you find the steepness of a line using the rise over run ratio for two points. Once you find the slope, you can calculate the angle, write the point slope formula, or build a complete slope equation in slope-intercept form.
Use the formula for slope any time you need to understand how a line behaves. In statistics, the slope plays a crucial role in a linear regression equation.

Comments and Questions