Related products
GemRed 82305 Digital Angle Finder GemRed Protractor Stainless steel 7inch 200mm (Black Button)Optional digital angle finder related to this calculator.View on AmazonLaser Measure 50M/165ft,RockSeed Digital Laser Distance Meter with 2 Bubble Levels,Portable M/in/Ft Unit Switching Backlit LCD and Measuring Distance/Area/Volume/PythagoreanOptional laser distance meter for measuring rise and run before calculating slope or grade.View on AmazonEstimate Book Contractor: Detailed Contractor Work Estimate Book, Contact Informations Log, Client Data Work DetailsOptional contractor estimate book for logging slope and grading measurements on the job.View on Amazon
As an Amazon Associate, Calculation Hub earns from qualifying purchases.
Math formula
How to calculate slope
Slope measures how steep a line is and whether it rises or falls from left to right.
Direct answer
Formula
m = (y2 - y1) / (x2 - x1)
Use the table below to match each symbol with the right input. Keep units consistent before you start.
Slope formula
Start here when you only need the equation and variable names.
Formula
m = (y2 - y1) / (x2 - x1)
Slope measures how steep a line is and whether it rises or falls from left to right.
Variable meanings
Check each symbol, meaning, and unit before you calculate.
| Symbol | Name | Description | Unit |
|---|---|---|---|
| m | Slope | Rate of change of the line. | Depends on inputs |
| x1, y1 | First point | Coordinates of one point on the line. | Depends on inputs |
| x2, y2 | Second point | Coordinates of another point on the line. | Depends on inputs |
When to use this formula
Check that your situation matches the formula before you trust the result.
- Fits lines, grades, ramps, charts, and any straight-line rate of change.
Step-by-step method
Follow these steps when you are solving it by hand.
- 1Subtract the first y-value from the second y-value.
- 2Subtract the first x-value from the second x-value.
- 3Divide change in y by change in x.
- 4Leave the sign in place.
Examples
These sample numbers show the order of operations and units.
Rising line
point 1
(2, 3)
point 2
(6, 11)
- 1.m = (11 - 3) / (6 - 2)
- 2.m = 8 / 4
- 3.m = 2
Result
The slope is 2.
Falling line
point 1
(-1, 5)
point 2
(3, -3)
- 1.m = (-3 - 5) / (3 - -1)
- 2.m = -8 / 4
- 3.m = -2
Result
The slope is -2.
Mistakes to avoid
Small input or unit errors can change the answer a lot.
- Putting the wrong value in the numerator or denominator of the slope formula.
- Skipping signs, order, or sorting rules that change the result.
- Rounding before the last step.
- Assuming a formula applies when the needed input is zero or missing.
Open the Slope Calculator: Grade, Angle & Rise/Run
Open the calculator for the answer without rewriting the formula.
Enter your values in the related calculator, then compare the output with the hand method above.
Open Slope Calculator: Grade, Angle & Rise/RunFAQs
Short answers for common formula questions.
Can I calculate Slope by hand?
Yes. Write the units next to each value, convert rates or measurements first, and round only the final answer.
Why does my Slope result differ from another calculator?
Most differences come from rounding, unit conversions, rate timing, or a slightly different version of the formula.
When is the Slope Calculator better than hand math?
Open the Slope Calculator to check several scenarios or skip the hand arithmetic.