CalculatorWallah logoCalculatorWallah
Article8 min read

How to Calculate Slope (& What the Number Means)

A clear guide to slope — the formula, how to calculate it from two points, how to interpret the value, and how slope connects to lines, angles, and real-world inclines.

Published: April 29, 2026Updated: April 29, 2026

Guide Oversight & Review Policy

CalculatorWallah guides are written to explain calculator assumptions, source limitations, and when users should move from a rough estimate to an official rule, institution policy, or clinician conversation.

Reviewed By

Jitendra Kumar, Founder & Editorial Standards Lead, oversees methodology standards and trust-sensitive publishing decisions.

Review editor profile

Topic Ownership

Sales tax and tax-sensitive estimate tools, Education and GPA planning calculators, Health, protein, and screening-formula pages, Platform-wide publishing standards and methodology

See ownership standards

Methodology & Updates

Page updated April 29, 2026. Trust-critical pages are reviewed when official rates or rules change. Evergreen calculator guides are checked on a recurring quarterly or annual cycle depending on topic volatility.

On This Page

What Is Slope?

Slope measures how steep a line is — how much it rises or falls for each unit of horizontal movement. It is described as "rise over run": the vertical change divided by the horizontal change between any two points on the line.

Slope appears in algebra (describing linear equations), calculus (as the derivative), engineering (road grades, roof pitches), and everyday situations (wheelchair ramp inclines, hiking trail steepness).

The symbol for slope is m, which appears in the standard line equation y = mx + b. The origin of "m" for slope is debated among mathematicians — one common explanation is that it comes from the French word monter (to climb).

The Slope Formula

Given two points on a line, (x₁, y₁) and (x₂, y₂):

m = (y₂ − y₁) ÷ (x₂ − x₁)

This is also written as:

m = Δy ÷ Δx = rise ÷ run

Where Δ (delta) means "change in." The numerator is the vertical change (rise) and the denominator is the horizontal change (run).

Note: the order of the points does not affect the value of the slope (you get the same answer either way), but you must subtract the coordinates in the same order in both the numerator and denominator.

Step-by-Step Calculation

  1. Identify two points on the line: (x₁, y₁) and (x₂, y₂).
  2. Subtract the y-coordinates: rise = y₂ − y₁.
  3. Subtract the x-coordinates: run = x₂ − x₁.
  4. Divide rise by run: m = rise ÷ run.
  5. Simplify the fraction if possible.

Check your answer: plot the two points and draw the line. A positive slope goes up to the right; a negative slope goes down to the right.

Worked Examples

Example 1 — Positive slope

Points: (1, 2) and (4, 8)

  • Rise = 8 − 2 = 6
  • Run = 4 − 1 = 3
  • Slope = 6 ÷ 3 = 2
  • Interpretation: for every 1 unit right, the line rises 2 units.

Example 2 — Negative slope

Points: (0, 5) and (3, −1)

  • Rise = −1 − 5 = −6
  • Run = 3 − 0 = 3
  • Slope = −6 ÷ 3 = −2
  • Interpretation: for every 1 unit right, the line drops 2 units.

Example 3 — Zero slope

Points: (2, 4) and (7, 4)

  • Rise = 4 − 4 = 0
  • Run = 7 − 2 = 5
  • Slope = 0 ÷ 5 = 0
  • Interpretation: horizontal line, no rise.

Example 4 — Undefined slope

Points: (3, 1) and (3, 6)

  • Rise = 6 − 1 = 5
  • Run = 3 − 3 = 0
  • Slope = 5 ÷ 0 = undefined (division by zero)
  • Interpretation: vertical line.

Interpreting the Value

  • Positive slope (m > 0) — line rises from left to right. The larger the value, the steeper the rise.
  • Negative slope (m < 0) — line falls from left to right. The more negative the value, the steeper the descent.
  • Zero slope (m = 0) — perfectly horizontal line. y does not change as x changes.
  • Undefined slope — perfectly vertical line. x does not change; you cannot divide by zero.
  • Slope of 1 or −1 — 45° angle. Equal rise and run.
  • Slope between 0 and 1 — line is more horizontal than diagonal (gentle incline).
  • Slope greater than 1 — line is more vertical than diagonal (steep incline).

Slope-Intercept Form

Once you know the slope of a line, you can write its full equation using slope-intercept form:

y = mx + b

Where m is the slope and b is the y-intercept (the y value where the line crosses the y-axis, i.e., where x = 0).

To find b when you know slope and one point (x₁, y₁):

b = y₁ − m × x₁

Example: slope m = 2, point (1, 5):

  • b = 5 − (2 × 1) = 5 − 2 = 3
  • Equation: y = 2x + 3

Real-World Applications

  • Road grades: A 6% grade means a slope of 0.06 — the road rises 6 feet for every 100 feet of horizontal distance. Highway signs warn of steep grades for truck braking purposes.
  • Roof pitch: A 4:12 pitch (common for residential roofs) means 4 inches of rise per 12 inches of run — a slope of 0.333.
  • ADA ramp compliance: The Americans with Disabilities Act requires wheelchair ramps to have a maximum slope of 1:12 (1 inch rise per 12 inches run) — a slope of 0.083.
  • Economics: The slope of a supply or demand curve shows the rate of change in quantity per unit change in price.
  • Physics: The slope of a distance-time graph is velocity. The slope of a velocity-time graph is acceleration.

Calculator

Use the slope calculator to find slope, angle, distance, midpoint, and the full line equation from any two points — without manual calculation.

Frequently Asked Questions

Slope is a measure of the steepness of a line, calculated as the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line. A slope of 2 means the line rises 2 units for every 1 unit it moves horizontally. A slope of 0 is a flat horizontal line. An undefined slope is a vertical line.

Slope (m) = (y₂ − y₁) ÷ (x₂ − x₁), also written as rise ÷ run. Given two points (x₁, y₁) and (x₂, y₂), subtract the y-coordinates to get the rise, subtract the x-coordinates to get the run, then divide. The order matters for sign but not for absolute value.

A negative slope means the line goes downward from left to right. As x increases, y decreases. For example, a slope of −3 means for every 1 unit you move right, the line drops 3 units down.

An undefined slope occurs on a vertical line where x does not change between any two points. The run (denominator) is 0, and division by zero is undefined. A vertical line has an equation of x = constant (e.g., x = 5).

The slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis). Example: y = 2x + 3 has a slope of 2 and crosses the y-axis at (0, 3). This form is the most useful for graphing and quickly identifying slope.

Angle = arctan(slope). Example: a slope of 1 corresponds to a 45° angle (arctan(1) = 45°). A slope of 2 corresponds to about 63.4°. A slope of 0.1 corresponds to about 5.7°. Calculators with an arctan (or tan⁻¹) button can do this conversion instantly.

Related Calculators

Sources & References

  1. 1.Khan Academy — Slope(Accessed April 2026)