The short answer: slope is rise over run — the change in y divided by the change in x between two points: m = (y₂ − y₁) ÷ (x₂ − x₁). A positive slope rises to the right, a negative slope falls, a horizontal line has slope 0, and a vertical line has no defined slope because its run is zero.

Key takeaways

  • Rise over run, not run over rise. Dividing the wrong way gives the reciprocal of the slope.
  • Direction matters. Take both differences in the same order: second point minus first.
  • Slope has units. It is the unit of y per one unit of x, such as dollars per hour or feet per foot.
  • Vertical lines are the exception. Their slope is undefined, so they are written x = c, never y = mx + b.
  • Angle and grade are not slope. A 45° line has slope 1, which is a 100% grade.

Rise over run

Slope measures steepness: how much a line rises or falls for each unit it moves to the right. Given two points, m = (y₂ − y₁) ÷ (x₂ − x₁). The numerator is the rise, the denominator is the run, and the sign of the result tells you the direction. A slope of 2 means the line climbs 2 units for every 1 unit it moves right; a slope of −0.5 means it drops half a unit over the same horizontal distance.

Slope is a ratio, so it is the same anywhere along a straight line, which is why two points are enough to describe it. It is also a rate — miles per hour, dollars per hour, meters of rise per meter of run — so the number is meaningless without knowing what the axes measure.

Worked example: (1, 2) and (4, 8)

Rise = 8 − 2 = 6 and run = 4 − 1 = 3, so m = 6 ÷ 3 = 2. The line climbs 2 units for every 1 unit right. To find the y-intercept, use b = y₁ − m × x₁ = 2 − 2 × 1 = 0, so the equation is y = 2x. The same line passes through the origin, and (0, 0) is on it.

The distance between the points is √(3² + 6²) = √45 ≈ 6.71, and the angle with the horizontal is arctan(2) ≈ 63.43°. Slope, distance, and angle are three different descriptions of the same segment, which is why mixing them up produces answers that look plausible but are wrong by a wide margin.

Negative and zero slopes

A negative slope falls from left to right. From (0, 10) to (5, 0), m = (0 − 10) ÷ (5 − 0) = −2 and b = 10, so y = −2x + 10. The line loses 2 units of height per unit of horizontal travel. A slope of 0 is flat: from (0, 5) to (10, 5), the rise is 0, so m = 0 and the equation is y = 5. The distance between those points is 10, and the angle is 0°.

A zero slope is a real number, not a missing one. It means the y value never changes, which happens on any horizontal line. Writing “no slope” for a flat line is a common exam error; the line with no slope is the vertical one.

Vertical lines have no slope

From (2, 7) to (2, 10) the run is 0, so the slope formula asks you to divide by zero. That is undefined, not infinite in any usable sense, and the line is written x = 2. Every point on it shares the same x value, so there is no function y = mx + b that describes it. The distance between the two points is 3, and the angle with the horizontal is 90°.

Undefined slope and zero slope are opposites, and confusing them turns a vertical wall into a flat floor. If a calculation errors out but the points are clearly distinct, check for a repeated x value.

From slope to equation: y = mx + b

Once you have the slope and one point, b = y − m × x gives the y-intercept, and y = mx + b is the equation. For a slope of 2 through (0, 3), b = 3 and the line is y = 2x + 3; it passes through (4, 11), which checks out because 2 × 4 + 3 = 11. The point-slope form, y − y₁ = m(x − x₁), reaches the same equation without solving for b first. The y-intercept is the value of y when x is 0, which is not always meaningful: in a cost model where x is hours worked, b is the fixed charge. Read b in the units of y, and only trust it when x = 0 is inside the range of the data.

Slope as an angle and as a grade

The angle θ from the positive x-axis satisfies tan θ = m, so θ = arctan(m). A slope of 1 is 45°, a slope of 1/3 is about 18.43°, and a slope of −2 is about −63.43°. The angle is bounded between −90° and 90° for any line with a defined slope, which is another way to see that a vertical line has no slope.

Grade is the rise divided by the run expressed as a percentage, and it is not the same as degrees. A 5% grade is a slope of 0.05, which is only 2.86°; a 6% grade is 3.43°. A 1:12 accessibility ramp is an 8.33% grade, or 4.76°. Builders and engineers quote grade because it converts directly to rise per unit of run, while drivers and cyclists often think in degrees. A 100% grade is 45°, not 90°.

Slope is a rate, so it has units

Slope carries the units of the vertical axis divided by the units of the horizontal axis. If x is hours and y is dollars, a slope of 25 means $25 per hour. If both axes are lengths, the slope is dimensionless: a roof with a slope of 0.5 rises 6 inches over 12 inches of run.

This is why a graph can be misleading. Two lines can look equally steep on a stretched axis while their slopes differ by a factor of ten. Compute from the numbers, not from the apparent angle on the page.

Rounding and exact fractions

Keep the fraction when the points are integers. From (0, 0) to (3, 1), m = 1/3; writing 0.33 loses information, and three such segments accumulate visible error. 1/3 is exact, 0.3333 is approximate, and 0.33 is wrong by 1% before any further work. Round only in the final presentation, and say what you rounded to.

Angles need the same care: arctan(1/3) is 18.4349…°, so 18.43° is reasonable and 18° understates the input’s precision.

Common mistakes

  • Putting the run over the rise, which returns the reciprocal — 2 becomes 0.5.
  • Mixing subtraction orders, such as y₂ − y₁ over x₁ − x₂, which flips the sign.
  • Calling a vertical line’s slope 0 instead of undefined.
  • Confusing slope with distance or with the angle in degrees.
  • Reading steepness off a chart with unequal axis scaling.
  • Reporting grade as degrees, so a 6% ramp becomes 6° instead of 3.43°.
  • Dropping units when the axes measure different quantities.

Parallel and perpendicular lines

Parallel lines have equal slopes: y = 2x + 1 and y = 2x − 4 never meet. Perpendicular lines have slopes that multiply to −1, so a line perpendicular to slope 2 has slope −1/2. That rule comes from the tangent identity for angles 90° apart, and it fails for vertical and horizontal pairs, where one slope is undefined and the other is 0.

For a curve, slope at a point means the slope of the tangent line there, which calculus computes as the derivative. A parabola has a different slope at every point, so quoting one number only makes sense once you name the point. Straight lines are the special case where the slope is constant.

Frequently asked questions

What does a negative slope mean?

The line falls as it moves right. Each unit increase in x lowers y by the absolute value of the slope.

Why is a vertical line’s slope undefined?

Slope divides the rise by the run, and a vertical line has zero run. Division by zero is undefined, so the line is written x = c instead of y = mx + b.

How do I find the y-intercept from two points?

Compute the slope first, then b = y₁ − m × x₁ using either point. Check the result by substituting the other point.

What angle does a slope of 1 make?

45°. The arctangent of 1 is 45°, and a slope of −1 gives −45°.

Can slope be a fraction?

Yes, and it often should be. A rise of 1 over a run of 3 is 1/3, which is exact, while 0.3333 is a rounded decimal.

Is slope the same as grade?

No. Grade is the slope as a percentage. A 5% grade is a slope of 0.05, which is 2.86°, not 5°.

Further reading

Keep exploring

Read next Logarithm: Base, Product Rule, and Scale A logarithm is an exponent in disguise. Learn the definition, the product, quotient and power rules, change of… Read next Order of Operations: PEMDAS and Ambiguous Expressions PEMDAS is a shared convention, not a law of mathematics. Learn the real precedence rules, the exponent and… Read next Significant Figures: Counting, Rounding, and Precision Significant figures record how precisely a value was measured. Learn the counting rules, the addition and multiplication rules,…