Find the slope between two points with step-by-step solution, angle, and line equation.
Slope is one of the most fundamental concepts in algebra and coordinate geometry. It measures how steeply a line rises or falls and in what direction, giving you a single number that captures the character of any straight line. Slope appears in physics (velocity as slope of position vs time), economics (marginal cost as slope of cost curve), engineering (roof pitch, road grade, wheelchair ramp), statistics (regression coefficients), and every calculus problem involving derivatives. This calculator solves for slope from any two points on a line and shows you the step-by-step working, plus the line's angle of inclination, y-intercept, and the full slope-intercept equation.
The slope formula states that for any two points (x1, y1) and (x2, y2) on a line, the slope m equals the change in y divided by the change in x: m = (y2 - y1) / (x2 - x1). This is often stated as "rise over run" — rise being the vertical change (change in y) and run being the horizontal change (change in x). The formula produces a number that tells you both the steepness and direction of the line. A key property of slope is that it is constant along a line — any two points on the same line will give the same slope value. This lets you verify slope calculations by picking different point pairs. The formula uses signed numbers, so the sign of the result matters. Positive slope means the line rises from left to right. Negative slope means the line falls from left to right. Zero slope means a horizontal line. Undefined slope (when x2 equals x1, giving division by zero) means a vertical line. Our scientific calculator handles the arithmetic when your point coordinates involve fractions or decimals, and our quadratic formula calculator solves related algebra problems on curves rather than straight lines.
| Slope Value | Direction | Visual Description |
|---|---|---|
| m > 0 (positive) | Rising left to right | Line goes up as x increases |
| m < 0 (negative) | Falling left to right | Line goes down as x increases |
| m = 0 | Horizontal | Flat line, no vertical change |
| m = undefined | Vertical | Straight up/down, no horizontal change |
| |m| < 1 | Gentle slope | Line changes gradually |
| |m| = 1 | 45 degree angle | Rise equals run |
| |m| > 1 | Steep slope | Rises/falls sharply |
Calculating slope from two points follows a simple three-step process. Step 1: label your points clearly. Call one point (x1, y1) and the other (x2, y2). The choice doesn't matter mathematically — you get the same slope either way — but you must be consistent throughout the calculation. Step 2: calculate the rise (change in y). Subtract y1 from y2. Watch signs carefully — subtracting a negative gives a positive. Step 3: calculate the run (change in x). Subtract x1 from x2, in the same order as step 2. Divide rise by run to get slope. Example: find slope from (2, 3) to (5, 9). Rise = 9 - 3 = 6. Run = 5 - 2 = 3. Slope = 6/3 = 2. The line rises 2 units for every 1 unit horizontal. Another example with negative slope: (1, 8) to (5, 2). Rise = 2 - 8 = -6. Run = 5 - 1 = 4. Slope = -6/4 = -1.5. The line falls 1.5 units for every 1 unit horizontal. Common mistake: subtracting coordinates in different orders (using y2 - y1 for rise but x1 - x2 for run) — this gives the negative of the correct answer. Always subtract in the same order. Our fraction calculator helps when slope results are fractions like 3/4 or 5/2.
Once you know the slope, you can write the equation of the line in slope-intercept form: y = mx + b, where m is the slope and b is the y-intercept (the y-value where the line crosses the y-axis, at x = 0). To find b from a point and slope, substitute the point's coordinates and solve. Example: slope m = 2 through point (3, 8). Substitute: 8 = 2(3) + b. Solve: 8 = 6 + b, so b = 2. Equation: y = 2x + 2. This is the most useful line equation form because you can immediately read the slope (2) and starting point (0, 2) from the equation. Other forms exist. Point-slope form: y - y1 = m(x - x1), useful when you know a point and slope but not the y-intercept. Standard form: Ax + By = C, useful for certain algebraic manipulations. Two-point form: (y - y1) / (x - x1) = (y2 - y1) / (x2 - x1), useful when you have two points but want an equation directly. All three forms represent the same line and can be algebraically converted between each other. Slope-intercept is preferred for graphing, standard form for algebraic work, point-slope for calculus applications.
| Line Equation Form | Formula | Best For |
|---|---|---|
| Slope-intercept | y = mx + b | Graphing, reading slope + intercept |
| Point-slope | y - y1 = m(x - x1) | Known point and slope |
| Standard | Ax + By = C | Systems of equations, intercepts |
| Two-point | Uses both (x1, y1) and (x2, y2) | Two known points on the line |
| Horizontal line | y = c (constant) | Zero slope, y stays same |
| Vertical line | x = c (constant) | Undefined slope, x stays same |
Slope and angle of inclination are two ways to describe the same steepness. Convert between them using the arctangent function: angle = arctan(slope). Since tangent equals opposite over adjacent (rise over run), this makes intuitive sense — the angle of inclination is exactly the angle whose tangent equals the slope. Common conversions: slope 0 gives 0 degrees. Slope 0.577 gives 30 degrees. Slope 1 gives 45 degrees. Slope 1.732 gives 60 degrees. Slope of positive infinity (undefined, vertical) gives 90 degrees. Negative slopes give negative angles (or equivalently, angles between 90 and 180 degrees depending on convention). This conversion matters for real-world applications where slope is often described in degrees rather than rise/run ratios. Ski trail difficulty ratings use slope angles. Roof pitches are often described both as angle (30-degree roof) and as ratio (7/12 pitch). Wheelchair ramp regulations require slopes no steeper than 4.76 degrees (which equals slope 1:12). Our triangle calculator handles related trigonometry problems including angle calculations.
Slope shows up constantly outside math class. Roof pitch is described as rise per 12 inches of horizontal run — a 4:12 pitch means 4 inches rise per 12 inches run (slope of 1/3 or about 18 degrees). Steeper pitches shed water better but are harder to work on. Standard residential roofs range from 4:12 to 9:12. Road grades are expressed as slope percentage — a 6 percent grade means 6 units rise per 100 horizontal units (slope 0.06, angle 3.4 degrees). Highways typically limit grades to 6 percent maximum. Mountain roads sometimes reach 10 to 15 percent grade. Wheelchair ramps under ADA regulations must have slope no greater than 1:12 (about 8.3 percent, 4.76 degrees) — 1 inch of rise per 12 inches of run. Longer runs are required for taller rises, with landings required at intervals. Ski slope difficulty uses slope angle: green (beginner) 6-25 percent (3-14 degrees), blue (intermediate) 25-40 percent (14-22 degrees), black (advanced) 40+ percent (22+ degrees), double black over 60 percent (31+ degrees). Stairs use slope indirectly through step ratios: 7 inch rise and 11 inch tread gives slope of 7/11 or about 32 degrees. Physics uses slope constantly: position-time graph slope equals velocity, velocity-time graph slope equals acceleration, force-distance graph slope equals stiffness. Our percentage calculator handles slope-to-percentage conversions for road grade or roof pitch problems.
Several mistakes trip up students. Confusing rise and run — rise is vertical (y-values), run is horizontal (x-values). If you flip them, you get the reciprocal of the correct slope. Subtracting in inconsistent orders — if you use y2 minus y1 for rise, you must use x2 minus x1 for run. Doing y1 minus y2 for rise and x2 minus x1 for run gives the negative of the correct answer. Not handling negative coordinates correctly. Going from (-3, 2) to (5, 8): rise = 8 - 2 = 6, run = 5 - (-3) = 8. Slope = 6/8 = 3/4. Many students forget the "minus negative equals plus" rule. Confusing slope 0 with undefined slope. Slope 0 is horizontal (no rise). Undefined slope is vertical (no run, division by zero). They are opposite cases, not the same thing. Confusing slope-intercept form with point-slope form. Slope-intercept: y = mx + b (b is y-intercept). Point-slope: y - y1 = m(x - x1) (uses any point, not just y-intercept). Forgetting that vertical lines don't have slope-intercept form since their slope is undefined — they use x = c instead. Attempting to find slope of a curve using the two-point formula — this only works for straight lines. Curves have slope that changes at every point (that's what derivatives calculate in calculus). Our quadratic formula calculator works with curved equations where slope is not constant.