Slope Calculator — Gradient & Line
Calculate the slope of a line between two points and find the line equation.
Calculate slope and line equation from two points
What Is the Slope Calculator — Gradient & Line?
The Slope Calculator finds the gradient (steepness) of the line passing through two points and expresses it as the line equation in slope-intercept form y = mx + b. Slope is defined as the ratio of vertical change (rise) to horizontal change (run) between any two points on a line.
Formula
How to Use
Enter the coordinates of two points: (x₁, y₁) and (x₂, y₂). Click Calculate to get the slope, y-intercept, full line equation, and the angle the line makes with the x-axis. If the line is vertical (x₁ = x₂), the slope is undefined.
Example Calculation
Points: (1, 3) and (5, 11) m = (11 − 3) / (5 − 1) = 8/4 = 2 b = 3 − 2×1 = 1 Line: y = 2x + 1 Angle: arctan(2) ≈ 63.43° Check: at x=5, y = 2(5)+1 = 11 ✓
Understanding Slope — Gradient & Line
Slope is one of the central concepts in mathematics, representing the rate of change of one quantity with respect to another. In calculus, the derivative at a point is the instantaneous slope of the tangent line to a curve — so mastering slope is the foundation of differential calculus.
In real-world applications, slope appears constantly: road gradients (a 5% slope means 5 m rise per 100 m run), roof pitches (rise:run ratios), ramp accessibility standards (ADA requires ≤ 1:12 slope), stock price trends (rise per time period), and physics (velocity as the slope of position vs. time).
The concept of slope extends to multivariate calculus as the gradient vector, which points in the direction of steepest ascent of a multivariable function.
Frequently Asked Questions
What does a positive vs. negative slope mean?
A positive slope (m > 0) means the line rises from left to right. A negative slope (m < 0) means it falls. m = 0 is a horizontal line; undefined slope is a vertical line.
What is slope-intercept form?
y = mx + b is slope-intercept form, where m is the slope and b is the y-intercept (where the line crosses the y-axis). It is the most common way to express a line equation.
What is the slope of a horizontal line?
A horizontal line has slope m = 0, since the y-values do not change (Δy = 0) as x varies.
When is slope undefined?
Slope is undefined for vertical lines (x₁ = x₂), because division by zero (Δx = 0) is not defined. These lines have the equation x = constant.
How are perpendicular slopes related?
Two lines are perpendicular if and only if the product of their slopes is −1 (m₁ × m₂ = −1), i.e., their slopes are negative reciprocals.
Related Tools
Distance Calculator — 2D & 3D Points
Calculate the distance between two points in 2D or 3D space.…
Midpoint Calculator — Two Points
Find the midpoint between two points in 2D or 3D coordinate space.…
Linear Equation Solver — Solve ax+b=c
Solve linear equations in one variable (ax + b = c) with step-by-step solutions.…