To find the slope between two points, divide the change in y by the change in x: m = (y₂ − y₁) ÷ (x₂ − x₁). Take the two ordered pairs in any order, as long as you subtract in the same direction for both coordinates. For the points (2, 3) and (6, 11), the slope is (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2. A positive result rises to the right, a negative result falls, a zero result is a flat horizontal line, and an undefined result signals a vertical line. Keep both points ordered the same way and the arithmetic handles itself.

Read the Formula Before Touching the Numbers

The slope formula m = (y₂ − y₁) ÷ (x₂ − x₁) compares vertical change to horizontal change. The numerator measures how far the line climbs or drops; the denominator measures how far it moves sideways. Both differences must come from the same pairing of points — point 2 minus point 1 in both rows, or point 1 minus point 2 in both rows. Mixing directions flips the sign and quietly corrupts the answer.

Label your points first. Write P₁ = (x₁, y₁) and P₂ = (x₂, y₂) directly above your scratch work, then fill in the values. This single habit prevents the most common error in slope problems: swapping a y-value into an x-slot. The subscripts do no mathematics — they just enforce consistent subtraction.

Slope carries units of "y per x." If x is hours and y is dollars, a slope of 15 means $15 earned per hour. That unit reading is often the fastest sanity check available. A slope of 2 on a distance-versus-time graph is 2 units of distance per 1 unit of time, never "2 units total."

Memorize the horizontal and vertical special cases before practicing. A horizontal line through (1, 4) and (7, 4) gives (4 − 4) ÷ (7 − 1) = 0. A vertical line through (3, 2) and (3, 9) gives (9 − 2) ÷ (3 − 3) = 7 ÷ 0, which is undefined, not zero. Treating those two results as interchangeable is a sign error students carry into calculus.

Follow Six Steps in Order for a Clean Answer

Here's the full procedure, using A = (2, 3) and B = (6, 11) throughout. The order matters less than the consistency, but this sequence catches mistakes before they compound.

1: Write both points as ordered pairs. A = (2, 3) and B = (6, 11), with x first and y second. 2: Assign one point as P₁ and the other as P₂. Let P₁ = (2, 3) and P₂ = (6, 11). Either choice works. 3: Subtract the y-values. y₂ − y₁ = 11 − 3 = 8, the rise. 4: Subtract the x-values in the same order. x₂ − x₁ = 6 − 2 = 4, the run. 5: Divide the rise by the run. m = 8 ÷ 4 = 2. 6: Check the sign against the graph. Moving from x = 2 to x = 6, the line goes up, so a positive slope of 2 is plausible.

If step 5 produces a fraction, simplify it but keep the exact value. A slope of 8/6 reduces to 4/3, and that reduced fraction is the standard answer form. If you reverse the assignment — P₁ = (6, 11) and P₂ = (2, 3) — you get (−8) ÷ (−4) = 2, identical to before. Both negatives cancel.

Failure handling breaks into three checks. If the denominator is zero, stop: the line is vertical and the slope is undefined, which is a valid answer. If a value with a negative sign is squared away, re-read the original pair — squared terms never appear in this formula. If the answer disagrees with what the graph shows, redo the subtraction rather than the division, since sign errors cluster in subtraction.

Run One Worked Example All the Way to a Graph

Take the points (−3, 7) and (5, −1). Label P₁ = (−3, 7) and P₂ = (5, −1). The rise is y₂ − y₁ = −1 − 7 = −8. The run is x₂ − x₁ = 5 − (−3) = 5 + 3 = 8. Slope: m = −8 ÷ 8 = −1.

Plot both points on graph paper and draw the segment between them. From (−3, 7) to (5, −1), the line drops 8 units while moving right 8 units. A slope of −1 matches the picture: a 45-degree downhill line, falling exactly as fast as it moves right.

Subtracting a negative is where most errors enter. The run of 5 − (−3) equals 8, not 2. Students who treat the minus sign as an operation on the whole term get a run of 8 and a slope of −1 by luck; others write 5 − 3 = 2 and land on −4. Distribute the negative first, then add.

Verify with point-slope form: y − 7 = −1(x + 3). Plugging in x = 5 gives y = 7 − 1(8) = −1, which matches P₂. That plug-back is the cheapest proof available and catches sign flips before a teacher does. The same check works with any slope you compute.

Interpret Negative, Zero, and Undefined Results Correctly

The sign of m tells you the line's direction, and the magnitude tells you its steepness. A slope of 3 climbs three units for every one unit right; a slope of −3 drops three units per unit right. Compare the absolute values to rank steepness across two lines.

Slope value Line behavior Example points Rise ÷ run
m = 4 Steep uphill (0, 0), (1, 4) 4 ÷ 1
m = 0.25 Shallow uphill (0, 0), (4, 1) 1 ÷ 4
m = 0 Horizontal (1, 5), (9, 5) 0 ÷ 8
m = −2 Downhill (2, 6), (5, 0) −6 ÷ 3
Undefined Vertical (4, 1), (4, 8) 7 ÷ 0

Matching slopes mean parallel lines; there's a known relationship: parallel lines have equal slopes, while perpendicular lines have negative reciprocal slopes. A slope of 3 pairs with a perpendicular slope of −1/3. This reciprocal rule is why the vertical-horizontal pair matters: their product is undefined rather than −1, which is the exception worth remembering.

Batch the Arithmetic With a Repeatable Table

Fill a two-column table before you divide. Write both original pairs, the two differences, and the simplified slope. That table is auditable in a way mental arithmetic is not.

Point 1 Point 2 Δy Δx Slope m Type
(3, 4) (7, 12) 8 4 2 Rising
(1, 10) (6, 0) −10 5 −2 Falling
(−2, 3) (−2, 9) 6 0 Undefined Vertical
(0, 0) (5, 0) 0 5 0 Horizontal
(−4, −1) (2, −7) −6 6 −1 Falling

Track the subtraction in a table and the sign errors show up before the division. In the last row, −7 − (−1) = −6 while 2 − (−4) = 6, and the negative result converges to −1.

A spreadsheet reduces this to two formulas. In Excel, =SLOPE(B2:B3, A2:A3) returns the slope of the regression line through the two rows, matching the hand calculation exactly. In Google Sheets, the same function works identically. For exactly two points, the regression line passes through both, so the spreadsheet and the formula agree — a useful cross-check on a longer dataset.

Slope in Statistics: Why the Same Division Shows Up Everywhere

Linear regression uses the identical division: the slope of a best-fit line is the change in predicted y per one-unit change in x. A slope of 12 in a regression of test scores on study hours means each additional hour predicts 12 more points. The interpretation is identical to the algebra classroom, but the points come from a dataset rather than a graph.

R-squared is the number that differs. In an algebra problem, two points sit exactly on one line, so there's no scatter. In regression, r² measures how much of the y-variation the line explains. A slope of 12 with r² = 0.9 describes a strong fit; the same slope with r² = 0.15 means the relationship wanders. The slope itself carries no reliability claim — check r² or a residual plot before trusting it.

Perpendicular lines and best-fit lines aren't the same thing, though both involve slope. A best-fit line may not pass through any single data point, while the two-point line passes through both. Some students conflate them when reviewing for exams; keep the definitions separate.

Six Edge Cases That Break Careless Answers

Duplicate x-values defeat the formula. The points (5, 2) and (5, 11) give 9 ÷ 0, which is undefined. This isn't an error — it's the answer, and writing "0" earns no credit. Duplicate y-values, by contrast, give a valid slope of 0.

Subtracting from a smaller x yields a negative denominator and, if the numerator is not also negative, a negative slope. That's correct behavior. There's no requirement that x₂ exceed x₁; the sign simply reflects direction.

Points with negative coordinates need careful parentheses. Determine (−3, 5) minus (−7, 2): x-difference = −3 − (−7) = 4, y-difference = 5 − 2 = 3, slope = 3/4. Missing the double negative produces −10/4, badly wrong.

Slope from a table rather than a pair requires picking two distinct rows — not adjacent ones necessarily. A table of values with x = 1, 2, 3, 4 and y = 3, 6, 9, 12 yields slope 3 from any pair of columns; a constant slope confirms the table is linear. Non-constant slopes signal a curve.

Decimal points degrade accuracy if rounded too early. Points (0.75, 1.25) and (2.25, 4.25) give (4.25 − 1.25) ÷ (2.25 − 0.75) = 3 ÷ 1.5, exactly 2 if you keep decimals or convert to fractions like 12/4 ÷ 6/4. Rounded to one decimal, the same work gives 3 ÷ 1.5 = 2, fine here, but rounding mid-subtraction in other cases shifts the result beyond the answer tolerance.

Reading a graph without point labels introduces a fourth risk. Count grid squares rather than estimate. A point four squares up and two squares right of another gives slope 2, but a point misread by half a square gives 4.5 ÷ 2 = 2.25 — a visibly different answer. Confirm both points with the axis labels before dividing.

Use the Slope to Write the Line Equation

Slope has a second life: it anchors the line equation. Once m is known and one point is in hand, point-slope form is y − y₁ = m(x − x₁). From slope m = 2 and point (2, 3), that's y − 3 = 2(x − 2), simplifying to y = 2x − 1.

Convert to slope-intercept form (y = mx + b) by distributing and solving for y. In this example, y − 3 = 2x − 4 gives y = 2x − 1. The intercept b = −1 is where the line crosses the y-axis. Verify by plugging x = 0 into y = 2x − 1: y = −1, which matches the intercept.

Slope-intercept form lets you check a slope answer directly. If you plot y = 2x − 1 and the two original points (2, 3) and (6, 11) both land on it, the slope is confirmed. A point that misses the line signals an arithmetic issue elsewhere.

Data science curves occasionally use the distance formula and slope together, but keep the tools separate. The distance formula measures how far apart two points are, while slope measures the angle. A steep line can have a short length; a shallow line can run across the page.

Checking Your Answer Without a Calculator

Here are three checks that catch most errors. Slope sign should match the visual rise or fall — if two points with the left one higher yield a positive slope, something reversed. Slope magnitude should roughly match the steepness: a slope of 20 between points 1 x-unit apart looks nearly vertical. And plug the slope back into point-slope form using the other point, which returns a true statement for a correct answer.

For word problems, restate the rate. A slope of 60 on a distance-versus-time plot where y is miles and x is hours describes 60 miles per hour. If the answer "60 miles per hour" makes no sense in context — say, a walking graph — the points may be mislabeled.

Symmetric rounding is the last habit worth building. If the problem gives decimals to one decimal place, report the slope to one decimal place unless the instructions say otherwise. Reporting four decimal places from one-place inputs overstates precision and often loses marks on standardized tests.

FAQ

Can I subtract the points in the reverse order and still get the right slope?

Yes, provided you subtract in the same direction for both coordinates. Swapping P₁ and P₂ multiplies both numerator and denominator by −1, so the ratio is unchanged. That's why the assignment order is a convention, not a rule, and why you rarely lose credit for choosing "wrong."

Is a slope of zero the same as an undefined slope?

No, and the difference is structural. Zero slope comes from zero rise (y₂ − y₁ = 0) over a nonzero run, producing a horizontal line. Undefined slope comes from any nonzero rise over a zero run (x₂ − x₁ = 0), producing a vertical line. One is a flat road; the other is a cliff face.

What if the two points are identical?

Then x₂ − x₁ = 0 and y₂ − y₁ = 0, producing 0 ÷ 0, which is an indeterminate form. A single point cannot define a line, so the question is malformed rather than unanswerable. Check the problem statement for a transcription error before proceeding.

How does the slope relate to a linear regression slope computed in Excel?

Both are Δy ÷ Δx when the data is perfectly linear. With scattered data, the regression slope is the least-squares best fit rather than a two-point difference, so =SLOPE() returns a value that may not pass through any original point. Verify fit quality with the spreadsheet's RSQ function, which returns r².

Does the slope between two points depend on which is "point 1"?

Only in sign, and only if you mix the subtraction order. Subtract both coordinates as P₂ minus P₁ or both as P₁ minus P₂, and the sign stays consistent. Mix orders — y as P₂ − P₁ but x as P₁ − P₂ — and the sign flips, which is the single most common calculator error.

What is the slope between (4, 5) and (4, 20)?

It's undefined, because the x-values are identical and the run is zero. This is not a failure to compute; it's the correct classification of a vertical line. If a graphing tool returns "infinity," treat that display as a software quirk rather than the mathematical answer.