Slope Calculator
Find the slope of a line passing through any two coordinate points. Useful for geometry homework, graphing linear equations, and analyzing rates of change.
About this calculator
The slope of a line measures its steepness — how much the y-value changes for every unit increase in x. Given two points (x₁, y₁) and (x₂, y₂), the slope formula is: m = (y₂ − y₁) / (x₂ − x₁). This ratio is also called 'rise over run.' A positive slope means the line rises left to right; a negative slope means it falls. A slope of zero indicates a horizontal line, and an undefined slope (division by zero when x₁ = x₂) indicates a vertical line. Slope is a fundamental concept in algebra, calculus (as the derivative of a linear function), and real-world rate analysis such as speed or grade percentages.
How to use
Suppose your two points are (2, 3) and (6, 11). Enter x₁ = 2, y₁ = 3, x₂ = 6, y₂ = 11. The calculator computes m = (11 − 3) / (6 − 2) = 8 / 4 = 2. The slope is 2, meaning for every 1 unit moved right along the x-axis, the line rises by 2 units. You can now use this slope with the point-slope form y − y₁ = m(x − x₁) to write the full line equation.
Frequently asked questions
What does a negative slope mean on a graph?
A negative slope means the line descends from left to right — as x increases, y decreases. For example, a slope of −3 means for every 1 unit you move right, y drops by 3 units. Negative slopes appear in real-world contexts like depreciation of an asset over time, decreasing temperature as altitude rises, or a downhill road grade. The steeper the negative value, the sharper the descent.
How do I find the slope when the line is horizontal or vertical?
A horizontal line has the same y-value at every point, so y₂ − y₁ = 0, giving a slope of exactly 0. A vertical line has the same x-value at every point, making x₂ − x₁ = 0, which causes division by zero — the slope is undefined. This calculator will display an error or undefined result for vertical lines because the slope formula breaks down mathematically. Vertical lines are instead described by an equation of the form x = constant.
What is the difference between slope and grade percentage in road construction?
Slope (m) expresses rise over run as a decimal or fraction, while grade percentage multiplies that value by 100. A slope of 0.05 equals a 5% grade, meaning the road rises 5 meters for every 100 meters of horizontal distance. Engineers and road planners use grade percentage because it's more intuitive at small angles. For steep terrain (slopes above about 0.15), the distinction between horizontal run and actual road length becomes significant, and engineers switch to more precise trigonometric calculations.