Slope Calculator
1First Point
2Second Point
Breakdown
What Is a Slope Calculator?
A slope calculator takes two points on a line — (x₁, y₁) and (x₂, y₂) — and instantly tells you how steep that line is. The slope, written as m, measures how much the line rises (or falls) for every one unit it moves to the right. Alongside the slope itself, the CalcFinity slope calculator delivers everything else the two points define: the y-intercept, the full line equation in y = mx + b form, the straight-line distance between the points, their midpoint, and the angle of incline in degrees. It recalculates live as you type, and it recognizes the one case where slope breaks down — a vertical line — instead of returning a misleading number.
How It Works
Slope is rise over run: the change in y divided by the change in x. A positive slope climbs from left to right, a negative slope falls, a slope of zero is perfectly flat, and a vertical line has no defined slope at all because its run is zero — and dividing by zero is undefined.
Slope and the line equation
Rise over run, then solve for the intercept:
m = (y₂ − y₁) / (x₂ − x₁) b = y₁ − m·x₁ → y = mx + bDistance, midpoint, and angle
The same two points also give you:
d = √((x₂ − x₁)² + (y₂ − y₁)²) midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2) · θ = arctan(m)The distance formula is just the Pythagorean theorem applied to the rise and the run, and the angle of incline converts the slope into degrees measured from the horizontal — a slope of 1 is a 45° climb.
Worked Example: (2, 3) to (6, 11)
Take the calculator’s default points, (2, 3) and (6, 11). The rise is 11 − 3 = 8 and the run is 6 − 2 = 4, so the slope is 8/4 = 2: the line climbs two units for every unit it moves right. The intercept follows: b = 3 − 2×2 = −1, giving the equation y = 2x − 1. The distance between the points is √(4² + 8²) = √80 ≈ 8.944272, the midpoint sits at (4, 7), and the angle of incline is arctan(2) ≈ 63.43° — exactly what the widget shows on load.
Reverse the direction and slope flips sign: from (1, 5) to (3, 1) the rise is −4 over a run of 2, so m = −2 and the line is y = −2x + 7, falling steeply from left to right.
Where Slope Shows Up in Real Life
Slope is everywhere once you know to look for it. A wheelchair ramp that rises 1 inch for every 12 inches of run has a slope of 1/12 — the maximum the ADA allows. A roof pitch of “6 in 12” is a slope of 0.5, about 26.6°. Road signs warning of a “10% grade” describe a slope of 0.10, roughly 5.7° of incline. In data work, slope is a rate of change: dollars per month on a cost chart, degrees per decade on a climate trend, or the speed on a distance-time graph. Any time a quantity changes steadily with respect to another, the slope of the line is the rate that connects them.
Common Mistakes to Avoid
The classic error is flipping the fraction — computing run over rise instead of rise over run. A slope of 2 becomes 0.5, which turns a steep line into a shallow one. A close cousin is mixing the subtraction order: you must subtract both coordinates in the same order. (y₂ − y₁)/(x₂ − x₁) and (y₁ − y₂)/(x₁ − x₂) both work, but crossing them flips the sign of your answer.
Watch out for vertical lines, too. If both points share the same x value, the run is zero and slope is undefined — not zero, not “infinity” you can compute with. A horizontal line, by contrast, has a slope of exactly 0. Finally, don’t confuse slope with the angle: a slope of 2 is not a 2° incline. Slope is a ratio; the angle comes from arctan(m), so slopes grow much faster than their angles until the line gets steep.
Frequently Asked Questions
Why is the slope of a vertical line undefined?
Slope divides the rise by the run, and a vertical line has a run of zero — both points share the same x value. Division by zero has no defined answer, so the slope simply doesn’t exist. The calculator reports the line instead as x = constant and shows a 90° angle of incline.
What's the difference between zero slope and undefined slope?
A zero slope is a perfectly horizontal line: y never changes, so the rise is 0 and m = 0. An undefined slope is a perfectly vertical line, where the run is 0. One is flat, the other is straight up — they’re opposite extremes, not the same thing.
Can I enter decimal or negative coordinates?
Yes. Coordinates like −1.5 or 0.25 work in any of the four boxes. The calculator handles negative rises and runs correctly, and a negative slope just means the line falls from left to right.
How do I turn a slope into a percent grade?
Multiply the slope by 100. A slope of 0.08 is an 8% grade — the road rises 8 units for every 100 units of horizontal travel. To go the other way, divide the percent by 100 to get back the slope, and use arctan to convert either one into degrees.
