How to Find the Slope of a Line
Slope is the number that captures how steep a line is and which way it leans: how many units y changes for each unit x changes. A slope of 2 means “up 2, right 1”; a slope of −1/2 means “down 1, right 2”. This calculator finds that number two ways — from any two points on the line, or straight from the line’s equation. Enter the coordinates x₁, y₁, x₂ and y₂, or switch to the equation tab and type something like y = 3x − 2, and it returns the slope m along with the rise, the run and the subtractions in between.
From Two Points
Subtract the y-values (rise), subtract the x-values (run), then divide. Keep the point order consistent — (y₂ − y₁)/(x₂ − x₁) gives the same answer whichever point you call “first”.
Reading the Formula, Symbol by Symbol
The formula is m = (y₂ − y₁) ÷ (x₂ − x₁). The letter m is the slope itself. The pair (x₁, y₁) names one point on the line: x₁ is its horizontal position, y₁ its height. The pair (x₂, y₂) names a second point the same way. The top of the fraction, y₂ − y₁, is the rise — how far the line climbs between the points. The bottom, x₂ − x₁, is the run — how far it travels sideways. Slope is rise measured against run.
From an Equation
In y = mx + b the slope is staring at you: it is m. Parallel lines share the same slope; perpendicular lines have slopes that multiply to −1 (negative reciprocals).
How to Use This Calculator
- Pick a mode with the tabs at the top of the tool: “From two points” or “From equation”.
- Points mode: fill the four boxes — x₁ and y₁ for the first point, x₂ and y₂ for the second. The starting values, (1, 2) and (5, 10), produce a slope of 2.
- Equation mode: type the line into the Line equation box, either as y = 3x − 2 or in standard form, like 2x + 3y = 6.
- Press Find Slope. The panel below states the slope, walks through the rise and run substitutions, and tells you whether the line rises, falls, sits flat, or stands vertical.
Worked Example 1: Slope Through (2, 3) and (6, 11)
Plotting these two points shows a line climbing steadily to the right, so we expect a positive slope of moderate steepness before we calculate anything.
- Label the points: (x₁, y₁) = (2, 3) and (x₂, y₂) = (6, 11). Labelling first prevents the classic mix-up of subtracting in different orders.
- Find the rise: y₂ − y₁ = 11 − 3 = 8.
- Find the run: x₂ − x₁ = 6 − 2 = 4.
- Divide: m = 8 ÷ 4 = 2.
- Sanity-check by swapping the points: (3 − 11) ÷ (2 − 6) = (−8) ÷ (−4) = 2. Same answer — and the line does climb 2 for every 1 across, matching the picture.
A slope of 2 also makes a prediction you can test: a third point such as (3, 5) should sit on the same line, and it does — from (2, 3), one step right and two steps up lands exactly on (3, 5).
Worked Example 2: Slope of 2x + 3y = 6
Nothing here is labelled m, because the equation is in standard form. Two routes lead to the slope, and doing both gives you a built-in check.
- Shortcut: for ax + by = c the slope is −a/b. Here a = 2 and b = 3, so m = −2/3.
- Long way, to confirm: solve for y. Subtract 2x from both sides: 3y = −2x + 6. Divide every term by 3: y = −(2/3)x + 2. The coefficient of x is −2/3 — the same value.
- Cross-check with two points: when x = 0 the line gives y = 2, and when x = 3 it gives y = 0. The slope between (0, 2) and (3, 0) is (0 − 2) ÷ (3 − 0) = −2/3. ✓
The negative sign matches the graph: this line falls as you move right, dropping 2 units for every 3 units across.
Slope Outside the Classroom
Slope is a rate, and rates are everywhere. Road engineers express a hill’s steepness as a gradient — rise over run — and a “1 in 10” warning sign is a slope of 0.1. Builders set roof pitch and wheelchair-ramp angles from the same ratio, and building codes cap how steep a ramp may be. On a distance–time graph, slope is speed; on a price chart, it is the rate at which a cost is climbing. Even a plumber judging whether a drain falls enough for water to run is, without naming it, checking a slope.
Three Slope Mistakes to Watch For
- Subtracting in mismatched order. (y₂ − y₁) over (x₁ − x₂) flips the sign and turns an uphill line downhill; whichever point you start with on top, start with the same point on the bottom.
- Dividing run by rise. Slope is rise ÷ run, in that order — inverting the fraction turns a gentle slope of 1/4 into a cliff of 4.
- Calling a vertical line slope zero. A vertical line has run 0, and dividing by zero is undefined, not zero; zero slope belongs to flat, horizontal lines.
Worked Example 3: The Full Equation of a Line Through Two Points
Slope is usually only half the question — the real goal is the line's equation. Take the points (1, 2) and (4, 8) and build the whole thing:
- Find the slope: m = (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2. The line climbs two units for every unit it moves right.
- Use point-slope form: with the point (1, 2), y − 2 = 2(x − 1). Point-slope form is built for exactly this job — a slope and one point are all it asks for.
- Rearrange into slope-intercept form: y − 2 = 2x − 2, so y = 2x + 0 — the equation is simply y = 2x, and the intercept b is 0.
- Verify with the second point: at x = 4, y = 2 × 4 = 8 ✓ — the equation reproduces (4, 8), and at x = 1 it gives 2 ✓. An equation that fails this check has an arithmetic slip in step 1 or 3.
The same routine works for any pair of points: slope first, point-slope second, rearrange last. Keep the definitions beside you in our slope formula reference, measure how far apart the two points are with the distance formula calculator, and see the formal definition at Wolfram MathWorld.
Once you have the slope, solve for intercepts with our equation solver or simplify line expressions with the algebra calculator.