Slope between two points and line equation.
m = (y₂ − y₁) / (x₂ − x₁)
The slope m of a line passing through two points is defined as the rise (vertical change) divided by the run (horizontal change). This ratio tells you how steeply the line ascends or descends from left to right. A positive slope means the line rises, a negative slope means it falls, a slope of zero means the line is horizontal, and an undefined slope means the line is vertical.
m = (y₂ − y₁) / (x₂ − x₁) = (11 − 3) / (6 − 2) = 8 / 4 = 2
Result: The slope m = 2
A slope of 2 means the line rises 2 units vertically for every 1 unit it moves horizontally to the right. Because the slope is positive, the line goes upward from left to right. In practical terms, if you were walking along this line, you would climb 2 feet for every 1 foot of forward travel.
Slope is one of the most fundamental concepts in algebra and coordinate geometry. It quantifies how a line changes — how steeply it rises or falls — as you move from left to right along the x-axis.
Slope isn't just a classroom concept. Engineers use slope to design roads and ramps (grade percentage), architects use it for roof pitch, physicists use it as the rate of change in distance-time graphs, and economists use it to represent marginal cost or revenue in linear models.
Once you know the slope, you can write the equation of a line in slope-intercept form: y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis).
Slope is often expressed as a percentage grade in construction and road engineering: Grade (%) = m × 100. A slope of 0.05 corresponds to a 5% grade — common on highway on-ramps.
Use the slope-intercept formula: b = y − mx. Plug in the slope m and the coordinates of either known point (x, y) to solve for b. Then write the full line equation as y = mx + b.
The slope equals the tangent of the angle θ that the line makes with the positive x-axis: m = tan(θ). To find the angle, calculate θ = arctan(m). For example, a slope of 1 corresponds to a 45° angle.
Percent grade expresses slope as a percentage: Grade (%) = (rise / run) × 100 = m × 100. A road with a 6% grade rises 6 feet for every 100 feet of horizontal travel, which corresponds to a slope of 0.06.
If the equation is in slope-intercept form (y = mx + b), the slope is simply the coefficient m. If it's in standard form (Ax + By = C), rearrange to slope-intercept form: y = (−A/B)x + (C/B), so the slope is −A/B.
Slope (m) is a number that describes the steepness and direction of a straight line. It equals the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line: m = (y₂ − y₁) / (x₂ − x₁).
An undefined slope occurs when the two points have the same x-coordinate, making the denominator (x₂ − x₁) equal to zero. Division by zero is undefined in mathematics, and geometrically it means the line is perfectly vertical.
Yes. Slope is often a fraction. For example, points (1, 2) and (4, 5) give a slope of 3/3 = 1, while points (0, 1) and (4, 3) give a slope of 2/4 = 1/2. The calculator can display both decimal and simplified fraction forms.
No — as long as you are consistent. If you call a point (x₁, y₁), you must use the same point's y-value in the numerator. Swapping which point is 'first' and 'second' changes the signs of both numerator and denominator, so they cancel and the slope remains the same.
They mean the same thing in most contexts. 'Slope' is the term used most in algebra and American mathematics education, while 'gradient' is more common in British English, physics, and calculus (where it can also refer to a vector in multiple dimensions).
Only sources that have been reviewed are shown. Unverified citations are never published.
Spotted an inaccuracy or have an idea to improve this calculator? Let us know.
We use cookies to operate the site, and — with your consent — to show advertising and measure usage. You can change your choice anytime in Cookie Settings.