Home/Mathematics/Slope Formula

Formula & Calculator

Slope Formula

Calculates the steepness (slope) of a line passing through two points on a coordinate plane.

MathematicsAlgebraDaily Life

Slope Formula Calculatorm = (y₂−y₁) / (x₂−x₁)

m = ( y₂y₁ ) / ( x₂x₁ )
m = slope  ·  (x₁, y₁) = point 1  ·  (x₂, y₂) = point 2
⟹ Solvem, x₁, y₁, x₂, y₂
Solve for:
Presets:
m
x₁: y₁: x₂: y₂: m:
✓ Copied!
Slope Gauge
Negative Zero Positive
m = (y₂−y₁) / (x₂−x₁)  ·  x₁ ≠ x₂ for a defined slope
m = (y2-y1) / (x2-x1)
Slope Formula

Variables

SymbolQuantityUnit
mSlope of the line
(x1,y1), (x2,y2)Coordinates of two points on the line

What it means

The slope of a line through two points (x₁,y₁) and (x₂,y₂) is defined as the ratio of the vertical change (rise) to the horizontal change (run). It is a measure of the line's steepness and direction: positive slope indicates increasing line, negative indicates decreasing. Slope is fundamental to linear equations (y = mx + b), in calculus it is the derivative (instantaneous rate of change), and in statistics it is the regression coefficient. It is used in physics for velocity and in economics for marginal rates. Understanding slope is essential for algebra, geometry, and many applications in science and engineering.

Worked example

Slope Formula – Two Examples

Real‑World
Scenario: A road rises 4 units over 2 units horizontal – slope = 4/2 = 2.
ParameterValue
(x1,y1)(0,0)
(x2,y2)(2,4)
1m = (4−0)/(2−0) = 2
Result 2 ✓ Steep incline
Scenario: A line passes through (0,5) and (5,0) – slope = (0−5)/(5−0) = −1.
ParameterValue
(x1,y1)(0,5)
(x2,y2)(5,0)
1m = (0−5)/(5−0) = −1
Result −1 ✓ Negative slope
Insight: Slope = rise/run. Positive slope = increasing, negative = decreasing, zero = horizontal.

Common mistakes

  • Slope: m = (y₂−y₁) / (x₂−x₁) – rise over run.
  • Undefined: If x₂ = x₁, the slope is undefined (vertical line).
  • Sign: Slope can be positive, negative, zero, or undefined.
  • Units: The slope has units of (y‑units)/(x‑units).
  • Order: The order of points does not matter if you are consistent (y₂−y₁)/(x₂−x₁) vs. (y₁−y₂)/(x₁−x₂) gives the same result.

Applications

The slope formula, m = (y₂−y₁)/(x₂−x₁), quantifies the steepness and direction of a line between two points. It is fundamental in analytical geometry and is used in physics (velocity is slope of position‑time), economics (marginal rates), and engineering (gradients in road design). In data analysis, it indicates trends and correlations. By calculating slope, professionals can interpret relationships between variables, design linear models, and estimate rates of change. This formula is the basis for linear regression and differential calculus, making it a cornerstone of quantitative reasoning across all disciplines.

  • Interpretation of linear relationships in data (trend analysis)
  • Road and railway gradient design for safety and drainage
  • Calculation of velocity and acceleration in kinematics
  • Economic marginal analysis (cost, revenue, profit slopes)
  • Construction and surveying (grade and rise‑over‑run)