Calculate the slope between two points with step-by-step solutions and interactive graph visualization
Enter the coordinates of two points to calculate the slope
Enter coordinates to calculate slope
The slope of a line is a fundamental concept in algebra and coordinate geometry. It measures the steepness and direction of a line, representing the rate of change between two points.
m = (y₂ − y₁) / (x₂ − x₁)
Where:
The slope represents the ratio of vertical change (rise) to horizontal change (run) between two points on a line. In practical terms:
Find the slope of the line passing through (2, 3) and (5, 9).
Solution:
m = (9 − 3) / (5 − 2)
m = 6 / 3
m = 2
The slope is 2, which means for every 1 unit you move horizontally, the line rises 2 units vertically.
Find the slope of the line passing through (4, 7) and (8, 1).
Solution:
m = (1 − 7) / (8 − 4)
m = −6 / 4
m = −3/2 or −1.5
The slope is −1.5, meaning the line falls 1.5 units vertically for every 1 unit moved horizontally.
Find the slope of the line passing through (−3, 5) and (4, 5).
Solution:
m = (5 − 5) / (4 − (−3))
m = 0 / 7
m = 0
The slope is 0 because the y-coordinates are the same, indicating a horizontal line.
Find the slope of the line passing through (6, 2) and (6, 8).
Solution:
m = (8 − 2) / (6 − 6)
m = 6 / 0
m = undefined
The slope is undefined because the x-coordinates are the same, indicating a vertical line.
Once you know the slope and have at least one point, you can write the equation of the line in various forms:
y − y₁ = m(x − x₁)
This form is useful when you know the slope and one point on the line. Simply substitute the slope (m) and the coordinates of the known point (x₁, y₁).
y = mx + b
This is the most common form, where m is the slope and b is the y-intercept (where the line crosses the y-axis). This form makes it easy to graph the line and identify its properties.
Ax + By = C
In standard form, A, B, and C are integers, and A is typically positive. This form is useful for certain algebraic manipulations and for finding intercepts quickly.
Understanding slope is crucial in many real-world contexts:
Slope determines the grade of roads, ramps, and roofs. Building codes often specify maximum slopes for wheelchair ramps (typically 1:12) and drainage systems.
Slope represents rate of change in graphs showing profit, revenue, or cost over time. A steeper positive slope indicates faster growth.
Slope on a distance-time graph represents velocity. On a velocity-time graph, it represents acceleration. These concepts are fundamental in motion analysis.
Topographic maps use slope to show terrain steepness. Ski resorts classify runs by slope difficulty, with steeper slopes being more challenging.
The slope of a line determines its relationship with other lines:
Two lines are parallel if and only if they have the same slope (and different y-intercepts).
Example: Lines with slopes m = 3 and m = 3 are parallel.
Two lines are perpendicular if the product of their slopes equals −1. This means their slopes are negative reciprocals.
Example: Lines with slopes m = 2 and m = −1/2 are perpendicular because 2 × (−1/2) = −1.
Slope is fundamentally a measure of rate of change. In calculus, this concept extends to derivatives, which represent instantaneous rates of change. The slope formula gives you the average rate of change between two points.
The slope is related to the angle θ that the line makes with the positive x-axis through the relationship:
tan(θ) = m
Therefore, θ = arctan(m). This connection between slope and angle is useful in trigonometry and vector mathematics.
Related concepts often used with slope include the distance formula (to find the length of a line segment) and the midpoint formula (to find the point exactly halfway between two points). These formulas, combined with slope, give you powerful tools for analyzing lines and shapes in coordinate geometry.
Test your understanding with these practice problems. Use our calculator above to check your answers!
1. Find the slope of the line through (−2, 5) and (3, −1).
m = (−1 − 5) / (3 − (−2)) = −6 / 5
Answer: m = −6/5 or −1.2
2. What is the slope of a line passing through (7, 4) and (7, −3)?
m = (−3 − 4) / (7 − 7) = −7 / 0
Answer: Undefined (vertical line)
3. Find the slope of the line through (−4, −2) and (5, −2).
m = (−2 − (−2)) / (5 − (−4)) = 0 / 9
Answer: m = 0 (horizontal line)
4. A line has slope 3/4. What is the slope of a line perpendicular to it?
For perpendicular lines: m₁ × m₂ = −1
(3/4) × m₂ = −1
m₂ = −1 ÷ (3/4) = −1 × (4/3)
Answer: m = −4/3
In mathematics, "slope" and "gradient" are often used interchangeably to describe the steepness of a line. However, in some contexts, gradient can refer to a vector field or the rate of change in multiple dimensions. For lines in two-dimensional space, they mean the same thing.
Yes! Slope can be any real number. A slope greater than 1 or less than −1 indicates a steep line. For example, a slope of 5 means the line rises 5 units vertically for every 1 unit horizontally, making it quite steep.
If the equation is in slope-intercept form (y = mx + b), the slope is the coefficient m. If it's in standard form (Ax + By = C), solve for y to get slope-intercept form, or use m = −A/B. For other forms, identify two points on the line and use the slope formula.
A slope of 1 means the line rises 1 unit vertically for every 1 unit it moves horizontally. This creates a 45-degree angle with the x-axis. The line rises at a consistent, moderate rate.
A vertical line has the same x-coordinate for all points, making the denominator (x₂ − x₁) equal to zero. Since division by zero is undefined in mathematics, we say the slope is undefined. You can think of it as "infinitely steep."
Slope appears in countless real-world applications: road grades (for example, a 6% grade means a slope of 0.06), roof pitch in construction, ski slope difficulty ratings, wheelchair ramp specifications, economic graphs showing rates of change, velocity on distance-time graphs, and drainage systems in civil engineering.
The x-axis is a horizontal line where y = 0 for all values of x. Since there's no vertical change regardless of horizontal movement, the slope is 0. Similarly, any horizontal line (y = c) has a slope of 0.
Yes! If you have a graph, identify two clear points on the line, read their coordinates, and enter them into the calculator. The calculator will find the slope and show you the step-by-step solution. Our graph visualization will also help you verify your points are correct.