Standard Form to Slope Intercept Form
Solving 3x + 2y = 12 for y gives y = -1.5x + 6 in two moves. The slope is -3/2, the y-intercept is 6, and the x-intercept is 4, so the line drops 3 units for every 2 it moves right and crosses the axes at (0, 6) and (4, 0).
Standard form A x + B y = C
Or build a line from two points
Compare a second line
Slope-intercept form
| Equation | |
| Standard form | |
| Exact form | |
| Slope m | |
| y-intercept b | |
| x-intercept | |
| Line type | |
| Algebra in between |
From the two points
| Slope m | |
| y-intercept b | |
| Equation | |
| Standard form |
Second line compared with the first
| Slope of the second line | |
| Product of the two slopes | |
| Relation | |
| Second line in slope form |
All calculations happen in your browser. No data is uploaded.
Type the coefficients of Ax + By = C and the converter rewrites the line as y = mx + b. It shows the slope as an exact fraction and as a decimal, both intercepts, and the algebra in between.
Key takeaways
- Slope is -A/B and the intercept is C/B, so 3x + 2y = 12 becomes y = -1.5x + 6 in two moves
- When B = 0 the line is vertical, as in 2x = 7, and the slope is undefined rather than 0
- When A = 0 the line is horizontal, as in 5y = 15, which is y = 3 with a slope of 0
- Perpendicular slopes multiply to -1, so -3/2 pairs with 2/3 as in 2x - 3y = 6
On this page
Two ways to write the same line
Standard form writes a line as A x + B y = C, with both variables on the left and the constant on the right. Slope-intercept form writes the same line as y = m x + b, with y alone on the left. These are not two different lines. They are one line in two outfits, and the second outfit shows the two numbers most people want: how steep the line is and where it crosses the y-axis.
Paul's Online Notes at Lamar University states the only hard rule for standard form: A and B cannot both be zero, because 0 = C is not an equation of a line. That one rule drives every special case below. When B is zero the line is vertical. When A is zero the line is horizontal. When neither is zero, you can divide by B and land in slope form every time.
Why convert at all? Because y = -1.5x + 6 tells you at a glance that every 2 units right costs 3 units down, and that the line starts at 6 on the y-axis. The form 3x + 2y = 12 instead hands you both intercepts after a few seconds of arithmetic. Each form answers a different question faster, and homework, graphing and placement tests all ask you to move between them.
The two moves that do the conversion
Converting takes two moves, and both are legal because you do the same thing to both sides of the equation. First subtract the x term. Then divide every term by B.
Take 3x + 2y = 12. Subtracting 3x from both sides leaves 2y = -3x + 12. Dividing every term by 2 gives y = -1.5x + 6. The slope is -1.5, the y-intercept is 6, and the x-intercept is 4, which comes from setting y = 0 in the original equation: 3x = 12, so x = 4.
| Step | What you do | What you get |
|---|---|---|
| 1 | Start from standard form | 3x + 2y = 12 |
| 2 | Subtract 3x from both sides | 2y = -3x + 12 |
| 3 | Halve every term | y = -1.5x + 6 |
| 4 | Read the slope and intercept | m = -3/2 = -1.5, b = 6 |
After a few of these, the pattern is worth memorizing: m = -A/B and b = C/B. Check it against the same line, where -3/2 = -1.5 and 12/2 = 6. The formula is not a new rule to learn. It is the two moves written once so that you never repeat them by hand.
Why the sign flips when you divide by B
The sign flip catches people because it can happen twice at once. Dividing by a positive B flips only the x term. Dividing by a negative B flips both terms, x and the constant.
First example: 5x - 2y = 8. Subtracting 5x gives -2y = -5x + 8. Now divide by -2: y = 2.5x - 4. The slope is positive because A is positive and B is negative, so -A/B is positive. The intercept is negative even though C is +8, since 8 / (-2) = -4. That second flip is the one people miss.
Second example: -4x + 6y = 9. Adding 4x to both sides gives 6y = 4x + 9, and dividing by 6 gives y = (2/3)x + 1.5. Nothing changes sign here because B is positive, but the slope lands on a fraction that never terminates as a decimal, which is why exact fractions are worth keeping.
The check that never fails: multiply m by B and confirm you get -A. For the second line, (2/3) x 6 = 4, and -A = 4. It matches.
Fractions, decimals and exact answers
Real problems rarely hand you neat integers, and the converter keeps the exact fraction instead of rounding. Type 0.5 and 1.5 as coefficients and it reports the slope as -1/3 in exact form and -0.3333 as the decimal, because 0.5 divided by 1.5 reduces to one third. The table lists every conversion used in the worked examples on this page.
| Standard form | Slope m = -A/B | Intercept b = C/B |
|---|---|---|
| 3x + 2y = 12 | -3/2 = -1.5 | 6 |
| 5x - 2y = 8 | 5/2 = 2.5 | -4 |
| -4x + 6y = 9 | 2/3 = 0.6667 | 3/2 = 1.5 |
| 0.5x + 1.5y = 4.5 | -1/3 = -0.3333 | 3 |
| (1/2)x + (3/4)y = 3 | -2/3 = -0.6667 | 4 |
| 4x - 2y = 0 | 2 | 0 |
The standard form notes from Portland Community College take the intercept-first route to the same answer, which is a good cross-check when a fraction looks wrong.
Two habits keep fractions clean. Reduce before you divide, so -4/6 is written as -2/3 and behaves like a slope you can walk off on graph paper: down 2 for every 3 right. Keep the minus sign on the numerator, so -2/3 and 2/(-3) are written the same way and cannot be misread. A slope printed as 0.6667 is the same number, but -2/3 is easy to plot as 2 down and 3 right, while -0.6667 only tells you the direction.
Special cases: B = 0, A = 0 and C = 0
Any one of the three coefficients can be zero, and each case changes the shape of the answer.
When B = 0 the equation has no y in it. 2x + 0y = 7 is just 2x = 7, or x = 3.5, a vertical line through 3.5 on the x-axis. It has no slope in the ordinary sense, because the run is zero and division by zero is undefined, and it has no y-intercept unless the line is the y-axis itself. Never write slope = 0 here. A slope of zero is a flat line, which is the opposite of a vertical one.
When A = 0 the equation has no x. 0x + 5y = 15 is 5y = 15, or y = 3, a horizontal line. Here the slope is 0 and b = 3.
When C = 0 the line passes through the origin, so b = 0. For 4x - 2y = 0 the conversion gives 2y = 4x and then y = 2x. And when A and B are both zero there is no line to draw at all, which is the one input the converter refuses.
| Equation | Shape | Slope | Reads as |
|---|---|---|---|
| 3x + 2y = 12 | slanted | -1.5 | y = -1.5x + 6 |
| 2x + 0y = 7 | vertical | undefined | x = 3.5 |
| 0x + 5y = 15 | horizontal | 0 | y = 3 |
| 4x - 2y = 0 | through the origin | 2 | y = 2x |
| 0x + 0y = 5 | no line | none | no solution |
From two points to slope-intercept form
Most homework hands you points instead of coefficients, and the converter accepts those too. Slope comes first: m = (y2 - y1) / (x2 - x1). For the points (2, 5) and (6, 13) that is (13 - 5) / (6 - 2) = 8 / 4 = 2.
Then pin the line down with one point and the slope: b = y - m x. Using (2, 5) gives b = 5 - 2(2) = 1, so the line is y = 2x + 1. Test the other point: 2(6) + 1 = 13, which matches. If both points share an x value the run is zero, the line is vertical, and the honest answer is x = that value rather than a slope form.
Standard form is then one shuffle away. Move y to the left and 1 to the right: 2x - y = -1. Many textbooks want a positive leading coefficient, so multiply through by -1 when that is the convention your class uses.
| Step | Work | Result |
|---|---|---|
| Slope | (13 - 5) / (6 - 2) = 8 / 4 | m = 2 |
| Intercept | 5 - 2 x 2 = 5 - 4 | b = 1 |
| Slope-intercept | y = 2x + 1 | check 2(6) + 1 = 13 |
| Back to standard | 2x - y = -1 | -2x + y = 1 |
Parallel and perpendicular lines
Slope is the number that decides how two lines relate. Parallel lines share a slope. Perpendicular lines have slopes that multiply to -1, so each is the negative reciprocal of the other.
Start with 3x + 2y = 12, slope -1.5 or -3/2. A perpendicular partner must have slope 2/3, because (-3/2)(2/3) = -1. The line 2x - 3y = 6 has slope -2/(-3) = 2/3, so those two meet at a right angle. There is a quick recipe here: swap the coefficients of x and y and flip one sign. Parallel is easier still. The line 6x + 4y = 20 has slope -6/4 = -1.5, the same as the first line, so the two never meet.
Note that the standard-form coefficients differ even when the slopes match, which is why comparing A and B directly does not work. Compare the ratios -A/B, or compare A/B, and the relation falls out.
| Second line | Slope | Product with -1.5 | Relation to 3x + 2y = 12 |
|---|---|---|---|
| 6x + 4y = 20 | -1.5 | 2.25 | parallel |
| 2x - 3y = 6 | 0.6667 | -1 | perpendicular |
| x + y = 5 | -1 | 1.5 | neither |
| x = 3.5 (B = 0) | undefined | no value | perpendicular to any horizontal line |
| y = 3 (A = 0) | 0 | 0 | perpendicular to any vertical line |
A vertical line and a horizontal line are the one pair that is perpendicular without any slope arithmetic, since the product rule cannot be applied to a slope that does not exist.
How to check a conversion before you hand it in
Plug both intercepts back into the original equation. For 3x + 2y = 12, the point (4, 0) gives 12 + 0 = 12 and the point (0, 6) gives 0 + 12 = 12. Both hold, so the conversion is sound. This takes ten seconds and catches nearly every arithmetic slip.
Three mistakes account for most wrong answers. Dropping a sign when B is negative is the first, and the fix is to write the division out rather than doing it in your head. Dividing only the x term by B is the second: every term on the right side gets divided, C included. Confusing b with C is the third, and it only bites when B is not 1, as in 3x + 2y = 12 where C = 12 but b = 6.
One more sanity check: a line with a positive slope rises from left to right, which happens when A and B have opposite signs. In -4x + 6y = 9 the signs differ and the slope 2/3 is positive. In 3x + 2y = 12 the signs match and the slope is negative. That single glance catches a flipped sign before it costs a point.
If you only need the steepness and not the whole equation, the slope calculator runs the same numbers from two points, an angle or a grade. If the line curves instead of staying straight, the quadratic formula calculator handles the roots of a parabola.
Frequently asked questions
How do I change standard form to slope-intercept form?
Subtract the x term from both sides, then divide every remaining term by B. For 3x + 2y = 12 that gives 2y = -3x + 12 and then y = -1.5x + 6, so the slope is -1.5 and the y-intercept is 6.
What is the shortcut formula?
The slope is -A/B and the y-intercept is C/B. On 3x + 2y = 12 that is -3/2 = -1.5 and 12/2 = 6. The shortcut works for every line with B not equal to zero and gives the same answer as solving step by step.
What happens when B is zero?
The line is vertical. 2x + 0y = 7 becomes x = 3.5, a line through 3.5 on the x-axis. Its slope is undefined rather than zero, and it has no y-intercept, so no slope-intercept version exists.
What happens when A is zero?
The line is horizontal. 0x + 5y = 15 becomes y = 3, with a slope of 0 and an intercept of 3. Six horizontal lines are all parallel to each other, and each one is perpendicular to every vertical line.
Can the converter handle decimals and fractions?
Yes. Enter 0.5x + 1.5y = 4.5 and it returns y = -1/3x + 3, keeping the exact fraction and showing -0.3333 as the decimal. It reduces fractions by their greatest common factor, so -4/6 appears as -2/3.
Why did the sign of my intercept change?
Because you divided by a negative B. In 5x - 2y = 8 the second move divides by -2, so the slope 5/2 becomes positive and the constant 8 becomes -4. Both terms flip when B is negative.
How do I find the x-intercept from standard form?
Set y = 0 and solve for x, which gives x = C/A. For 3x + 2y = 12 that is 12/3 = 4, so the line crosses the x-axis at (4, 0). The same line crosses the y-axis at (0, 6).
Can I start from two points instead?
Yes. For (2, 5) and (6, 13) the slope is (13 - 5) / (6 - 2) = 2, then b = 5 - 2(2) = 1, giving y = 2x + 1. The converter switches to a vertical answer when both points share the same x value.
How do I know two lines are parallel?
Their slopes are equal. 6x + 4y = 20 has slope -6/4 = -1.5, the same as 3x + 2y = 12, so the lines never meet. Comparing the coefficients A and B alone is not enough, since 6 and 4 differ from 3 and 2.
How do I know two lines are perpendicular?
Multiply their slopes: a product of -1 means a right angle. The slope -3/2 pairs with 2/3, and 2x - 3y = 6 has exactly that slope because -2/(-3) = 2/3. Swap the x and y coefficients and flip one sign to build a perpendicular partner.
What if the line goes through the origin?
Then C = 0 and the intercept is 0. The equation 4x - 2y = 0 converts to 2y = 4x and then y = 2x, so the line passes through (0, 0) and has a slope of 2.
Can I convert back to standard form?
Move the x and y terms to one side. From y = 2x + 1, subtract y and subtract 1: 2x - y = -1. Multiplying by -1 gives -2x + y = 1, which some textbooks prefer because the leading coefficient is positive.
Does the calculator round the slope?
It shows the exact reduced fraction first, then the decimal to four places. A slope of -2/3 prints as -2/3 and -0.6667, and a slope of -1.5 prints as -3/2 and -1.5, so the decimal never hides the fraction behind it.
Is my input uploaded anywhere?
No. The conversion runs in JavaScript inside your browser, and nothing you type is sent to a server or stored between visits. You can disconnect from the network after the page loads and it still works.
Spotted a wrong number or a broken result?
More Math tools
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.