Enter the x and y coordinates of two points. Negative numbers are fine.
Know the slope and one point? Find the full line equation in y = mx + b form.
Enter a slope value to analyse its properties: angle, grade, perpendicular slope, and interpretation.
Was this calculator helpful?
Sources & Methodology
Slope: m = (y₂ − y₁) / (x₂ − x₁) Y-intercept: b = y₁ − m × x₁ Distance: d = √((x₂−x₁)² + (y₂−y₁)²) Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2) Perpendicular slope: m⊥ = −1/m Angle: θ = arctan(|m|) in degrees isFinite guard on all results. Vertical line (x₁=x₂) handled as undefined slope. IEEE 754 double precision.
Last reviewed: April 2026
Slope, Rise Over Run & Line Equations — Everything You Need to Know
If there’s one concept that ties together algebra, geometry, trigonometry, and calculus, it’s slope. Once you genuinely understand what slope means — not just as a formula but as a rate of change — a huge chunk of mathematics suddenly makes sense. This guide covers everything from the basic rise-over-run definition all the way to parallel lines, perpendicular lines, and why slope even matters beyond the classroom.
Rise = 7 − 3 = 4 | Run = 6 − 2 = 4
Slope m = 4/4 = 1 (45° angle, going up to the right)
Y-intercept: b = 3 − (1)(2) = 1
Line equation: y = x + 1
What Is Slope, Really? (And Why Rise Over Run Makes Sense)
Slope is a ratio — specifically, how much a line rises vertically for every unit it moves horizontally. That’s all rise over run means. If a line has slope 3, it rises 3 units for every 1 unit you move right. If the slope is 0.5, it rises 1 unit for every 2 you move right. Negative slope works the same way, except the line falls instead of rises. A road with a 5% grade has a slope of 0.05 — it rises 5 feet for every 100 feet of horizontal distance. That’s a real-world slope that engineers, builders, and highway designers use every day.
The formula itself — m = (y₂ − y₁) / (x₂ − x₁) — is just formalising that ratio. Pick any two points on a line, subtract the y-coordinates (that’s your rise), subtract the x-coordinates (that’s your run), and divide. The order matters: y₂ − y₁ over x₂ − x₁, using the same point as the “second” for both. Flip the order of both points consistently and you get the same answer.
The Four Types of Slope Every Student Needs to Know
There are exactly four types of slope, and understanding them visually is as important as the formula:
- Positive slope: Line rises from left to right. The larger the number, the steeper the rise. Slope 1 = 45°. Slope 10 = nearly vertical.
- Negative slope: Line falls from left to right. Slope −1 = 45° downward. Slope −3 falls steeply. Used in finance to show declining values, in physics to show deceleration.
- Zero slope: Perfectly horizontal line. The equation is always y = constant. No matter how far left or right you go, y doesn’t change. Example: y = 4.
- Undefined slope: Perfectly vertical line. You’re dividing by zero (run = 0), so slope can’t be calculated. The equation is always x = constant. Example: x = 5.
Slope Reference Table — Common Values and Their Meaning
| Slope (m) | Direction | Angle | Equation Form | Real-World Example |
|---|---|---|---|---|
| 0 | Horizontal | 0° | y = b | A flat road, sea level |
| 0.06 | Gentle rise | ~3.4° | y = 0.06x + b | Maximum US highway grade |
| 0.5 | Moderate rise | ~26.6° | y = 0.5x + b | Gentle ski slope |
| 1 | 45° rise | 45° | y = x + b | Staircase at 1:1 ratio |
| 2 | Steep rise | ~63.4° | y = 2x + b | Steep trail, 200% grade |
| −1 | 45° fall | 45° down | y = −x + b | Equal decline, mirrored rise |
| undefined | Vertical | 90° | x = a | Vertical cliff, plumb line |
Slope-Intercept Form (y = mx + b): Writing Line Equations
Once you have the slope, writing the full line equation in slope-intercept form is just one more step. The form is y = mx + b, where m is slope and b is the y-intercept (the point where the line crosses the y-axis). To find b, substitute the slope and one known point: b = y − mx. That’s it. Example: slope = 3, point (2, 7). Then b = 7 − 3(2) = 7 − 6 = 1. Equation: y = 3x + 1. You can verify by plugging the point back in: 7 = 3(2) + 1 = 7. Correct.
Slope-intercept form is the most useful format for graphing. The b value tells you exactly where to start on the y-axis. Then use the slope to find the next point: from the y-intercept, move right by 1 (the run) and up by m (the rise). Connect those dots and you have the line.
Distance and Midpoint: The Bonus Calculations
Two points give you more than just a slope — they define a line segment with a specific length and a centre point. The distance formula d = √((x₂−x₁)² + (y₂−y₁)²) is just the Pythagorean theorem applied to coordinate geometry. The horizontal distance is your run, the vertical distance is your rise, and the hypotenuse is the actual length between the points. Example: (1, 1) to (4, 5). Run = 3, Rise = 4, Distance = √(9+16) = √25 = 5. The midpoint formula splits this segment equally: M = ((x₁+x₂)/2, (y₁+y₂)/2).