molecalculator

Moles & Molar Mass

Calculator for Solving x: Find the Unknown Value

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

Solution x 4.000000
Left side a*x+b
11.000000
= Coefficient of x × Solution x + Constant term
Coefficient of x
2
Set in the form below
Constant term
3
Set in the form below
You enter
Coefficient of x, Constant term, Right-hand side
You get
Solution x, Left side a*x+b
Rounding
6 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 the equation ax + b = c for the unknown value x. Enter the coefficients and constant as signed numbers; it returns x and the value of the left side at that solution as a check.

Formula

For a linear equation written as ax + b = c, subtract b from both sides, then divide by a:

x = (c − b) / a

  • a is the coefficient multiplying x, with no unit specified.
  • b is the constant term added to ax.
  • c is the value on the right-hand side.
  • x is the unknown solution.

The calculator’s second result, ax + b, substitutes the answer into the original left-hand side. For a correct solution it equals c, apart from any tiny display difference caused by rounding. The inputs allow negative values because signed coefficients and constants are valid in algebra. The coefficient a must not be zero: when it is zero, division by a is undefined and the equation does not determine a unique value of x.

Worked Example

Using the calculator’s default values, solve 2x + 3 = 11.

  1. Identify a = 2, b = 3, and c = 11.
  2. Subtract the constant: c − b = 11 − 3 = 8.
  3. Divide by the coefficient: x = 8 / 2 = 4.
  4. Check the left side: a × x + b = 2 × 4 + 3 = 11, matching c.

Assumptions

  • The equation is linear and can be rearranged to the form ax + b = c.
  • The same value of x appears in one term, multiplied by a constant coefficient.
  • a is nonzero, so there is exactly one solution.
  • Inputs are treated as exact numbers for the displayed calculation; rounded input data can make the result only approximate.

What This Calculator Can Solve

This tool is for a one-step linear equation after it has been put into the form ax + b = c. It can also solve equations that look different but simplify to that form. For example, 3x + 4 = 19 uses a = 3, b = 4, and c = 19, giving x = 5. An equation such as 7 − 2x = 1 can be represented with a = −2, b = 7, and c = 1, giving x = 3.

The formula also applies when the right side or constant is negative. For −4x + 6 = −2, calculate x = (−2 − 6) / (−4) = 2. Keeping the minus signs attached to their numbers is important; omitting one can change the answer. If the original equation contains terms on both sides, first collect all the terms involving x on one side and the standalone numbers on the other. Then identify the resulting coefficient, constant, and right-hand side.

How to Enter the Equation

Use the calculator only after expressing the equation in its required form. A reliable rearrangement process is:

  1. Expand parentheses if needed and combine like terms.
  2. Move terms containing x to one side of the equals sign.
  3. Move standalone constants to the other side.
  4. Write the result as ax + b = c, preserving all signs.
  5. Enter the coefficient of x as a, the standalone term on the left as b, and the right-hand value as c.

For example, start with 5x − 2 = 2x + 10. Subtract 2x from both sides and add 2 to both sides to get 3x = 12. This is equivalent to 3x + 0 = 12, so enter a = 3, b = 0, and c = 12. The result is x = 4. The value entered for b is zero because there is no constant term remaining on the left.

Special Cases and Limits

The equation ax + b = c normally has one solution when a is nonzero. If a = 0, the equation becomes b = c and no longer contains x. When b = c, every value of x satisfies the equation, so there are infinitely many solutions. When b and c differ, no value of x satisfies it. In either case, there is no single answer for this calculator to return.

This calculator does not directly solve quadratic equations such as x² − 5x + 6 = 0, equations with x in a denominator, or equations involving functions such as sine or logarithms. Those require different methods and can have multiple solutions, no real solutions, or solutions that need numerical approximation. Do not force an equation with powers or nonlinear terms into the linear formula; simplify only when the algebra genuinely produces a linear equation.

Common Mistakes

  • Entering the wrong sign: In −3x + 5 = 2, the coefficient is −3, not 3. The solution is 1.
  • Using the equation’s original right side without rearranging: For 5x = 2x + 9, first move 2x; the equivalent inputs are a = 3, b = 0, c = 9.
  • Dividing before isolating the variable term: In 2x + 6 = 14, subtract 6 first, then divide by 2. Dividing 14 by 2 immediately does not preserve the equation.
  • Rounding too early: Keep full precision during the calculation and round only the final answer to the accuracy the problem requires.
  • Ignoring units in an applied problem: If the equation represents quantities with units, use consistent units for every term. The algebra cannot correct a mismatch such as adding metres to seconds.

Frequently Asked Questions

How do I solve for x in ax + b = c?
Subtract b from both sides, then divide by a: x = (c − b) / a. This gives one solution provided a is not zero.

What if the coefficient of x is zero?
If a = 0, the equation reduces to b = c. It has infinitely many solutions if those values match, and no solution if they do not.

Can this calculator solve equations with x on both sides?
Yes, if you first move the x terms to one side and constants to the other, then enter the equivalent equation as ax + b = c.

Can I use negative numbers?
Yes. Negative coefficients, constants, and right-hand values are allowed. Keep each negative sign in place when substituting values into the formula.

Why does my answer not match a textbook answer exactly?
Check the rearrangement and signs first. If the equation includes decimal measurements or rounded values, your calculated result may also be approximate; rounding at different stages can create small differences.

Related

Formula used
in a | Coefficient of x | - | 2 | -
in b | Constant term | - | 3 | -
in c | Right-hand side | - | 11 | -
out x | Solution x | - | (c - b) / a | 6
out check | Left side a*x+b | - | a * x + b | 6

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 →