Variable Calculator
Solve for x in any linear equation of the form ax + b = c. Enter the three coefficients to get the answer with every step shown, plus a check by substituting x back in.
What the Variable Calculator Does
The calculator solves linear equations of the form ax + b = c for the variable x. You provide the coefficient a (the number multiplying x), the constant b (added on the left side), and the target c (on the right side). It computes x = (c − b) ÷ a and displays the answer prominently, followed by a step-by-step breakdown: the original equation, the isolation of the x-term, the division, and a verification step that plugs x back into ax + b and confirms it equals c. The only requirement is that a cannot be zero — with a = 0 there is no x-term at all, so the equation either has no solution or infinitely many, and the calculator explains this instead of guessing. Decimals and negative numbers are fully supported, so equations like −4x + 9 = −15 or 2.5x + 1.5 = 9 solve just as easily as whole-number ones.How to Use the Variable Calculator
Identify a, b, and c in your equation. In 3x + 7 = 25, a is 3, b is 7, and c is 25. If your equation looks different — say 5x − 12 = 38 — rewrite it mentally in the ax + b = c pattern: here b is −12 (because subtracting 12 is adding negative 12), so enter −12 for b. For x ÷ 3 + 2 = 7, the coefficient a is 1 ÷ 3, which you can enter as 0.3333. Type the three values into the fields and press Calculate. The solution appears in large text as “x = …”, with the four working rows beneath it: the equation, step 1, step 2, and the check. Press Reset to clear the fields for the next equation. If a field is empty, non-numeric, or a is zero, the calculator shows an error message explaining the problem instead of producing a misleading answer.The Method Behind the Calculator
Solving ax + b = c uses the two inverse operations in order. First, undo the addition: subtract b from both sides, which isolates the x-term: ax = c − b. Second, undo the multiplication: divide both sides by a, giving x = (c − b) ÷ a. These are the only two moves, and they work because whatever you do to one side of an equation you must do to the other — the balance is preserved at every step. The verification step reverses the process: substitute the found x back into the left side, compute a × x + b, and confirm the result equals c. If it does, the solution is certainly correct. The calculator performs this check automatically, so you get both the answer and its proof in one glance.Worked Examples With Full Arithmetic
Example 1 — whole numbers. Solve 3x + 7 = 25. Step 1: 3x = 25 − 7 = 18. Step 2: x = 18 ÷ 3 = 6. Check: 3 × 6 + 7 = 18 + 7 = 25 ✓. Example 2 — subtraction on the left. Solve 5x − 12 = 38, so a = 5, b = −12, c = 38. Step 1: 5x = 38 − (−12) = 38 + 12 = 50. Step 2: x = 50 ÷ 5 = 10. Check: 5 × 10 − 12 = 50 − 12 = 38 ✓. Notice how entering b as −12 handles the subtraction cleanly. Example 3 — negative coefficient. Solve −4x + 9 = −15, so a = −4, b = 9, c = −15. Step 1: −4x = −15 − 9 = −24. Step 2: x = −24 ÷ −4 = 6. Check: −4 × 6 + 9 = −24 + 9 = −15 ✓. A negative divided by a negative gives a positive — the signs take care of themselves if you follow the steps. Example 4 — decimals. Solve 2.5x + 1.5 = 9. Step 1: 2.5x = 9 − 1.5 = 7.5. Step 2: x = 7.5 ÷ 2.5 = 3. Check: 2.5 × 3 + 1.5 = 7.5 + 1.5 = 9 ✓. Example 5 — a fractional coefficient. Solve x ÷ 3 + 2 = 7, so a = 1 ÷ 3 ≈ 0.3333, b = 2, c = 7. Step 1: (1/3)x = 7 − 2 = 5. Step 2: x = 5 ÷ (1/3) = 5 × 3 = 15. Check: 15 ÷ 3 + 2 = 5 + 2 = 7 ✓.Reading Your Result
The headline gives the solution directly: “x = 6”, for instance. The four rows below it are the working, in the order you would write it on paper. The equation row restates what you asked; step 1 shows the constant moved across; step 2 shows the division that isolates x; and the check row substitutes the answer back and confirms the arithmetic closes — ending in a check mark when both sides agree. If the answer is a repeating decimal, the calculator rounds to four decimal places, which is plenty for homework and most practical uses. For exact fractional answers, read the step-2 row: it shows the division before rounding, so you can express the result as a fraction yourself when precision matters.Common Mistakes When Solving for x
The most frequent error is mishandling the sign of b. In 5x − 12 = 38, beginners often compute 38 − 12 = 26 and then wonder why x = 5.2 fails the check. The rule: moving −12 across the equals sign turns it into +12, so the correct step is 5x = 38 + 12 = 50. Entering b as −12 in the calculator sidesteps this entirely. The second mistake is dividing in the wrong order — computing a ÷ (c − b) instead of (c − b) ÷ a. In 3x + 7 = 25, that gives 3 ÷ 18 = 0.1667, which is nonsense. The check row catches this instantly: 3 × 0.1667 + 7 is nowhere near 25. Third, never forget the a = 0 case. An equation like 0x + 7 = 25 has no solution at all (7 can never equal 25), while 0x + 7 = 7 is true for every x. The calculator refuses to divide by zero and tells you why — which is more honest than most quick mental attempts. Finally, always run the check: substituting back takes five seconds and catches nearly every arithmetic slip.Frequently Asked Questions
1. What does “solve for x” mean?
It means finding the number that makes the equation true when substituted for x. In 3x + 7 = 25, x = 6 is the solution because 3 × 6 + 7 equals exactly 25.
2. What are a, b, and c in ax + b = c?
The letter a is the coefficient — the number multiplying x. The letter b is the constant added on the left side. The letter c is the target value on the right side. In 3x + 7 = 25: a = 3, b = 7, c = 25.
3. What is the formula for x?
x = (c − b) ÷ a. Subtract b from both sides to isolate the x-term, then divide by a. For 3x + 7 = 25: x = (25 − 7) ÷ 3 = 18 ÷ 3 = 6.
4. What if my equation has subtraction, like 5x − 12 = 38?
Enter b as a negative number: a = 5, b = −12, c = 38. The calculator computes x = (38 − (−12)) ÷ 5 = 50 ÷ 5 = 10. Subtracting 12 is the same as adding −12.
5. Why can’t a be zero?
Because then there is no x-term: the equation becomes b = c, which is either always false (no solution) or always true (every number is a solution). Division by zero is undefined, so the calculator reports the problem instead of inventing an answer.
6. How do I check my answer?
Substitute x back into the left side and confirm it equals c. For x = 6 in 3x + 7 = 25: 3 × 6 + 7 = 25 ✓. The calculator performs this check automatically and shows it in the last row.
7. Can x be a negative number?
Absolutely. In −4x + 9 = −15, the solution is x = 6 (positive), but in 2x + 10 = 4 the solution is x = −3. The signs work themselves out through the two steps — just enter them carefully.
8. Can x be a decimal or fraction?
Yes. In 2.5x + 1.5 = 9, x = 3 exactly; in 3x + 7 = 26, x = 19 ÷ 3 ≈ 6.3333. The calculator shows up to four decimal places, and the step-2 row shows the exact division.
9. How do I handle x ÷ 3 + 2 = 7?
Rewrite x ÷ 3 as (1/3)x, so a = 0.3333, b = 2, c = 7. Then x = (7 − 2) ÷ 0.3333 = 15. Dividing by a fraction is the same as multiplying by its reciprocal: 5 ÷ (1/3) = 15.
10. What is the difference between an expression and an equation?
An expression like 3x + 7 is a recipe with no answer — it varies with x. An equation like 3x + 7 = 25 adds the equals sign and the target, which pins x down to exactly one value. This calculator solves equations, not expressions.
11. Why do we do the same thing to both sides?
Because an equation is a balance: the two sides are equal by definition. Adding, subtracting, multiplying, or dividing both sides by the same amount keeps them equal, which is what lets us reshape the equation until x stands alone.
12. What order do the steps go in?
Undo addition and subtraction first (move b), then undo multiplication and division (divide by a). This is the reverse of the order of operations — you peel the equation like an onion, outermost operation first.
13. Can this solve equations with x on both sides?
Not directly — first collect the x-terms yourself. For 5x + 3 = 2x + 12, subtract 2x from both sides to get 3x + 3 = 12, then enter a = 3, b = 3, c = 12, giving x = 3.
14. Where is ax + b = c used in real life?
Everywhere a quantity grows steadily toward a target: savings goals (weekly deposit × weeks + starting balance = goal), pricing (unit price × quantity + flat fee = total), conversions between measurement scales, and countless science and engineering formulas.
15. What should I do if my answer fails the check?
Recheck the sign of b first — it causes most failures. Then verify you divided (c − b) by a and not the reverse. Nine times out of ten, one of those two slips is the culprit, and the step rows show exactly where it happened.