algebra calculators

Slope Calculator

Calculates the slope (steepness) of a straight line passing through any two coordinate points. Useful in algebra, physics, and data analysis whenever you need the rate of change between two values.

About this calculator

The slope of a line measures how much the y-value changes for every one-unit increase in x. It is defined by the formula m = (y₂ − y₁) / (x₂ − x₁), often remembered as 'rise over run'. A positive slope means the line rises from left to right; a negative slope means it falls. A slope of zero indicates a perfectly horizontal line, while an undefined slope (division by zero) indicates a perfectly vertical line — which occurs when x₁ = x₂. The slope is the same regardless of which two points on the line you choose, because a straight line has constant steepness. In the context of linear functions y = mx + b, m is this slope value.

How to use

Suppose you have two points: (1, 3) and (4, 11). Enter x₁ = 1, y₁ = 3, x₂ = 4, y₂ = 11. The calculator computes slope = (y₂ − y₁) / (x₂ − x₁) = (11 − 3) / (4 − 1) = 8 / 3 ≈ 2.667. This means for every 1 unit you move right along the x-axis, y increases by approximately 2.667 units. If you swap the points — x₁ = 4, y₁ = 11, x₂ = 1, y₂ = 3 — the result is the same: (3 − 11)/(1 − 4) = −8/−3 = 2.667.

Frequently asked questions

What does a negative slope mean in a real-world context?

A negative slope means the dependent variable (y) decreases as the independent variable (x) increases. In economics, for example, a demand curve with a negative slope shows that as price rises, quantity demanded falls. In physics, it could represent an object decelerating over time. The steeper the negative slope, the faster the rate of decrease.

Why is the slope undefined when two points have the same x-coordinate?

When x₁ = x₂, the denominator (x₂ − x₁) equals zero, and division by zero is undefined in mathematics. Geometrically, this means the two points lie on a perfectly vertical line. Vertical lines have no single slope value because y can be anything while x stays constant, making the 'rise over run' ratio infinitely large.

How is slope used in linear equations and graphing?

In the slope-intercept form of a line, y = mx + b, the coefficient m is the slope and b is the y-intercept. Knowing the slope lets you draw the line: start at the y-intercept, then move right by 1 unit and up (or down) by m units to plot the next point. Slope is also used to determine whether two lines are parallel (equal slopes) or perpendicular (slopes that are negative reciprocals of each other).