molecalculator

Moles & Molar Mass

What Calculator Does x Equal? Solve Any Equation

Calculator No. 01-8535 · Updated · Formula and assumptions shown below

Solution for x 4.0000
Check: a·x + b
13.0000
= Coefficient a (for a·x) × Solution for x + Constant b
Coefficient a (for a·x)
2
Set in the form below
Constant b
5
Set in the form below
You enter
Coefficient a (for a·x), Constant b, Right-hand side c
You get
Solution for x, Check: a·x + b
Rounding
4 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

This calculator solves a single algebraic equation of the form a·x + b = c for the unknown x. You enter the values of a, b, and c, and it returns the value of x that makes the equation true, along with a step-by-step check. It handles whole numbers, fractions, and decimals, and it clearly reports when no solution exists (when a = 0 and b ≠ c) or when every x works (when a = 0 and b = c).

Formula

The equation is a·x + b = c. Solving for x gives:

x = (c − b) / a

  • a – coefficient multiplying x (any real number except 0)
  • b – constant term added to a·x (any real number)
  • c – the value the left side equals (any real number)
  • x – the unknown you are solving for (real number, unless a = 0)

In words: subtract b from both sides, then divide both sides by a. The calculator uses exactly this arithmetic, so the result is exact for the numbers you enter (within floating-point precision).

Worked Example

Using the default values: a = 2, b = 5, c = 13. The equation is 2x + 5 = 13.

  1. Subtract b from both sides: 2x = 13 − 5 = 8
  2. Divide both sides by a: x = 8 / 2 = 4
  3. Check: 2 × 4 + 5 = 8 + 5 = 13 ✓

The calculator returns x = 4 and the check output shows 13, confirming the solution.

Assumptions

  • The equation is linear in x (no x², no 1/x, no absolute value).
  • The coefficient a is not zero; if a = 0, the equation is either always true or never true.
  • All numbers are real; no complex solutions are considered.
  • The calculator uses standard arithmetic operations, so it follows the usual order of operations.

When to Use This Calculator

You would use this tool whenever you have a linear equation of the form a·x + b = c and need to find x. Common situations include:

  • Solving homework problems like “3x + 7 = 22” or “5x − 9 = 1”.
  • Converting between units when the conversion is linear, e.g., Fahrenheit to Celsius: C = (F − 32) × 5/9. If you know F, you can set a = 5/9, b = −160/9, c = C, and solve for F.
  • Finding an unknown quantity in a simple business or science formula, like “total cost = fixed cost + variable cost × quantity” when you know the total and need the quantity.
  • Checking your own algebra: enter your equation and see if your manual solution matches.

The calculator is intentionally limited to one variable and one equation. If you have two equations with two unknowns (like 2x + 3y = 7 and x − y = 1), you need a system solver, not this page.

How to Read the Result

The main output is the value of x that satisfies the equation. For example, if you enter a=1, b=0, c=5, the result is x=5 because 1·5 + 0 = 5. The second output, “Check”, shows what a·x + b evaluates to using the computed x. It should equal c (within rounding). If the check does not match, you likely entered a value for a that is 0, or you have a rounding issue from the display (the calculator stores full precision internally).

When a = 0, the equation becomes b = c. If b equals c, then any x is a solution (the equation is an identity). The calculator will show “Cannot compute” for x because division by zero is undefined; the check output will still show b. If b does not equal c, there is no solution, and the calculator also shows “Cannot compute”. In both cases, you must interpret the situation yourself.

Common Mistakes and Misconceptions

  • Forgetting to subtract b before dividing. A common error is to divide first: (2x + 5)/2 = 13/2, which gives x + 2.5 = 6.5, then x = 4. That actually works, but only if you divide the entire left side. The safest order is subtract then divide.
  • Sign errors. If you have 2x − 5 = 13, you must add 5 to both sides, not subtract. The calculator handles this correctly if you enter b = −5.
  • Misreading the coefficient. In “x + 3 = 7”, the coefficient a is 1, not 0. Enter a=1, b=3, c=7 to get x=4.
  • Thinking x is always a whole number. Many equations yield fractions or decimals. For example, 2x + 1 = 2 gives x = 0.5. The calculator shows decimals, so you can see the exact value.
  • Rounding too early. If you round intermediate steps, your final answer may be off. The calculator does not round internally; only the display is rounded to the chosen decimal places.

Limitations of the Formula

This calculator only handles linear equations in one variable. It cannot solve:

  • Quadratic equations (x² + 2x + 1 = 0) – those need the quadratic formula.
  • Equations with x in the denominator (1/x = 2) – those are rational equations.
  • Equations with absolute values (|x| = 3) – those have two solutions.
  • Systems of equations (x + y = 5, x − y = 1) – those need multiple equations.
  • Exponential or logarithmic equations (2^x = 8) – those need logarithms.

For those cases, use a more specialized calculator or solve analytically. Also, the calculator assumes real numbers; if your equation has no real solution (like x² = −1), this tool won’t help.

Frequently Asked Questions

What if the coefficient a is 0?

If a = 0, the equation becomes b = c. If b equals c, then every x is a solution (infinite solutions). If b does not equal c, there is no solution. The calculator cannot display “all real numbers” or “no solution” as a number, so it shows “Cannot compute” for x. You must interpret based on the values you entered.

Can I solve equations like 2(x + 3) = 10?

Yes, but you need to enter it in the form a·x + b = c. Expand the left side: 2x + 6 = 10, so enter a=2, b=6, c=10. The calculator will give x=2. If you have parentheses, simplify them manually first.

How do I solve for x when x is on both sides?

For example, 3x + 2 = x + 8. First, move all x terms to one side: subtract x from both sides to get 2x + 2 = 8. Then subtract 2 from both sides: 2x = 6, so x = 3. In the calculator, enter a=2, b=2, c=8. The calculator expects the equation in the form a·x + b = c, so you must combine like terms first.

What does “Cannot compute” mean?

It means the expression is undefined, usually because you are dividing by zero. This happens when a = 0. It can also appear if you try to take the square root of a negative number, but that is not possible here. When you see it, check your inputs for a zero coefficient.

Can I use this calculator for equations with fractions?

Yes. Enter fractions as decimals (e.g., 1/3 as 0.3333) or use the division symbol in the input if your browser supports it. For example, to solve (1/2)x + 1 = 3, enter a=0.5, b=1, c=3, and you get x=4. The calculator works with any real numbers.

How do I check if my answer is correct?

The calculator provides a “Check” output that evaluates a·x + b using the computed x. If that output equals c (within rounding), your answer is correct. You can also plug the x value back into the original equation manually. For example, for x=4 in 2x+5=13, compute 2*4+5=13, which matches.

Related

Formula used
in a | Coefficient a (for a·x) | - | 2 | -1000000
in b | Constant b | - | 5 | -1000000
in c | Right-hand side c | - | 13 | -1000000
out x | Solution for x | - | (c - b) / a | 4
out check | Check: a·x + b | - | a * x + b | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →