MathMarch 30, 2026

Slope Calculator Guide: How to Find and Use Slope in Math

By The hakaru Team·Last updated March 2026

Quick Answer

  • *Slope = (y&sub2; – y&sub1;) ÷ (x&sub2; – x&sub1;) — also called "rise over run."
  • *Positive slope goes up-right, negative goes down-right, zero is horizontal, undefined is vertical.
  • *In y = mx + b, the slope is m and the y-intercept is b.
  • *Parallel lines share the same slope; perpendicular slopes are negative reciprocals (their product is –1).

The Slope Formula

Slope measures how steep a line is. Given two points (x&sub1;, y&sub1;) and (x&sub2;, y&sub2;), the formula is:

m = (y&sub2; – y&sub1;) / (x&sub2; – x&sub1;)

The variable mrepresents slope by convention (likely from the French word "monter," meaning "to climb"). The numerator is the vertical change ("rise") and the denominator is the horizontal change ("run").

Worked Example

Find the slope between points (2, 3) and (8, 15):

m = (15 – 3) / (8 – 2) = 12 / 6 = 2

A slope of 2 means for every 1 unit you move right, you go up 2 units. The line rises steeply.

Types of Slope

Slope ValueDirectionLine Looks Like
Positive (m > 0)Up from left to rightAscending ↗
Negative (m < 0)Down from left to rightDescending &searr;
Zero (m = 0)FlatHorizontal →
UndefinedStraight up/downVertical ↑

The steeper the line, the larger the absolute value of the slope. A slope of 5 is steeper than a slope of 2. A slope of –3 is steeper than a slope of –1.

Slope-Intercept Form: y = mx + b

This is the most common way to write a linear equation. The slope m tells you the rate of change, and b is the y-intercept (where the line crosses the y-axis).

EquationSlope (m)Y-Intercept (b)
y = 3x + 535
y = –2x + 10–210
y = 0.5x0.50
y = –x + 7–17

If an equation is in standard form (Ax + By = C), convert it: solve for y to get slope-intercept form. The slope is always –A/B.

Parallel and Perpendicular Lines

Parallel Lines

Two lines are parallel if and only if they have the same slope. The lines y = 3x + 1 and y = 3x + 9 are parallel — they never intersect.

Perpendicular Lines

Two lines are perpendicular if their slopes are negative reciprocals. If one line has slope 2, a perpendicular line has slope –1/2. The product of perpendicular slopes always equals –1: (2) × (–1/2) = –1.

Real-World Applications of Slope

Slope isn't just an abstract math concept. It shows up everywhere:

  • Road grades: A 6% grade means the road rises 6 feet for every 100 feet horizontally. The steepest public road in the U.S. (Canton Avenue, Pittsburgh) has a grade of 37% (slope of 0.37).
  • Roof pitch: A 6:12 pitch means the roof rises 6 inches for every 12 inches of horizontal run — a slope of 0.5 or 26.6 degrees.
  • Economics: The slope of a demand curve shows how much quantity demanded changes per dollar of price change. According to basic economics principles, most demand curves have negative slopes.
  • Speed: On a distance-time graph, slope equals speed. A slope of 60 on such a graph means 60 mph.
  • ADA ramps: The Americans with Disabilities Act requires wheelchair ramps to have a maximum slope of 1:12 (one inch of rise per 12 inches of run), which equals a slope of about 0.083 or 8.3%.

Converting Between Slope Formats

Slope can be expressed as a ratio, percentage, fraction, or angle:

Slope (m)Ratio (rise:run)PercentageAngle
0.251:425%14.0°
0.501:250%26.6°
1.001:1100%45.0°
2.002:1200%63.4°

To convert slope to angle: angle = arctan(m). To convert angle to slope: m = tan(angle). A 45-degree angle always equals a slope of exactly 1.

Common Mistakes

Swapping Rise and Run

The most common error is putting x-values in the numerator instead of y-values. Remember: rise (y) is always on top, run (x) on the bottom.

Inconsistent Point Order

If you subtract y&sub2; – y&sub1; in the numerator, you must subtract x&sub2; – x&sub1; in the denominator (same order). Mixing up which point is "first" flips the sign.

Confusing Zero and Undefined Slope

Zero slope is horizontal (y doesn't change). Undefined slope is vertical (x doesn't change). Students frequently mix these up on tests.

Calculate slope between any two points

Use our free Slope Calculator →

Frequently Asked Questions

What is the formula for slope?

The slope formula is m = (y&sub2; – y&sub1;) / (x&sub2; – x&sub1;), where (x&sub1;, y&sub1;) and (x&sub2;, y&sub2;) are two points on a line. This gives the "rise over run" — the vertical change divided by the horizontal change between the two points.

What does a slope of 0 mean?

A slope of 0 means the line is perfectly horizontal — it has no vertical change. The y-value stays constant regardless of the x-value. Examples include the horizon line and a perfectly level floor.

What is an undefined slope?

An undefined slope occurs when a line is perfectly vertical. The x-values are the same for both points, making the denominator (x&sub2; – x&sub1;) equal to zero. Division by zero is undefined in mathematics, so vertical lines have no defined slope value.

How do you find the slope from an equation?

In slope-intercept form (y = mx + b), the slope is the coefficient m. For example, in y = 3x + 5, the slope is 3. If the equation is in standard form (Ax + By = C), convert to slope-intercept form: slope = –A/B.

What is the relationship between parallel and perpendicular slopes?

Parallel lines have identical slopes. If one line has slope 2, any parallel line also has slope 2. Perpendicular lines have slopes that are negative reciprocals of each other. If one line has slope 2, a perpendicular line has slope –1/2. The product of perpendicular slopes always equals –1.