A slope calculator finds how steep a line is between two points, as rise over run. Enter the coordinates of both points and it returns the slope, the y-intercept, and the line equation. From (1, 2) to (3, 8) the slope is 3.
Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.
Saved results (0)
How to Use the Slope Calculator
- Enter the x and y of the first point.
- Enter the x and y of the second point.
- Read the slope, the rise over the run between them.
- See the y-intercept and the full line equation.
Here is what each result means:
| Result | What it means |
|---|---|
| Slope | How steep the line is, rise divided by run. |
| Y-intercept | Where the line crosses the y-axis. |
| Line equation | The line written as y = m x + b. |
What Is Slope?
Slope measures how steep a straight line is. It is the ratio of the vertical change to the horizontal change between two points, often described as rise over run. A slope of 3 means the line goes up 3 units for every 1 unit across.
The sign tells you the direction. A positive slope rises from left to right, a negative slope falls, a zero slope is a flat horizontal line, and a vertical line has an undefined slope because the run is zero. Slope is a core idea in algebra, physics and any field that deals with rates of change.
How Does the Slope Calculator Work?
It divides the change in y by the change in x, then finds the intercept and equation.
- Subtract the y values for the rise, and the x values for the run.
- Divide rise by run to get the slope.
- Use a point and the slope to find the intercept and the equation.
The straight-line distance between the same two points is a right-triangle problem; see the Pythagorean theorem calculator.
Slope Example
Find the slope of the line through (1, 2) and (3, 8).
Calculation: m = (8 - 2) / (3 - 1) = 6 / 2 = 3. The line rises 3 for every 1 across. Using the point (1, 2), the intercept is b = 2 - 3(1) = -1, so the equation is y = 3x - 1.
Positive vs Negative vs Zero Slope
The value and sign of the slope describe the line at a glance.
| Slope | Line | Example |
|---|---|---|
| Positive | Rises left to right | m = 2 |
| Negative | Falls left to right | m = -0.5 |
| Zero | Flat, horizontal | m = 0 |
| Undefined | Vertical line | x is constant |
A larger size of slope means a steeper line, whether it rises or falls.
Slope in the Line Equation
Slope is one half of the most common way to write a line.
| Form | Equation | Reads off |
|---|---|---|
| Slope-intercept | y = m x + b | Slope m and intercept b |
| Point-slope | y - y1 = m(x - x1) | Slope and one point |
Once you have the slope and any point, you can write the line in either form and convert between them.
What Affects the Slope
The Order of the Points
Subtract the coordinates in the same order for both x and y. Reversing only one flips the sign.
The Run Being Zero
If the two x values match, the run is zero and the slope is undefined, since you cannot divide by zero.
The Scale of the Axes
Slope is a pure ratio, but a stretched axis can make a line look steeper than its slope suggests.
When to Use a Slope Calculator
Graphing Lines
Find the slope and intercept to plot a line or write its equation.
Rates of Change
Read a rate, such as speed or cost per unit, from two data points.
Construction and Design
Work out a gradient or pitch, such as a ramp or roof, as rise over run.
Common Mistakes
1. Mixing Up the Order
Keep the same point first in both the top and bottom of the fraction, or the sign flips.
2. Flipping Rise and Run
Slope is rise over run, not run over rise. The vertical change goes on top.
3. Calling a Vertical Slope Zero
A vertical line has an undefined slope, not zero. Zero slope is a horizontal line.
4. Sign Errors with Negatives
Subtracting a negative coordinate adds. Track the signs carefully.
5. Using the Same Point Twice
Two identical points do not define a line. Use two different points.
Accuracy and Limitations
The slope formula is exact; only the displayed decimals are rounded.
What it calculates accurately
- The slope between two points
- The y-intercept and line equation
- The angle the line makes
What it does not do
- Give a slope for a vertical line
- Fit a line to more than two points
- Handle curves or nonlinear data
- Draw the line to scale
How We Find Your Slope
Frequently Asked Questions
How do you find the slope between two points?
Subtract the y values for the rise, subtract the x values for the run, then divide rise by run. From (1, 2) to (3, 8), the slope is (8 - 2) over (3 - 1), which is 3.
What is rise over run?
It is the definition of slope: the vertical change, the rise, divided by the horizontal change, the run, between two points on a line. A rise of 6 over a run of 2 is a slope of 3.
What does a negative slope mean?
A negative slope means the line falls from left to right, going down as x increases. The steeper the fall, the larger the size of the negative slope.
What is the slope of a horizontal line?
Zero. A horizontal line has no vertical change, so the rise is zero and the slope is zero. Its equation is y equals a constant.
Why is a vertical line slope undefined?
A vertical line has the same x at every point, so the run is zero. Dividing the rise by a zero run is undefined, which is why a vertical slope has no value.
How do I find the y-intercept from the slope?
Use a known point and the slope in y equals m x plus b. Substitute the point and slope, then solve for b. This tool does it and shows the full equation.
What is the slope-intercept form?
It is y equals m x plus b, where m is the slope and b is the y-intercept. It is the most common way to write a straight line, since both values read off directly.
Does the order of the points matter?
The line is the same either way, but you must subtract the coordinates in the same order for x and y. Reversing only one of them flips the sign of the slope.
Is my information saved?
No. The calculation runs in your browser and nothing you enter is stored or sent anywhere, unless you choose Save, which keeps the result only on this device.
Sources
- Slope (Wikipedia).
- Slope of a line (Maths Is Fun).
- Equation of a straight line (Maths Is Fun).
Related Guides
Related Calculators
Looking for more math tools?
Explore all math calculatorsThis calculator finds the slope of the straight line through two points. A vertical line, where the two x values match, has an undefined slope. Results are rounded for display. Spotted an error? Let us know.
Author
Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.




