Enter equation values

Choose a direction, enter the line, and select how exact values and visual output should appear.

Conversion direction
Forward input method
Accepts integers, decimals, fractions, and mixed numbers.
Use zero for a line passing through the origin.
The parser also accepts equivalent linear equations with x and y on either side.
Examples: 2x - 3y = -12, 4x + y - 5 = 0, x = 7.
Choose 0 through 12 decimal places.
Display options

Calculation history

Recent successful conversions are saved only in this browser. No equation is sent anywhere except this PHP page for calculation.

No saved calculations yet.

Formula used

Slope-intercept form: y = mx + b

Initial rearrangement: mx - y = -b

Standard form: Ax + By = C

Reverse conversion: m = -A/B and b = C/B, provided B ≠ 0

How to use this calculator

Convert slope-intercept form

  1. Select the forward conversion direction.
  2. Enter m and b separately, or enter a complete equation.
  3. Choose decimal precision and graph preferences.
  4. Select Convert equation.
  5. Review the normalized standard form and worked steps.

Convert standard form

  1. Select the reverse conversion direction.
  2. Enter a linear equality such as 3x + 2y = 12.
  3. Calculate to isolate y and identify m and b.
  4. Check the intercepts, vectors, angle, and graph.
  5. Copy, print, or save the result for later use.

Understanding slope-intercept and standard form

What slope-intercept form communicates

Slope-intercept form is written as y = mx + b. The coefficient m gives the slope, which describes the line’s direction and steepness. A positive slope rises as x increases, while a negative slope falls. A zero slope produces a horizontal line. The constant b is the y-intercept, the point where the line crosses the vertical axis. This structure makes graphing convenient because the starting point and rise-over-run behavior are immediately visible.

Fractions are especially useful in slope-intercept form. For example, a slope of 2/3 means the line rises two units whenever it moves three units to the right. Decimal slopes can describe the same behavior, but exact fractions avoid rounding and make the conversion to integer standard-form coefficients more reliable.

What standard form communicates

Standard form is normally written as Ax + By = C. Many courses require A, B, and C to be integers with no common factor greater than one. A common sign convention also requires A to be positive. These rules create one predictable representative from the infinitely many equivalent equations obtained by multiplying every coefficient by the same nonzero value.

Standard form is useful for finding intercepts, comparing line equations, solving systems, and recognizing vertical lines. Setting y to zero gives the x-intercept C/A when A is nonzero. Setting x to zero gives the y-intercept C/B when B is nonzero. A vertical equation such as x = 4 fits standard form naturally, even though it cannot be expressed as y = mx + b.

How the conversion works

Begin with y = mx + b. Move the x-term to the left, producing -mx + y = b, or multiply the complete equation by negative one to obtain mx - y = -b. Either equation is valid. The calculator then finds the least common denominator of all rational coefficients and multiplies every term by that number. This removes fractions without changing the line.

Next, the calculator computes the greatest common divisor of the resulting integer coefficients. Dividing A, B, and C by this common factor produces the simplest integer ratio. Finally, the equation’s sign is adjusted so the first nonzero coefficient is positive. The same operation must always be applied to every term; changing one coefficient alone changes the line.

Decimals, fractions, and exactness

Terminating decimals are converted to exact fractions before algebra begins. Thus 0.25 becomes 1/4, and 1.5 becomes 3/2. This prevents small binary floating-point errors from creating unexpectedly large coefficients. The final standard form uses exact integers, while decimal values are shown only as optional approximations for slope, intercepts, angle, and distance.

Mixed numbers such as -2 1/3 are also accepted in separate numeric fields. A denominator of zero is rejected. Very long decimals and extremely large scientific-notation exponents are limited to keep integer calculations safe on ordinary PHP installations.

Common mistakes to avoid

Every operation must affect the entire equation. When clearing a denominator, multiply each x-term, y-term, and constant. When multiplying by negative one, reverse every sign. Do not remove a common factor from only one side. Also remember that the standard-form coefficient B may be negative; the usual positivity convention applies mainly to A or, when A is zero, to B.

Do not confuse the y-intercept b with the standard-form constant C. After rearranging y = mx + b into mx - y = -b, the right-side constant is the negative of b before denominator clearing and reduction. The calculator displays each stage to make this sign change visible.

Special line cases

A horizontal line has m = 0, so y = b converts to 0x + y = b and is normally displayed simply as y = b. A line through the origin has b = 0, so its standard form has C = 0. A vertical line has equation x = k. Its slope is undefined because the horizontal change is zero, so it is available only through standard form or the reverse-conversion input.

If both variable coefficients cancel, the equation may become an identity such as 0 = 0 or a contradiction such as 0 = 5. Neither describes one straight line, so the calculator reports a validation message instead of inventing a result.

Worked examples

Fractional slope

Start with y = 2/3x + 4. Rearranging gives 2/3x - y = -4. Multiply every term by 3 to obtain 2x - 3y = -12. The coefficients share no common factor, and A is already positive.

Negative slope

Start with y = -2x + 5. Move the x-term left to obtain 2x + y = 5. No fractions need clearing, and the equation already follows the preferred sign convention.

Decimal values

Start with y = 0.25x + 1.5. Convert the decimals to 1/4 and 3/2. Rearrangement gives 1/4x - y = -3/2. Multiplying by 4 produces x - 4y = -6.

Reverse conversion

Start with 3x + 2y = 12. Subtract 3x to get 2y = -3x + 12. Divide every term by 2, giving y = -3/2x + 6.

Frequently asked questions

Must A, B, and C always be integers?

That is the most common classroom convention. Equivalent equations with fractions are mathematically valid, but integer coefficients are easier to compare and simplify.

Why does the calculator make A positive?

Multiplying a complete equation by negative one does not change its graph. Making the first nonzero coefficient positive provides a consistent normalized answer.

Can the calculator process x = 4?

Yes, in reverse mode. It identifies x = 4 as a vertical line with undefined slope. No slope-intercept equation exists for that line.

Are decimal inputs rounded before conversion?

No. Terminating decimals are first converted into exact rational numbers. Rounding applies only to optional decimal displays in the result details.

Why are equations like x² + y = 3 rejected?

Slope-intercept and standard forms in this calculator describe straight lines. Powers, products such as xy, and nonlinear functions require a different calculator.

Related Calculators

Algebra CalculatorEquation CalculatorInterval Notation CalculatorLogical Sets CalculatorPI Product Notation CalculatorPolynomials CalculatorRational Expressions CalculatorTesting Solutions CalculatorWord Problems Calculatorangle to decimal calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.