Slope Calculator
Quickly calculate the slope between two points using a simple and intuitive interface.
The slope of a line is a single number that says how steep the line is and which way it leans. A slope of 2 means the line rises two units for every one unit it runs across, a slope of minus 1 means it falls one unit for every unit across, and a slope of 0 means the line is flat. Slope appears everywhere, from the graph of a straight line in a maths lesson to the pitch of a roof and the gradient of a road, so being able to work it out quickly is useful well beyond the classroom.
This Slope Calculator finds the slope between two points in seconds. You type in the two points, press one button, and the result appears to four decimal places, with no downloads, no sign up and no manual arithmetic. It is free to use on a phone, a tablet or a computer, and you can change the points and calculate again as many times as you like.
What Is a Slope Calculator?
A Slope Calculator is an online tool used to find the slope (m) of a straight line between two points on a graph. The slope shows how steep a line is and indicates the direction of change between the x-axis and y-axis. This calculator quickly computes the slope using the standard mathematical formula, making it useful for students, teachers, engineers, and professionals.
Slope is often described as rise over run. The rise is how far the line moves up or down between the two points, and the run is how far it moves across. Dividing the rise by the run gives the slope, and that one number tells you both the steepness and the direction of the line. A steep line has a large slope, a gentle line has a small slope, and a line that slopes down from left to right has a negative slope.
How to Use It
Using the slope calculator is simple and fast:
Enter the value of X1 and Y1 for the first point.
Enter the value of X2 and Y2 for the second point.
Click the Calculate Slope button.
The result will instantly display the slope value, shown as “Slope (m) =” followed by the result to four decimal places.
If both x-values are the same, the calculator correctly shows that the slope is undefined.
The Formula
The tool uses the standard slope formula: m = (Y2 – Y1) / (X2 – X1). The top of the fraction, Y2 – Y1, is the rise, and the bottom, X2 – X1, is the run. It does not matter which point you call the first and which you call the second, because both the rise and the run change sign together and the slope comes out the same. The most common mistake is to divide the wrong way round, so remember that rise goes on top and run goes underneath.
Once you know the slope, you can write the equation of the line. The Point Slope Form Calculator turns a slope and one point into the equation of the line in the form y – y1 = m(x – x1), which is the natural next step after a slope calculation.
Worked Example
Take the points (1, 2) and (5, 10). First find the rise: Y2 – Y1 = 10 – 2 = 8. Then find the run: X2 – X1 = 5 – 1 = 4. Divide the rise by the run: 8 / 4 = 2, so the slope is 2.0000. Enter X1 = 1, Y1 = 2, X2 = 5 and Y2 = 10 in the tool and it gives exactly “Slope (m) = 2.0000”. A slope of 2 means the line rises two units for every one unit it moves across, which matches the points: going from (1, 2) to (5, 10) is four across and eight up.
Reading the Result
A positive result means the line rises from left to right, and a negative result means it falls. A result of 0 means the line is horizontal, because the two points have the same y value and the rise is zero. A line through two points with the same x value is vertical, and its slope is undefined, because the run is zero and you cannot divide by zero. The result is shown to four decimal places, so a slope of one third appears as 0.3333, which is the tool rounding the repeating decimal.
The same two points also define a distance. The horizontal gap and the vertical gap are the two short sides of a right angled triangle, and the straight line distance between the points is the hypotenuse. The Pythagorean Theorem Calculator finds that distance from the two sides, using the rule a squared plus b squared equals c squared.
When to Use It
- When you are working with the graph of a straight line and need its gradient for homework, revision or an exam.
- When you are checking a line you have drawn, to see whether its slope matches the slope you expected.
- When you are working out the pitch of a roof, the gradient of a ramp, or the slope of a road, where rise over run is the same idea in a practical setting.
- When you are looking at data on a graph, for example, a distance time graph where the slope of the line is the speed.
- When two points are corners of a triangle and you want the triangle itself worked out, which the Triangle Calculator does from a single leg of a 45-45-90 triangle.
- When you want the equation of the line, not just its slope, which you can get from the slope and one point with the Point Slope Form Calculator.
Frequently Asked Questions
What is the formula used by the slope calculator?
The calculator uses the formula m = (Y2 – Y1) / (X2 – X1). The rise, Y2 – Y1, is divided by the run, X2 – X1. For the points (1, 2) and (5, 10), that is (10 – 2) / (5 – 1) = 8 / 4 = 2, so the slope is 2.0000.
Can the slope be negative or zero?
Yes. A negative slope means the line goes downward from left to right, while a zero slope means the line is horizontal. A zero slope happens when both points have the same y value, so the rise is zero.
What does an undefined slope mean?
An undefined slope occurs when both x-values are the same, forming a vertical line. The run is zero, and dividing by zero has no answer, so the slope is undefined rather than zero.
Can a slope be given as a percentage?
Yes, in some fields the gradient is given as a percentage, which is the slope multiplied by 100. A slope of 0.1 is a 10 percent gradient, and a slope of 2 is a 200 percent gradient. This tool shows the slope as a plain decimal number, so multiply the result by 100 if you need the percentage form.
Is this slope calculator free to use?
Yes, this online slope calculator is completely free and accessible anytime. There is no sign up and no limit on how many times you can use it.
Disclaimer
This Slope Calculator provides estimated results based on standard formulas and should be used for general informational purposes only. Results are rounded to four decimal places, so check any result you rely on for engineering, construction, or safety work with a second method before you act on it.
