Smekys
Ad Space

Solve for x Calculator

Free solve-for-x calculator for linear equations of the form ax + b = c. Enter a, b, and c to instantly find x with step-by-step algebra.

Enter Values

The number multiplied by x, e.g. the 3 in 3x + 5 = 20. Cannot be 0.

The number added to or subtracted from the x-term, e.g. the +5 in 3x + 5 = 20.

The value the left side equals, e.g. the 20 in 3x + 5 = 20.

Result

Value of x
5
Check: a·x + b
15
Check: c
15
Solution Steps
0

Solving for x is the first real idea in algebra, and once it clicks, nearly every word problem, physics formula, and spreadsheet model becomes approachable. This solve-for-x calculator handles the most common beginner form — a linear equation written as a·x + b = c — and returns the value of x in one step, with the algebra shown so you can follow along.

Type in the coefficient a, the constant b, and the right-hand side c, and the card instantly computes x = (c − b) / a and verifies the result by plugging it back in. Whether you are checking homework, working through a finance problem, or just refreshing math before a placement test, the goal is the same: isolate the unknown and confirm it is correct.

How to Use

  1. Identify your equation as a·x + b = c. For example, in 3x + 5 = 20, the coefficient a is 3, the constant b is 5, and the right side c is 20.
  2. Enter Coefficient of x (a) — the number directly in front of x. If your equation starts with a bare x, then a = 1. If it starts with −x, then a = −1. This value cannot be 0, because 0·x vanishes and the equation no longer has a unique solution.
  3. Enter the Constant term on left (b) — the number added to or subtracted from the x-term. If your equation is 3x − 7 = 14, the subtracted sign means b is −7, not 7.
  4. Enter the Right side (c) — whatever the left side equals after the equals sign.
  5. Read the result card. The highlighted Value of x is your answer. The two check lines show a·x + b and c; they should match, which confirms the algebra is correct.
  6. Use the Solution Steps block to see the two operations — subtract b, then divide by a — written out for your specific numbers.

If the calculator reports an error, almost always it means you set a = 0. A nonzero coefficient is what makes x solvable in one step.

The Formula: Isolating x

Every beginner linear equation follows the same two-step logic. Start with:

a·x + b = c

Undo the addition first by subtracting b from both sides, which keeps the equation balanced:

a·x = c − b

Then undo the multiplication by dividing both sides by a:

x = (c − b) / a

That is the entire trick. Addition and subtraction are undone first, in reverse order, then multiplication and division. The check is automatic: feed x back into the original left side, and a·x + b must equal c. When the two check numbers match, you have not made an arithmetic slip.

For the default example 2x + 5 = 15, subtract 5: 2x = 10, then divide by 2: x = 5. Plugging back in, 2·5 + 5 = 15, which matches c exactly.

Handling Negative Numbers and Fractions

Students stumble most often on signs. If the equation is 3x − 7 = 14, write it as 3x + (−7) = 14, so b = −7. Then x = (14 − (−7)) / 3 = 21 / 3 = 7. The two minus signs become a plus in the numerator, which is where people drop points.

If a is negative, say −2x + 8 = 2, then x = (2 − 8) / (−2) = (−6) / (−2) = 3. A negative divided by a negative is a positive, so x = 3.

If the result is a fraction such as x = 10 / 4, the calculator keeps the decimal form (2.5) for convenience, but you can read it as the unreduced fraction 5/2 when writing on paper.

Why This Matters Beyond the Classroom

The same rearrangement powers practical decisions. If a used phone costs $240 after a 20% discount, you write 0.8·x = 240 and solve x = 300 to find the original price. If your paycheck shows $1,100 after 12% is withheld, you write 0.88·x = 1,100 and get x ≈ $1,250 gross. Every "solve for the unknown" situation — tax, tip, discounts, unit pricing, distance = rate × time — is this same a·x + b = c shape wearing a costume.

Examples

Example 1 — The textbook default. Enter a = 2, b = 5, c = 15, which is the equation 2x + 5 = 15. The calculator subtracts 5 to get 2x = 10, divides by 2, and returns x = 5. The check shows a·x + b = 15, matching c = 15.

Example 2 — A negative constant. Enter a = 3, b = −7, c = 14, which is 3x − 7 = 14. The numerator is c − b = 14 − (−7) = 21, and x = 21 / 3 = 7. The check confirms 3·7 − 7 = 14.

Example 3 — A real money problem. A jacket is on sale for $78.50, and the price tag says that is 60% of the original. Writing 0.60·x = 78.50 means a = 0.60, b = 0, c = 78.50. The calculator returns x ≈ $130.83, the original price. Notice how b = 0 is perfectly valid — the tool simply skips the subtraction step.

Example 4 — A large magnitude. Enter a = 7, b = 300000, c = 7300000. This could model a bulk order: 7 identical units plus a $300,000 setup fee totals $7,300,000. The calculator returns x = 1,000,000, meaning each unit costs $1,000,000 before the setup fee. The engine handles numbers in the millions without rounding error.

FAQ

How do I solve for x in the equation ax + b = c?

Subtract b from both sides to get ax = c − b, then divide by a to get x = (c − b) / a. This two-step rearrangement works for any linear equation in one variable as long as a is not 0.

What if my equation has the x on both sides?

Combining like terms first. Move all x-terms to the left and all constants to the right by adding or subtracting, which collapses the equation back into ax + b = c. For example, 5x + 3 = 2x + 12 becomes 3x − 9 = 0, then 3x = 9, and x = 3.

Why does the calculator reject a = 0?

If a = 0, the equation becomes 0·x + b = c, or b = c. There is no x left to solve: either b equals c (every x works) or b does not equal c (no x works). Either way there is no single unique value for x, so the tool asks for a nonzero coefficient.

Can this calculator solve quadratic or higher-degree equations?

No. This tool is purpose-built for the one-variable linear form ax + b = c. For equations like x² = 9, use a dedicated quadratic solver; for systems of equations with two unknowns, use a system-of-equations solver. Mixing forms gives wrong answers.

How do I handle a negative coefficient like −3x + 6 = 0?

Treat it exactly as written: a = −3, b = 6, c = 0. Then x = (0 − 6) / (−3) = (−6) / (−3) = 2. A negative divided by a negative yields a positive, so x = 2.

Why does the result not match my hand calculation?

The most common slip is the sign of b. If the equation subtracts b on the left, remember that b itself is negative in the formula. Also check that you subtracted b from c before dividing — reversing the order is the second most frequent error. The built-in check lines catch both mistakes quickly.

Disclaimer

This solve-for-x calculator is provided for informational purposes only and for educational practice. It applies the standard linear rearrangement x = (c − b) / a and is not a substitute for a teacher, tutor, or official solution manual. Always verify results by substituting x back into the original equation, and seek qualified help for coursework, exams, or professional work that depends on the answer.

Related Calculators

Disclaimer

Results are estimates for illustration only. Verify important figures independently.