Skip to content
    Algebra

    How to Solve a Linear Equation for x

    Your taxi fare comes to $20, and you know the flat fee and the rate per kilometer — but how far did you actually go? A linear equation is hiding that answer. Unlock it in four simple steps.

    Math Solver Academic Editorial Board4 min read

    Key takeaways

    • ax + b = c rearranges to x = (c - b) ÷ a.
    • Always undo addition/subtraction before undoing multiplication/division.
    • If a = 0, there's no x term, so the equation has either infinite solutions or none.
    • Check your answer by substituting it back into the original equation.
    In this guide
    1. 01What is a linear equation?
    2. 02Why does solving for x matter?
    3. 03The formula
    4. 04How to solve for x step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you'll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is a linear equation?

    A linear equation in one variable looks like ax + b = c: some number (a) times x, plus another number (b), equals a known total (c). "Solving" means finding the single value of x that makes the equation true.

    Why does solving for x matter?

    Most everyday costs are built the same way: a fixed part plus a rate that depends on how much you use. Once you can solve ax + b = c, you can work backward from any total to find the hidden quantity — distance traveled, hours worked, items bought.

    A taxi with a $5 flat fee and $3 per kilometer charges the same formula whether you ride 1 km or 50 km. Solving for x is how you turn "the total was $20" into "you traveled 5 km".

    The formula

    ax + b = c → x = (c - b) ÷ a
    SymbolWhat it meansExample
    aThe coefficient of x3
    bThe constant added to ax5
    cThe value the whole left side equals20
    xThe unknown you're solving for5

    How to solve for x step by step

    1. 1Write the equation as ax + b = c. Make sure everything with x is on one side.
    2. 2Move b to the other side. Subtract it from c: ax = c - b.
    3. 3Divide both sides by a. This isolates x: x = (c - b) ÷ a.
    4. 4Check your answer. Substitute it back into the original equation to confirm both sides match.

    Enter your own a, b, and c below to solve any linear equation instantly.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Algebra
    Middle School

    Linear Equation Solver

    Solve linear equations in the form ax + b = c

    ax + b = c → x = (c - b) ÷ a

    Δ = -215.0 (No Real Roots)
    120
    120
    133

    💡 Example

    Reference
    Inputs:a=2, b=3, c=11
    Result:4
    Open the full Linear Equation Solver calculator

    Common mistakes to avoid

    • Forgetting to divide the whole side by a, not just part of it.
    • Dividing by zero. If a = 0, there's no x term left, so the equation either has infinite solutions (if b = c) or no solution at all (if b ≠ c).
    • Skipping the check. Plugging your answer back in takes seconds and catches almost every arithmetic slip.

    Tips and tricks

    • If you have two unknowns and two equations instead of one, you need the simultaneous equations solver.
    • To find the steepness of the line this equation describes, use the slope formula calculator.
    • Estimate first: round a, b, and c to easy numbers to sanity-check your exact answer.

    Where you'll use it in real life

    • Transportation: taxi and rideshare fares built from a flat fee plus a per-distance rate.
    • Utilities: phone or electricity bills with a base charge plus a usage charge.
    • Work: hourly wages plus a fixed bonus or deduction.
    • Shopping: working out how many items you bought from a total receipt and a per-item price.

    Quick summary

    To solve ax + b = c, subtract b from c, then divide by a. Watch out for a = 0, and always check your answer by substituting it back in. Try the calculator above with your own numbers to see every step worked out.

    Worked example

    A taxi charges a $5 flat fee plus $3 per kilometer. Your total fare came to $20. How many kilometers did you travel? That's 3x + 5 = 20.

    1. 013x + 5 = 20
    2. 023x = 20 - 5
    3. 033x = 15
    4. 04x = 15 ÷ 3
    5. 05x = 5

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

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

    Subtract b from c, then divide the result by a: x = (c - b) ÷ a.

    What if a is 0?

    There's no x term, so the equation simplifies to b = c. If that's true, x can be any number (infinite solutions); if it's false, there's no solution.

    What's the difference between an equation and an expression?

    An expression (like 3x + 5) has no equals sign and can't be "solved". An equation (like 3x + 5 = 20) sets two expressions equal, so you can solve for the unknown.

    How do I check my answer to a linear equation?

    Substitute your value of x back into the original equation. If both sides come out equal, your answer is correct.

    #Algebra#Middle School#Linear Equation Solver
    Updated

    Keep reading

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX