About the Slope Calculator
The slope of a line measures how steeply it rises or falls: the change in divided by the change in between any two points. A positive slope rises to the right, a negative slope falls, zero is horizontal, and a vertical line has an undefined slope.
Once the slope is known, the y-intercept follows from either point, giving the line .
What is the slope of a line?
Slope is a single number that describes the steepness and direction of a straight line. It is defined as rise over run: how far the line goes up or down for every unit it moves to the right. A slope of 2 means the line climbs 2 units for each step right, a slope of means it falls 3 units for every 2 to the right, and a slope of 0 means it is flat.
Because a straight line has the same steepness everywhere, any two points on it give the same slope. That makes the slope the key to the line's equation: once you know and one point, the whole line is determined. In everyday terms slope is a rate of change, such as kilometres per hour on a distance-time graph or dollars per item on a cost graph.
How to use the Slope Calculator
- Enter the coordinates of the first point (x₁, y₁).
- Enter the coordinates of the second point (x₂, y₂).
- Press Find slope to see rise, run, the reduced slope and the line equation.
Formulas
Slope
Slope-intercept form
Point-slope form
Worked example: (2, 3) and (6, 11)
The worked example uses the points (2, 3) and (6, 11). The rise is and the run is , so the slope is . Using the first point, the intercept is , giving the line . The check substitutes the second point: , as expected.
The solution below is generated by the same engine that powers the calculator above.
Final answer
How we read your problem
Find the slope (rate of change) of the line through two points.
Step-by-step solution
Label the points
Find the change in y (rise)
Find the change in x (run)
Divide rise by run
Find the y-intercept using the first point
Write the equation of the line
Formulas used
Slope
Slope-intercept form
The slope is 2: for every 1 unit increase in x, y changes by 2. The line rises from left to right.
Verification
- Second point: 2·(6) + -1 = 11 (expected 11)
Detailed explanation
Negative, fractional and undefined slopes
For the points (1, 2) and (5, −4) the rise is and the run is 4, so the calculator reports and the line , keeping both values as exact fractions instead of −1.5 and 3.5. For (3, 1) and (3, 7) the run is zero; division by zero is not allowed, so the slope is undefined and the calculator reports the vertical line instead of a equation.
Three ways to write the line
Slope-intercept form shows the slope and the y-intercept at a glance and is the form most graphing tools expect. Point-slope form is quicker to write when you have a point and a slope but have not found the intercept yet. Standard form with integer coefficients is preferred in some courses; from it is . All three describe the same set of points.
Slope as a rate of change
In applied problems the slope carries units: the units of y divided by the units of x. If a taxi charges 11 dollars for a 6 km ride and 3 dollars for a 2 km ride, the slope through (2, 3) and (6, 11) is 2 dollars per kilometre, and the intercept of −1 is the value of the line at zero distance. Read that way, the slope answers the question how much does y change when x increases by one, which is the same idea that the derivative extends to curves.
Common mistakes
- Subtracting in a different order on top and bottom, for example over .
- Writing run over rise instead of rise over run.
- Calling the slope of a vertical line 0; it is undefined.
- Using the coordinates of one point as if they were rise and run.
- Simplifying wrongly or dropping a minus sign from the run when the x-values decrease.
Tips
- Parallel lines have equal slopes; perpendicular lines have slopes whose product is −1.
- Keep the slope as a fraction to avoid rounding when finding the intercept.
- Plot both points on the graphing calculator to sanity-check the sign.
- Before calculating, picture the points: if the second is higher and to the right, the slope must be positive.
- The slope of a perpendicular line is the negative reciprocal: a line perpendicular to has slope .
Frequently asked questions
How do I find the slope between two points?
Subtract the y-values, subtract the x-values in the same order, and divide. For (2, 3) and (6, 11): .
What does a negative slope mean?
The line goes down as x increases. A slope of drops 3 units for every 2 units to the right.
Why is the slope of a vertical line undefined?
Both points have the same x, so the run is 0 and the formula would divide by zero. The line is written as instead.
How do I get the equation of the line?
Compute the slope, then use to find the y-intercept and write .
Does the order of the points matter?
No. Swapping the points changes the sign of both differences, so the quotient is the same.
Can I enter decimal coordinates?
Yes. Decimals are converted to exact fractions so the slope and intercept stay exact.
What is the slope of a horizontal line?
Zero. Both points have the same y-value, so the rise is 0 and . The line is written .
How do I find a perpendicular slope?
Take the negative reciprocal of the original slope. If , a perpendicular line has slope , and the product of the two slopes is .
How can I tell if two lines are parallel?
Compare their slopes. Non-vertical lines are parallel exactly when their slopes are equal and their intercepts differ; and never meet.
Find the slope of your line
Enter two points above to get the slope as an exact fraction, the y-intercept and the equation of the line through them.