This slope calculator finds m = (y2 – y1) ÷ (x2 – x1) from two points. Enter x1, y1, x2, and y2. The default points (1, 2) and (4, 8) return slope 2 because rise 6 over run 3 equals 2.
Algebra students graph lines with it. Survey and design notes use the same rise over run idea. Pair it with the distance calculator when you also need segment length, or the right triangle calculator when a right triangle model fits.
How the formula works
Subtract the first y from the second y for rise. Subtract the first x from the second x for run. Divide rise by run. A zero run means a vertical line and no finite slope.
Worked example
x1 = 1, y1 = 2, x2 = 4, y2 = 8. Rise = 6. Run = 3. Slope = 2.
| Input | Value |
|---|---|
| x1, y1 | 1, 2 |
| x2, y2 | 4, 8 |
| Slope m | 2 |
How to use the fields
- x1 and y1 are the first point.
- x2 and y2 are the second point on the same line.
Reading positive and negative slopes
Positive slope climbs as you move right. Negative slope falls as you move right. Zero slope is flat. Steeper absolute values mean a sharper tilt, whether up or down.
Common mistakes
- Subtracting coordinates in inconsistent order
- Dividing run by rise instead of rise by run
- Forcing a slope when x values are equal
- Confusing slope with the y intercept
Equation of the line
Once you have m, point slope form uses one known point: y – y1 = m(x – x1). Slope intercept form rearranges to y = mx + b after you solve for b. This calculator stops at m so you can finish the equation by hand.
Maps and grades
Road grade is often reported as a percent: multiply slope by 100. A slope of 0.05 is a 5 percent grade. Keep the raw ratio when algebra asks for m, and convert only when a percent display helps stakeholders.
Parallel and perpendicular checks
Parallel lines share the same slope. Perpendicular lines in the coordinate plane have slopes that multiply to -1 (when both are defined). Compute each line’s slope with this tool, then compare.
Classroom practice
Plot the default points and count boxes of rise and run. Seeing 6 up and 3 right makes slope 2 visual. Then change y2 and predict whether m rises or falls before recalculating.
Ask whether swapping the labels of the two points changes the answer. If both points swap together, rise and run flip signs together and m stays the same.
Data tables
When a table lists many (x, y) pairs that should be linear, pick two clear points and compute slope as a quick consistency check. Large jumps in local slope suggest measurement error or a nonlinear stretch.
Do not average many pairwise slopes blindly without a plan; regression methods belong in statistics tools.
Graph sketch habits
Plot both points before you trust a surprising slope. If the points look nearly flat but m is large, you likely swapped rise and run. Visual checks catch field order errors faster than retyping alone.
Mark the run as a horizontal segment and the rise as a vertical segment so the ratio is obvious.
Tables and sensors
Two clear points from a tidy linear table are enough for slope. Noisy sensor streams may need averaging or regression outside this tool. Use slope here as a quick sanity check, not as a full curve fit.
When units on x and y differ, state them beside m so readers know what the ratio means physically.
From slope to rate language
In word problems, slope often translates to a rate such as dollars per hour or meters per second when axes carry those units. Keep the arithmetic identical: change in y over change in x.
Say the rate in words after you compute m so the number is not left floating without meaning.
Limitations
Two points with unequal x values are required. Vertical lines return no finite slope. The tool does not fit noisy clouds of points or return intercepts automatically.