Slope Calculator
Results
| Slope (m) | |
|---|---|
| Slope-Intercept Form | |
| Point-Slope Form | |
| Standard Form |
Line Graph
Step-by-step Solution
What Is Slope (Rise over Run)?
In mathematics, the slope or gradient of a line is a number that describes both the direction and the steepness of the line. It's often denoted by the letter m. Slope is calculated by finding the ratio of the "vertical change" (rise) to the "horizontal change" (run) between any two distinct points on the line.
The formula for the slope between two points $(x_1, y_1)$ and $(x_2, y_2)$ is: $$ m = \frac{\text{rise}}{\text{run}} = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1} $$ A positive slope means the line goes upward from left to right. A negative slope means it goes downward. A zero slope indicates a horizontal line, and an undefined slope indicates a vertical line.
How to Find the Equation of a Line from Two Points
- Calculate the Slope (m): Use the formula $m = (y_2 - y_1) / (x_2 - x_1)$ with the coordinates of your two points.
- Choose a Form: Decide whether to use the slope-intercept form or the point-slope form.
- Find the Equation:
- For slope-intercept form ($y = mx + b$), substitute the slope 'm' and the coordinates of one point (e.g., $x_1, y_1$) into the equation to solve for the y-intercept 'b'. Once you have 'm' and 'b', you have your equation.
- For point-slope form ($y - y_1 = m(x - x_1)$), simply substitute the slope 'm' and the coordinates of one point ($x_1, y_1$) directly into the formula. This is often the quickest method.
Slope-Intercept vs Point-Slope vs Standard Form
There are several ways to write the equation of a line:
- Slope-Intercept Form: $y = mx + b$. This form is very intuitive. 'm' is the slope, and 'b' is the y-intercept (the y-value where the line crosses the y-axis).
- Point-Slope Form: $y - y_1 = m(x - x_1)$. This form is useful when you know the slope 'm' and a single point ($x_1, y_1$) on the line. It directly shows a point and the slope.
- Standard Form: $Ax + By + C = 0$. In this form, A, B, and C are typically integers, and A is non-negative. It's less intuitive for graphing but is useful for certain algebraic manipulations and for representing vertical lines (where B=0).
Special Cases — Vertical and Horizontal Lines
Horizontal Lines: A horizontal line has a slope of m = 0. This is because the 'rise' ($\Delta y$) is always zero between any two points. Its equation is simply $y = b$, where 'b' is the constant y-value for all points on the line.
Vertical Lines: A vertical line has an undefined slope. This is because the 'run' ($\Delta x$) is always zero, which would lead to division by zero in the slope formula. Its equation is $x = c$, where 'c' is the constant x-value for all points on the line.
Frequently Asked Questions
Our JSON-LD schema in the page head provides answers to common questions about calculating slope, which search engines can use to generate rich results.
