Skip to content
AgileLogics

Algebra Solver

Solves a linear equation for x. Scoped to linear equations only — it does not solve quadratics, systems of equations, or symbolic algebra.

How it works

Enter a, b, and c for the equation ax + b = c.

What is a linear equation solver?

A linear equation solver finds the value of x that makes an equation like 3x + 5 = 20 true. This one handles every one-variable linear equation once it's written as ax + b = c: you enter the three numbers, and it returns x = (c − b) ÷ a along with the working, so you can check each step against your own.

How to use it

  1. Rewrite your equation in the form ax + b = c (see the table below for common shapes).
  2. Enter a, the number multiplying x. It can be negative or a decimal, but not 0.
  3. Enter b, the constant on the same side as x. If there isn't one, leave it at 0.
  4. Enter c, the number on the other side.
  5. Click Calculate. You get x and a line showing the substitution, for example x = (c - b) / a = (20 - 5) / 3.

Why x = (c − b) ÷ a

Solving a linear equation means undoing what's been done to x, in reverse order, while keeping both sides equal:

  1. Start with ax + b = c.
  2. Subtract b from both sides: ax = c − b.
  3. Divide both sides by a: x = (c − b) ÷ a.

Every linear equation in one variable can be reduced to this, which is why three numbers are enough.

Worked examples

3x + 5 = 20

a = 3, b = 5, c = 20. x = (20 − 5) ÷ 3 = 15 ÷ 3 = 5. Check: 3 × 5 + 5 = 20.

2x − 7 = 9

The constant is negative, so b = −7. x = (9 − (−7)) ÷ 2 = 16 ÷ 2 = 8. The working line shows this as (9 - -7) / 2; the double minus is subtracting a negative, which is the same as adding 7.

10 − 2x = 4

Reorder the left side as −2x + 10, so a = −2, b = 10, c = 4. x = (4 − 10) ÷ (−2) = −6 ÷ −2 = 3.

0.5x + 1.25 = −3

a = 0.5, b = 1.25, c = −3. x = (−3 − 1.25) ÷ 0.5 = −4.25 ÷ 0.5 = −8.5.

Rearranging common equations

Most of the work is getting your equation into ax + b = c. These patterns cover the usual cases:

Your equation Rearranged a b c x
3x + 5 = 20 already in form 3 5 20 5
4x = 6 4x + 0 = 6 4 0 6 1.5
10 − 2x = 4 −2x + 10 = 4 −2 10 4 3
x/4 = 18 0.25x + 0 = 18 0.25 0 18 72
5x + 3 = 2x + 12 3x + 3 = 12 3 3 12 3
2(x + 3) = 14 2x + 6 = 14 2 6 14 4

The rules behind those moves:

  • Expand brackets first. Multiply the outside number into each term: 2(x + 3) = 2x + 6.
  • Collect x terms on one side. Subtract the smaller x term from both sides.
  • Collect constants on the other side, or leave one constant as b on the x side. Either works, because the solver does the final subtraction.
  • Division by a number is multiplication by its reciprocal. x/4 is 0.25x.

Always check your answer

Substitute x back into the original equation, not the rearranged one. If both sides match, the answer is right and so was your rearranging. For 5x + 3 = 2x + 12 with x = 3: the left side is 15 + 3 = 18, the right side is 6 + 12 = 18. If they don't match, the mistake is almost always a sign error when moving a term across the equals sign.

What it can't solve

  • Quadratics and higher powers (x², x³). These can have two or more solutions and need a different method, such as the quadratic formula.
  • Two or more unknowns (2x + y = 7). A single equation with two variables has infinitely many solutions; you need a system of equations.
  • x in a denominator or under a root (3/x = 6, √x = 4). Some of these can be turned into linear equations by hand first: 3/x = 6 becomes 6x = 3.

For plain arithmetic on the numbers you've rearranged, the basic calculator accepts full expressions with brackets. If your coefficients are fractions you'd like to keep exact, work them out in the fraction calculator first. The scientific calculator can check answers that involve roots or logarithms.

Last updated

Frequently asked questions

Does this solve quadratic equations?
No. This solver is scoped to linear equations of the form ax + b = c, where x appears only to the first power. It doesn't solve quadratics such as x² + 3x − 4 = 0, systems of equations, or simplify symbolic expressions.
What if x appears on both sides of the equation?
Move all the x terms to one side first. For 5x + 3 = 2x + 12, subtract 2x from both sides to get 3x + 3 = 12, then enter a = 3, b = 3 and c = 12. The answer is x = 3.
Why can't a be zero?
If a is 0, the equation has no x term left, so there's nothing to solve for. It's either always true (when b equals c) or never true. The solver shows an error instead of dividing by zero.
How precise is the answer?
x is rounded to six decimal places with trailing zeros removed. 3x = 10 gives 3.333333, and 7x = 1 gives 0.142857. The working line shows a, b and c rounded to four decimal places.
Can I enter fractions for a, b or c?
Enter them as decimals. For x/4 = 18, the coefficient a is 1/4, so type 0.25. The solver returns x = 72. Coefficients like 1/3 that don't have an exact decimal will give a slightly rounded answer.