Slope Calculator

By Harmain Manzoor · Reviewed by Fahad Ullah

MathAlgebra·Last updated August 12, 2026
Slope Calculator for calculating the slope of a line from two points
Quickly calculate the slope of a line from two points with accurate results.

A slope calculator finds the steepness and direction of a line, usually starting from two points you already know. The idea behind it comes down to one simple ratio: rise over run. Enter two coordinate pairs, and the calculator tells you how much the line climbs or drops for every step it moves sideways.

What Does Slope Mean and How Is It Calculated?

Slope is a single number that describes two things about a line at the same time: how steep it is and which direction it runs. It is commonly written as m, and the formula behind it looks like this:

m = (y2 - y1) / (x2 - x1)

Rise is the vertical change between two points, and run is the horizontal change between them. Take the points (2, 1) and (4, 7) as an example. The vertical change is 7 minus 1, which is 6, and the horizontal change is 4 minus 2, which is 2. Divide 6 by 2 and the slope comes out to 3, meaning the line climbs three units for every one unit it moves to the right.

What Does a Positive, Negative, Zero, or Undefined Slope Mean?

A slope calculation can only land in one of four categories, and each one tells you something different about how the line behaves.

●        Positive slope: the line rises as it moves left to right. Points (1, 1) and (3, 5) give a slope of 2.

●        Negative slope: the line falls as it moves left to right. Points (1, 5) and (3, 1) give a slope of -2.

●        Zero slope: the line is perfectly horizontal, with no vertical change at all. Points (1, 4) and (5, 4) give a slope of 0.

●        Undefined slope: the line is perfectly vertical, so the run is zero and division by zero has no value. Points (2, 1) and (2, 6) fall into this case.

The sign of a slope only tells you which way the line is heading. How steep it actually looks depends on the absolute value of that number. A slope of 8 is far steeper than a slope of 1, no matter which one carries a negative sign.

How Do You Find the Slope Between Two Points?

Start by labeling the two points as (x1, y1) and (x2, y2). Take the points (1, 5) and (7, 6) as an example, so (x1, y1) is (1, 5) and (x2, y2) is (7, 6). Subtract to find the change in y first: 6 minus 5 equals 1. Then subtract to find the change in x: 7 minus 1 equals 6. Divide 1 by 6 and the slope works out to 1/6.

One detail matters more than it seems. The order of subtraction has to stay consistent between the top and bottom of the fraction. If you subtract y2 minus y1 on top, the x-values need to follow the same order underneath. Reversing only one of them silently flips the sign of the final answer, even though the numbers themselves are correct.

How Do You Find the Slope From a Graph?

When you are working from a graph rather than a list of coordinates, pick two points where the grid lines intersect clearly, since these are easiest to count accurately. Count the vertical distance between them for the rise, then count the horizontal distance for the run, and divide one by the other. For instance, two points at (2, 3) and (5, 9) give a rise of 6 and a run of 3, for a slope of 2.

This is also where most graph-reading mistakes happen. If a line moves downward or to the left as you count, that direction changes the sign of the rise or the run, and it is easy to lose track of which one flipped.

How Do You Find the Slope From a Linear Equation?

If an equation is already written in slope-intercept form, y = mx + b, the slope is simply the number sitting in front of x, no extra calculation needed. In the equation y = 4x - 7, for example, the slope is 4.

If the equation shows up in a different form, such as standard form, it needs to be rearranged into slope-intercept form first by isolating y. Take 3x + 2y = 12. Moving the x-term over and dividing gives y = -3/2x + 6, which means the slope is -3/2.

How Are Slope Percentage and Slope in Degrees Related?

The same slope can be described in three different ways: as a ratio (rise over run), as a percentage (rise over run multiplied by 100), or as an angle in degrees. To move from an angle to a percentage, the formula is slope percentage = tan(degrees) x 100. To go the other way, angle = atan(slope percent / 100).

Two things tend to surprise people the first time they see them. Slope percentage can be negative, which simply matches a downhill or falling direction, and it can also climb past 100 percent, since 100 percent lines up exactly with 45 degrees and anything steeper goes higher than that. The angle input itself is limited to somewhere between -90 and 90 degrees, not including either endpoint, because the percentage value shoots toward infinity as the angle nears 90 degrees, the same underlying reason a vertical line has an undefined slope in the first place.

Ratio

Percentage

Degree Angle

1

100%

45°

0.5

50%

≈26.6°

2

200%

≈63.4°

 

How Do You Tell If Two Lines Are Parallel or Perpendicular From Their Slopes?

Two straightforward rules cover this. Parallel lines always have equal slopes, and perpendicular lines have slopes that are negative reciprocals of one another, meaning the two slopes multiply together to equal -1.

A slope of 3 is parallel to any other line with a slope of 3. That same slope of 3 is perpendicular to a line with a slope of -1/3, since 3 multiplied by -1/3 gives -1. There is one named exception worth remembering: a horizontal line, with a slope of 0, and a vertical line, with an undefined slope, are always perpendicular to each other, even though the negative-reciprocal rule technically cannot be applied to either one directly.

What Are the Limitations of a Slope Calculator?

A slope calculator is reliable, but it helps to know where its boundaries sit. A vertical line always produces an undefined slope, since the run between any two of its points is always zero, and that result is a valid outcome rather than a calculator error. The slope formula itself only applies to straight lines. A curved graph does not have one constant slope, and describing its steepness at a single point calls for a different approach, the slope of a tangent line at that point rather than one number for the whole curve. Finally, entering the two points in a swapped or inconsistent order can silently flip the sign of the result, even when every number typed in was correct. None of these are flaws in the tool itself, just details worth keeping in mind while reading the output.

How Does Finding a Slope Connect to Other Algebra Calculators?

Once you have a slope in hand, a few related tasks tend to follow naturally. You might need the full equation of the line, written in slope-intercept or point-slope form, or you might already have an equation and need to solve it, or you might just want to see the line plotted to confirm the slope visually. The sections below walk through how each of those connects back to the slope you just found.

How Does a Linear Equation Calculator Use a Known Slope to Write an Equation?

Once a slope is known, it can be paired with a single point to write the line's equation in point-slope form, which is then rearranged into slope-intercept form. A slope of 2 combined with the point (3, 1), for example, works out to y = 2x - 5. For the full rearranging process, the linear equation calculator walks through each step rather than repeating it here.

How Does the Equation Solver Use a Line's Slope-Intercept Form?

A line written in slope-intercept form, y = mx + b, is itself a linear equation, so solving it for a specific x or y value uses the same inverse-operation steps as any other linear equation. If y = 3x + 2 and x is given as 4, solving for y gives 14. When the equation calls for more detail than a quick substitution, the equation solver covers the full process.

How Does a Graphing Calculator Show a Line's Slope Visually?

Plotting the two known points and drawing the line between them shows the slope directly, as steepness and direction you can see rather than just calculate. It is also a quick way to double-check work, since a slope found by hand should match what the plotted line looks like. Plotting two lines at once works the same way for confirming whether they look parallel or perpendicular, tying back to the rule covered earlier. The graphing calculator handles the plotting itself.

How Does a Distance Calculator Use the Same Two Points as a Slope Calculation?

The same two points used to find a slope also form a right triangle, with the rise and run acting as its two legs. That means the straight-line distance between them can be found with the Pythagorean theorem in one extra step. Points (3, 4) and (6, 8) produce a slope, and the same pair of points also has a distance between them. For that calculation, the distance calculator takes it from there.


Related Calculators

System of Inequalities Calculator

Instantly solve systems of linear and non-linear inequalities step-by-step with interactive overlapping shaded regions, solid/dashed boundary lines, and 2D/3D graphs.

Leave Your Feedback

Help us improve this calculator

Rating

Recent Feedback

No feedback yet.