Algebra

Finding Slope with Two Points

Last updated: March 2026 · Beginner
Before you start

You should be comfortable with:

Real-world applications
πŸ“
Carpentry

Measurements, material estimation, cutting calculations

🌑️
HVAC

Refrigerant charging, airflow, system sizing

The slope of a line measures how steep it is β€” how much the line rises or falls as you move from left to right. In practical terms, slope is a rate of change: how much one quantity changes for every unit change in another.

The Slope Formula

Given two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), the slope mm is:

m=y2βˆ’y1x2βˆ’x1=riserunm = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{rise}}{\text{run}}

  • Rise is the vertical change (difference in yy-values)
  • Run is the horizontal change (difference in xx-values)

Rise and Run Between Two Points

12345678123456789101112xyrun = 4rise = 8(2, 3)(6, 11)m = 2

It does not matter which point you call β€œpoint 1” and which you call β€œpoint 2,” as long as you are consistent β€” subtract in the same order on top and bottom.

Types of Slope

Slope TypeValue of mmWhat the Line Looks Like
Positivem>0m > 0Line goes up from left to right
Negativem<0m < 0Line goes down from left to right
Zerom=0m = 0Horizontal line (flat)
UndefinedDivision by zeroVertical line

Step-by-Step Worked Examples

Example 1: Positive Slope

Find the slope of the line through (2,3)(2, 3) and (6,11)(6, 11).

Step 1 β€” Label the points:

x1=2x_1 = 2, y1=3y_1 = 3, x2=6x_2 = 6, y2=11y_2 = 11

Step 2 β€” Substitute into the formula:

m=11βˆ’36βˆ’2=84=2m = \frac{11 - 3}{6 - 2} = \frac{8}{4} = 2

Answer: The slope is m=2m = 2. The line rises 2 units for every 1 unit you move to the right.

Example 2: Negative Slope

Find the slope of the line through (1,8)(1, 8) and (4,2)(4, 2).

Step 1 β€” Label the points:

x1=1x_1 = 1, y1=8y_1 = 8, x2=4x_2 = 4, y2=2y_2 = 2

Step 2 β€” Substitute into the formula:

m=2βˆ’84βˆ’1=βˆ’63=βˆ’2m = \frac{2 - 8}{4 - 1} = \frac{-6}{3} = -2

Answer: The slope is m=βˆ’2m = -2. The line falls 2 units for every 1 unit you move to the right.

Example 3: Zero Slope (Horizontal Line)

Find the slope of the line through (3,5)(3, 5) and (9,5)(9, 5).

m=5βˆ’59βˆ’3=06=0m = \frac{5 - 5}{9 - 3} = \frac{0}{6} = 0

Answer: The slope is m=0m = 0. Both points have the same yy-value, so the line is perfectly horizontal.

Example 4: Undefined Slope (Vertical Line)

Find the slope of the line through (4,1)(4, 1) and (4,7)(4, 7).

m=7βˆ’14βˆ’4=60=undefinedm = \frac{7 - 1}{4 - 4} = \frac{6}{0} = \text{undefined}

Answer: The slope is undefined. Both points have the same xx-value, so the line is vertical. You cannot divide by zero.

Slope as Rate of Change

In real-world applications, slope represents how one measurement changes relative to another:

  • Temperature rising 3 degrees per hour is a slope of 3
  • A budget decreasing by $50 per week is a slope of βˆ’50-50
  • A flat fee that stays the same regardless of quantity is a slope of 0

The units of slope are always unitsΒ ofΒ yunitsΒ ofΒ x\frac{\text{units of } y}{\text{units of } x}.

Real-World Application: Carpentry β€” Calculating Roof Pitch

A carpenter needs to determine the pitch (slope) of a roof. The roof rises from a point at the edge of the wall to the peak. Measurements show:

  • At the wall edge (horizontal distance 0 ft from the wall), the roof height is 8 ft
  • At 12 ft horizontally from the wall, the roof height is 14 ft

Using the two points (0,8)(0, 8) and (12,14)(12, 14):

m=14βˆ’812βˆ’0=612=12m = \frac{14 - 8}{12 - 0} = \frac{6}{12} = \frac{1}{2}

In construction, this is expressed as a 6:12 pitch β€” the roof rises 6 inches for every 12 inches of horizontal run. A 6:12 pitch is a moderate slope suitable for most roofing materials including standard shingles. The carpenter uses this value to calculate rafter lengths, material quantities, and to verify the roof meets building code requirements for water drainage.

Common Mistakes to Avoid

  1. Swapping the order of subtraction. If you subtract y1y_1 from y2y_2 in the numerator, you must subtract x1x_1 from x2x_2 in the denominator β€” not the other way around.

    y2βˆ’y1x1βˆ’x2isΒ wrongΒ β€”Β thisΒ flipsΒ theΒ sign\frac{y_2 - y_1}{x_1 - x_2} \quad \text{is wrong β€” this flips the sign}

  2. Confusing β€œno slope” with β€œzero slope.” A horizontal line has zero slope (the number 0). A vertical line has undefined slope (no number at all). These are very different.

  3. Forgetting negative signs. When a point has a negative coordinate, be careful with subtraction: 3βˆ’(βˆ’2)=3+2=53 - (-2) = 3 + 2 = 5.

Practice Problems

Test your understanding with these problems. Click to reveal each answer.

Problem 1: Find the slope through (1,4)(1, 4) and (5,12)(5, 12).

m=12βˆ’45βˆ’1=84=2m = \frac{12 - 4}{5 - 1} = \frac{8}{4} = 2

Answer: m=2m = 2

Problem 2: Find the slope through (βˆ’3,7)(-3, 7) and (2,βˆ’3)(2, -3).

m=βˆ’3βˆ’72βˆ’(βˆ’3)=βˆ’105=βˆ’2m = \frac{-3 - 7}{2 - (-3)} = \frac{-10}{5} = -2

Answer: m=βˆ’2m = -2

Problem 3: Find the slope through (0,5)(0, 5) and (8,5)(8, 5).

m=5βˆ’58βˆ’0=08=0m = \frac{5 - 5}{8 - 0} = \frac{0}{8} = 0

Answer: m=0m = 0 (horizontal line)

Problem 4: A ramp rises from ground level to a loading dock 3 feet high over a horizontal distance of 36 feet. What is the slope?

Points: (0,0)(0, 0) and (36,3)(36, 3)

m=3βˆ’036βˆ’0=336=112m = \frac{3 - 0}{36 - 0} = \frac{3}{36} = \frac{1}{12}

Answer: m=112m = \frac{1}{12}. The ramp rises 1 inch for every 12 inches of run, which meets ADA accessibility guidelines (maximum 1:12 slope).

Problem 5: An HVAC technician records that a room was 58 degrees F at 8:00 AM and 72 degrees F at 8:28 AM after turning on the heater. What is the rate of temperature change per minute?

Points: (0,58)(0, 58) and (28,72)(28, 72)

m=72βˆ’5828βˆ’0=1428=0.5m = \frac{72 - 58}{28 - 0} = \frac{14}{28} = 0.5

Answer: The temperature rises at 0.5 degrees F per minute.

Key Takeaways

  • The slope formula is m=y2βˆ’y1x2βˆ’x1m = \frac{y_2 - y_1}{x_2 - x_1} β€” rise over run
  • Positive slope means the line goes up; negative slope means it goes down
  • Zero slope is a horizontal line; undefined slope is a vertical line
  • Slope is a rate of change β€” it tells you how fast one quantity changes relative to another
  • Always subtract in the same order in both the numerator and denominator

Return to Algebra for more topics in this section.

Last updated: March 28, 2026