Gradient of a Line Calculator
This Gradient of a Line Calculator finds how steep a straight line is from two points on it, and shows the working line by line. The gradient is the rise, the change in y, divided by the run, the change in x. The answer is simplified and given as a fraction and a decimal. A positive gradient goes up from left to right, a negative one goes down, 0 is flat, and a vertical line has no gradient.
In the diagram, the rise is how far the line goes up between the two points and the run is how far it goes across.
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the gradient.
Formula: Gradient Formula
This formula gives how steep a line is. Divide the change in y, the rise, by the change in x, the run.
Required knowledge
- How to subtract coordinates, including negatives, covered in the Subtraction of Small Numbers Calculator.
- How to simplify the fraction, covered in the Simplifying of Fractions Calculator.
- How to write the fraction as a decimal, covered in the Fraction to Decimal Calculator.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the gradient.
Formula
Formula: Gradient Formula
This formula gives how steep a line is. Divide the change in y, the rise, by the change in x, the run.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the gradient of the straight line through the points \((1, 2)\) and \((5, 4)\).
Step 2
Step 2 - Write the formula.
In this problem: The gradient says how steep a line is: how far it goes up, the rise, for every step it goes across, the run. The rise is the change in \(y\) and the run is the change in \(x\), so the gradient is the rise divided by the run.
Step 3
Step 3 - Substitute the two pairs of coordinates into the formula.
In this problem: Replacing \(x_{1}\), \(y_{1}\), \(x_{2}\) and \(y_{2}\) with \(1\), \(2\), \(5\) and \(4\) in \(m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}\) gives \(m = \frac{4 - 2}{5 - 1}\).
Step 4
Step 4 - Work out the gradient.
In this problem: The rise is \(4 - 2 = 2\) and the run is \(5 - 1 = 4\). \(\frac{2}{4}\) simplifies to \(\frac{1}{2}\) by dividing the top and the bottom by \(2\). As a decimal, \(\frac{1}{2} = 0.5\). The gradient is positive, so the line goes up from left to right.
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the formula.
- Substitute the two pairs of coordinates into the formula.
- Work out the gradient.
Formula
Formula: Gradient Formula
This formula gives how steep a line is. Divide the change in y, the rise, by the change in x, the run.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the gradient of the straight line through the points \((-3, 1)\) and \((3, -2)\).
Step 2
Step 2 - Write the formula.
In this problem: The gradient says how steep a line is: how far it goes up, the rise, for every step it goes across, the run. The rise is the change in \(y\) and the run is the change in \(x\), so the gradient is the rise divided by the run.
Step 3
Step 3 - Substitute the two pairs of coordinates into the formula.
In this problem: Replacing \(x_{1}\), \(y_{1}\), \(x_{2}\) and \(y_{2}\) with \(-3\), \(1\), \(3\) and \(-2\) in \(m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}\) gives \(m = \frac{-2 - 1}{3 - \left(-3\right)}\).
Step 4
Step 4 - Work out the gradient.
In this problem: The rise is \(-2 - 1 = -3\) and the run is \(3 - \left(-3\right) = 6\). \(\frac{-3}{6}\) simplifies to \(-\frac{1}{2}\) by dividing the top and the bottom by \(3\). As a decimal, \(-\frac{1}{2} = -0.5\). The gradient is negative, so the line goes down from left to right.
Final Answer
Login and upgrade to Plus to unlock the full step solution.
Example Problems
Click one to load it into the box and solve it.