A slope calculator finds how much a straight line rises or falls for each unit it moves horizontally. Enter two different points, and it divides the change in y by the change in x. The answer can be positive, negative, zero, or undefined.
Use the ThinkQuarry Slope Calculator to calculate an answer, see the working, and check the line on an interactive graph. This guide explains what the result means, so you can spot an input mistake instead of simply copying a number.
What does a slope calculator calculate?
Slope measures a rate of change. If a line has a slope of 2, y increases by 2 whenever x increases by 1. If its slope is −2, y decreases by 2 over that same horizontal movement.
Our calculator supports two points, a line equation, a point and slope, slope and intercept, parallel or perpendicular lines, slope conversions, and endpoints from a point, direction, and distance. Choose the mode that matches the information you actually have.
A two-point slope describes the straight line through those points. If the points belong to a curve, it describes the secant line between them; it does not automatically give the curve’s instantaneous slope at either endpoint.
What is the slope formula?
For points (x₁, y₁) and (x₂, y₂), the formula is:
m = (y₂ − y₁) / (x₂ − x₁)
The numerator is the vertical change, often called rise. The denominator is the horizontal change, or run. The x-values must be different for the quotient to be defined.
Keep the subtraction order consistent. You may subtract the first point from the second, or the second from the first. Reversing both differences preserves the answer. Reversing only one changes its sign and produces the wrong result.
How do you use the slope calculator with two points?
- Choose Two points.
- Enter the first point’s x- and y-coordinates in their separate fields.
- Enter the second point in the same order.
- Select Calculate slope.
- Compare the exact answer, decimal value, steps, and graph.
For example, enter (2, 3) and (8, 12). The horizontal change is 8 − 2 = 6. The vertical change is 12 − 3 = 9. Therefore, m = 9/6 = 3/2 = 1.5.
That means the line rises 1.5 units for every 1 unit to the right. The fraction 3/2 communicates the same relationship as a rise of 3 for a run of 2. Those are two ways of expressing one slope, rather than different answers.
If your question gives fractions, enter them directly. Rounding 1/3 to 0.33 before calculation can introduce an avoidable error. Keep the exact value until a problem specifically asks for a rounded result.
What do positive, negative, zero, and undefined slopes mean?
Read the graph from left to right. A positive slope rises, and a negative slope falls. A horizontal line has zero slope because its y-coordinate stays constant. A vertical line has undefined slope because its horizontal change is zero.
Consider these examples:
- Positive: (1, 2) and (4, 8) give m = 6/3 = 2.
- Negative: (−2, 5) and (4, −1) give m = −6/6 = −1.
- Zero: (1, 7) and (5, 7) give m = 0/4 = 0.
- Undefined: (3, 1) and (3, 9) have a zero run, so the line is vertical.
Two identical points are a different problem. They give 0/0 and do not identify one unique line. Enter another distinct point instead of treating that result as a horizontal or vertical line.
How do you find slope from a line equation?
In slope-intercept form, y = mx + b, the coefficient of x is the slope. The constant b is the y-intercept.
For y = −3x + 5, the slope is −3 and the y-intercept is (0, 5). For 2x + 3y = 12, rearrange the equation: 3y = −2x + 12, then y = −(2/3)x + 4. The slope is −2/3.
The calculator’s equation mode can do this rearrangement for supported linear equations. A vertical equation such as x = 4 cannot be rewritten as y = mx + b with a finite slope. Its slope remains undefined.
If rearranging the equation is the difficult part, our algebra solver offers another place to work through equation-solving steps. Check that a tool’s supported input matches the question before entering it.
How are slope, angle, and percentage grade related?
For a nonvertical line, the signed slope angle is arctan(m). Percentage grade is 100 × m when the rise and horizontal run use the same units.
A slope of 1 is a 100% grade and corresponds to a 45° angle. A 10% grade is a slope of 0.1, with an angle of about 5.71°. This is why a 10% grade does not mean a 10° angle.
A line can also be described by its inclination, measured counterclockwise from the positive x-axis between 0° and 180°. For a negative slope, that inclination differs from the negative signed angle. Read the labels instead of assuming the two angle displays should match.
These conversions explain mathematical relationships. A homework calculation alone does not establish whether a real ramp, roof, or road meets a design requirement.
Why does the graph sometimes look steeper than expected?
Visual steepness depends on the scale of both axes. Stretching the y-axis can make the same slope look steeper. Compare the axis values and coordinate differences rather than judging only by the screen angle.
ThinkQuarry’s graph uses equal coordinate units. Zoom and pan help inspect the line, but they do not change the underlying answer. Use the rise-and-run triangle to connect the fraction to the plotted movement.
Which input mistakes should you check first?
A surprisingly large result often comes from a very small run. A reversed sign often comes from inconsistent subtraction or a missing negative sign. A completely different line can come from swapping x and y.
Before accepting an answer, check the original coordinate pairs, the order of the fields, and any negative signs. For a real-world rate, also check units. A slope measured in dollars per month is a rate with units; it is not automatically a dimensionless geometric grade.
Frequently asked questions
Can a slope calculator accept fractions?
Yes. ThinkQuarry accepts fractional coordinate inputs such as 3/4 and displays exact rational slopes where applicable. Approximate inputs involving angles are labeled accordingly.
Is an undefined slope the same as zero?
No. Zero slope describes a horizontal line. Undefined slope describes a vertical line, where the formula requires division by zero.
Can two points be entered in reverse order?
Yes. Reverse the complete point pairs and keep the same subtraction order for both coordinates. Both differences change sign, so the slope stays the same.
What slope do perpendicular lines have?
For two nonvertical, nonhorizontal perpendicular lines, their slopes are negative reciprocals. A line with slope 2 has a perpendicular slope of −1/2. Horizontal and vertical lines form the special perpendicular pair.
Does the calculator show a complete solution?
It displays calculation steps, line equations, a graph, and additional values for the selected mode. Use the explanation to check the reasoning, then download the solution or graph if needed.
Check your next problem
Open the free slope calculator with steps and graph, enter your values, and explain the result in a sentence: “For each 1-unit increase in x, y changes by this amount.” If that sentence agrees with the graph and your arithmetic, you have a useful check on the answer.
Reference
OpenStax: Understand Slope of a Line provides further textbook examples of slope and rise over run.



