Free Algebra Solver
Linear equations

Linear equation calculator

Solve one-variable linear equations, including fractional and decimal coefficients.

Interpreted as: 5x + 9 = 2x - 12 (Solve) Ready
Examples
Solution

Step-by-step working

Your solution will appear here

Choose an operation and run it to see exact working, verification, and available visuals.

Linear equation guide

Solve linear equations by keeping both sides balanced

A linear equation solver with steps should show more than x. It should simplify both sides, collect variable terms, isolate the unknown, classify special cases, and substitute the answer into the original equation. This guide explains that complete process.

What is a linear equation in one variable?

A linear equation can be rearranged into ax + b = 0, where a and b are constants and x appears only to the first power. Its graph is a straight line, and a typical one-variable equation has one value of x that makes the left and right sides equal. Parentheses, fractions, or x-terms on both sides can hide the linear structure without changing it.

For example, 3(x − 2) + 5 = 2x + 1 is linear because distribution and combining like terms reduce it to x − 1 = 0. An input containing x², x under a radical, or x in a denominator is not an ordinary linear equation and needs a different method.

How to solve a linear equation step by step

The balance principle is the central idea: applying the same valid operation to both sides preserves equality. A reliable order prevents unnecessary sign errors, especially when the variable appears on both sides.

  1. Remove grouping symbols with the distributive property and simplify fractions if needed.
  2. Combine like terms separately on the left side and the right side.
  3. Move variable terms to one side by adding or subtracting the same term on both sides.
  4. Move constants to the other side, then divide by the nonzero coefficient of x.
  5. Substitute the result into the original equation and compare both sides.

You may choose different but equivalent moves. Moving the smaller x-term often keeps the working coefficient positive, but it is not a mathematical requirement. What matters is that every transformation is valid and clearly applied to the whole side.

Worked example: 5x + 9 = 2x − 12

Start by collecting x-terms on the left. Subtract 2x from both sides: 5x + 9 − 2x = 2x − 12 − 2x, so 3x + 9 = −12. Next subtract 9 from both sides: 3x = −21. Divide both sides by 3 to obtain x = −7.

Check the original equation, not only the last simplified line. The left side is 5(−7) + 9 = −35 + 9 = −26. The right side is 2(−7) − 12 = −14 − 12 = −26. Because both sides match, −7 is a solution.

Linear standard form
ax + b = 0, a ≠ 0
Addition property
a = b ⇒ a + c = b + c
Division property
a = b ⇒ a/c = b/c, c ≠ 0

Linear equations with fractions or decimals

Fractions do not change the method. You can preserve exact rational arithmetic or multiply every term on both sides by the least common denominator. For x/3 + 1/2 = 5/6, multiplying the entire equation by 6 gives 2x + 3 = 5, then 2x = 2 and x = 1.

Terminating decimals can be converted to fractions or handled exactly by the calculator. Avoid rounding during intermediate work because a rounded coefficient can create a slightly incorrect final value. Exact fractions also make substitution checks easier to audit.

One solution, no solution, or infinitely many solutions

Not every linear equation ends with x equal to a number. If variable terms cancel and the remaining statement is false, such as 0 = 5, the equation has no solution. The two sides represent parallel expressions that never become equal.

If everything cancels to a true identity such as 0 = 0, every real value in the stated domain is a solution. For example, 2(x + 3) = 2x + 6 is true for all real x. A complete linear equation calculator must report these classifications rather than dividing by zero or inventing a single answer.

Common linear-equation mistakes to catch

Distribute a negative sign to every term inside parentheses, apply operations to the whole side, and keep fraction bars grouped. When dividing by a coefficient, divide every term in that line—not just the variable symbol. Also remember that moving a term is shorthand for adding its opposite to both sides.

Use the displayed steps as a diagnostic record. If your answer differs, locate the first unequal line, identify the rule used there, and redo that transformation before continuing.

Frequently asked questions

Concise answers about the method, notation, checks, and calculator limits.

What does a linear equation solver do?

It isolates the variable in a supported first-degree equation and shows the balance-preserving transformations used to reach the solution.

Can the calculator solve equations with x on both sides?

Yes. It collects variable terms on one side and constants on the other before dividing by the remaining coefficient.

Can I enter fractions and decimals?

Yes. Use a slash for fractions. The supported linear solver preserves exact rational values where possible.

How can a linear equation have no solution?

If the variable terms cancel and leave a false statement such as 0 = 4, no value can satisfy the original equation.

What does infinitely many solutions mean?

It means both sides are equivalent expressions, so the equation is true for every value in the stated domain.

How do I check a linear equation answer?

Substitute the value into the original equation and simplify both sides independently. Matching values confirm that candidate.

Math keypad

Solve mode

Use the keypad below or tap the expression to use your phone keyboard.

Keyboard tips

Ctrl + Enter
Run the selected operation
^
Enter a power, such as x^2
sqrt(
Calculate an exact or simplified square root
a:b
Separate quantities in a ratio
12, 18
Separate integers in an LCM and GCD calculation
@ x =
Assign x when evaluating an expression
y =
Enter a polynomial function to graph
|
Wrap an absolute-value expression