Enter two points to find the slope of the line through them, plus its equation in slope-intercept, point-slope and standard form. Every value stays an exact fraction and every step is shown.
Each box takes an integer (−3), a decimal (2.5) or a fraction (3/4).
Negative slope, falls left to right
The slope of a line is rise over run: the change in y divided by the change in x between two points, m = (y₂ − y₁)/(x₂ − x₁). Once you know the slope and one point, the rest of the line follows. Point-slope form, y − y₁ = m(x − x₁), drops straight out of the formula. Solving it for y gives slope-intercept form, y = mx + b, and clearing fractions gives standard form, Ax + By = C.
The calculator does all of this with exact fractions, so 1/3 stays 1/3 instead of turning into 0.333333. Two special cases get their own wording. A vertical line has a run of 0, so its slope is undefined and its equation is x = c. A horizontal line has a rise of 0, so its slope is 0 and its equation is y = c.
Find the line through (1, 2) and (5, −4).
Those are the default values above, so you can compare each line of the working with the calculator's steps. For more practice reading slope and b off an equation, see the guide to slope and slope-intercept form. The point-slope form guide covers writing a line from one point and a slope, and the guide to graphing linear equations shows how to sketch the line by hand. More calculators are on the free tools page.
Slope measures how steep a line is and which way it tilts. It is the change in y divided by the change in x between any two points on the line, often called rise over run. A slope of −3/2 means that every time x goes up by 2, y goes down by 3. Positive slopes rise from left to right and negative slopes fall.
A zero slope belongs to a horizontal line such as y = 4: the rise is 0, so 0 divided by any run is 0. An undefined slope belongs to a vertical line such as x = 3: the run is 0, and dividing by zero has no answer. A vertical line has no slope-intercept form, so its equation is written as x = c.
No. If you swap the points, the rise and the run both change sign, so their ratio stays the same. With (1, 2) and (5, −4) you get −6/4, and with the points swapped you get 6/(−4), which is the same −3/2. Just keep the order consistent: subtract the same point first in both the top and the bottom.
Many slopes, like 1/3 or 7/6, have decimals that never end, so a rounded decimal is not quite the right line. The calculator keeps every value as an exact fraction, which is also the form most teachers expect in an equation like y = −(3/2)x + 7/2. The decimal is shown next to the slope when it helps you picture it.
Standard form is Ax + By = C with whole numbers. Start from slope-intercept form, multiply every term by the lowest common denominator to clear fractions, then move the x term to the left side. For y = −(3/2)x + 7/2, multiplying by 2 gives 2y = −3x + 7, and adding 3x to both sides gives 3x + 2y = 7.
It is the angle the line makes with the positive x-axis, measured counterclockwise, from 0° up to but not including 180°. Its tangent equals the slope, so a slope of 1 gives 45° and a slope of −3/2 gives about 123.69°. A horizontal line has an angle of 0° and a vertical line has an angle of 90°.
Work the problem yourself first, then take a photo of it. Solver AI on iPhone and iPad shows each step of the solution, so you can see where your answer went wrong.