Skip to content
Math

Slope Calculator

Find the slope between two points

Calculate the slope of a line given two points. Our calculator also gives you the y-intercept, slope-intercept equation, and a visual graph.

🔬Slope Calculation Methodology

The most common method: calculate rise over run between two coordinate pairs.

Formula

m = (y₂ - y₁) / (x₂ - x₁) = Δy / Δx = rise / run

Where:

m= Slope
(x₁, y₁)= First point coordinates
(x₂, y₂)= Second point coordinates
Δ= Change (delta)

Limitations:

  • Undefined for vertical lines (x₁ = x₂)
  • Order of points doesn't matter (sign is preserved)

📜 Historical Background

The concept of slope emerged with analytic geometry, pioneered by René Descartes and Pierre de Fermat in the 17th century. Descartes' 'La Géométrie' (1637) introduced the coordinate system that bears his name, enabling geometric shapes to be described algebraically. The ratio (y₂-y₁)/(x₂-x₁) as a measure of steepness was formalized as mathematical notation developed. The term 'slope' (from the verb meaning 'to incline') became standard in English, while other languages use different terms (German 'Steigung,' French 'pente'). The letter 'm' for slope is standard in English-speaking countries, though its origin is unclear—possibly from 'monter' (French for 'to climb') or simply as an arbitrary choice that stuck. Slope became foundational to calculus, where the derivative represents instantaneous slope.

🔬 Scientific Basis

Slope measures rate of change: how much y changes for a unit change in x. The formula m = (y₂-y₁)/(x₂-x₁) = Δy/Δx computes this ratio. Slope is dimensionless when x and y have the same units, but when units differ, slope has units (e.g., miles per hour, dollars per item). Positive slope indicates y increases as x increases; negative slope indicates y decreases as x increases. Zero slope means a horizontal line (y constant); undefined slope (division by zero when x₁=x₂) means a vertical line (x constant). The order of points doesn't matter: (y₁-y₂)/(x₁-x₂) gives the same result because both numerator and denominator change sign. In calculus, instantaneous slope (derivative) extends this concept to curves.

💡 Practical Examples

  • Rise over run: Points (1, 2) and (4, 8). Slope = (8-2)/(4-1) = 6/3 = 2. Line rises 2 units for every 1 unit right.
  • Negative slope: Points (0, 5) and (5, 0). Slope = (0-5)/(5-0) = -1. Line falls 1 unit for every 1 unit right.
  • Real-world: A ramp rises 3 feet over 12 horizontal feet. Slope = 3/12 = 0.25 = 25% grade. ADA requires ramps no steeper than 1:12.

⚖️ Comparison with Other Methods

Slope can be expressed as a ratio (2/1), decimal (2.0), percentage (200%), or angle (63.4° from horizontal). Different contexts prefer different forms: road grades use percentages, roof pitches use ratios (6:12), mathematics uses decimals or fractions. Converting between slope and angle: slope = tan(angle), angle = arctan(slope). A 45° angle corresponds to slope = 1 (rise equals run). Slope is constant for straight lines—this is the defining property of linearity. For curves, slope varies by position and requires calculus (derivative) to compute at each point. The derivative of f(x) at point a is the slope of the tangent line there.

Pros & Cons

Advantages

  • +Simple, intuitive 'rise over run' concept
  • +Works for any two distinct points on a line
  • +Foundation for linear equations and calculus
  • +Directly interpretable as rate of change
  • +Same result regardless of point order

Limitations

  • -Undefined for vertical lines
  • -Requires two distinct points
  • -Only constant for straight lines
  • -Different representations (ratio, decimal, angle) can confuse
  • -Measurement errors in points propagate to slope

📚Sources & References

🏛️Khan Academy - Slope📚Descartes - La Géométrie (1637)

* Slope of 0 = horizontal line

* Undefined slope = vertical line

* Positive slope: line rises left to right

* Negative slope: line falls left to right

* Slope in calculus: derivative gives instantaneous slope

Features

From Two Points

Enter (x₁,y₁) and (x₂,y₂)

Full Equation

Get y = mx + b form

Graph

See the line visualized

All Forms

Slope-intercept, point-slope, standard

Frequently Asked Questions

What is slope?

The steepness of a line. Rise over run, or change in y divided by change in x.

What does positive/negative slope mean?

Positive slopes go up (↗). Negative slopes go down (↘). Zero is horizontal.

What is undefined slope?

Vertical lines have undefined slope (divide by zero). Written as x = constant.

How do I find y-intercept?

Use one point and slope in y = mx + b. Solve for b.

What is slope-intercept form?

y = mx + b, where m is slope and b is y-intercept.

Related Calculators

Calculate by State

Get state-specific results with local tax rates, laws, and data: