My Calculator

Linear Equation Calculator

Solve any linear equation in one variable — enter it exactly as written, and get the value of x with a plotted diagram and a full step-by-step solution.

Works with x-terms on both sides and simple brackets, e.g. 4(x − 2) = 3x + 1. You can also paste an equation directly into the box.

Math Keyboard

Try an example

Left side (simplified)3x + 5
Right side (simplified)2x + 11
Reduced form1x = 6
x =6

Equation Diagram

The balance scale shows both sides of your equation exactly as entered, and the number line marks where the solution for x actually sits — every value is labeled right on the diagram.

LEFT SIDE3x + 5RIGHT SIDE2x + 11both sides are EQUAL3456789x = 6
Left side of the equationRight side of the equationSolution for x

Step-by-Step Solution

Here's exactly how this answer was calculated, one step at a time.

  1. 1

    Write down the equation

    3x + 5 = 2x + 11

    Start with the equation exactly as given, with one expression on each side of the equals sign.

  2. 2

    Move all x-terms to the left side

    (3x − 2x) + 5 = 11

    Subtract the x-term on the right (2x) from both sides, so every x-term ends up together on the left.

  3. 3

    Move all constants to the right side

    1x = 11 − (5)

    Subtract (or add) the constant on the left from both sides, leaving a single x-term on the left and a single number on the right.

  4. 4

    Simplify both sides

    1x = 6

    Combine like terms on each side into a single coefficient of x and a single constant.

  5. 5

    Divide both sides by the coefficient of x

    x = 6 / 1 = 6

    Dividing both sides by 1 isolates x completely, giving the final value of x.

Final Answer: x = 6

Free Online Linear Equation Calculator

This linear equation calculator solves any linear equation in one variable — type in almost any equation with x on one or both sides, including equations with simple brackets, and get the exact value of x instantly. Along with the answer, you get a plotted balance-scale and number-line diagram and a complete, easy-to-follow step-by-step solution, so you don't just see the result — you see exactly how it was worked out.

Whether you're a student practicing algebra homework, a teacher building worked examples for class, or someone brushing up on math for a job or exam, this linear equation solver removes the tedious manual algebra while still showing every step, so you actually learn the method instead of just copying an answer.

Linear Equation Formula and Standard Form

A linear equation in one variable is any equation where the highest power of the variable is 1 — no x², no x³, just plain x. The general linear equation formula is written as:

  • Standard form: ax + b = c, where a, b, and c are known numbers and x is the unknown variable
  • General form (both sides have x): a₁x + b₁ = a₂x + b₂, which this calculator handles directly
  • Solved form: x = (c − b) / a, obtained after isolating x on one side
  • a is called the coefficient of x, and b and c are constant terms

How to Solve a Linear Equation Step by Step

Solving any linear equation, no matter how it's written, always comes down to the same handful of algebra rules applied in order:

  • Step 1 — Expand any brackets first, distributing a number across every term inside the parentheses.
  • Step 2 — Collect all the x-terms on one side of the equation by adding or subtracting the x-term from the other side.
  • Step 3 — Collect all the constant (plain number) terms on the opposite side, again by adding or subtracting.
  • Step 4 — Simplify both sides so the equation looks like ax = c, a single coefficient times x equals a single number.
  • Step 5 — Divide both sides by the coefficient of x (a) to leave x completely isolated: x = c / a.
  • Step 6 — Check your answer by substituting it back into the original equation — both sides should come out equal.

How to Use This Linear Equation Calculator

Using the calculator is simple: type your equation into the input box exactly as you'd write it on paper — for example, 3x + 5 = 2x + 11, or something with brackets like 4(x − 2) = 3x + 1. You don't need to simplify or rearrange anything first; the calculator handles both x-terms on both sides and simple parentheses automatically.

As soon as you enter an equation, the calculator instantly shows the simplified left and right sides, the reduced ax = c form, and the final value of x. Below that, the balance-scale diagram shows both sides of your exact equation sitting level (since an equation states two things are equal), and the number line marks precisely where your solution for x falls — the value is labeled right on the diagram so you can see it at a glance. Scroll down further for the full step-by-step written solution.

Worked Example

Take the equation 3x + 5 = 2x + 11. First, move the x-terms together by subtracting 2x from both sides: 3x − 2x + 5 = 11, which gives x + 5 = 11. Next, move the constant by subtracting 5 from both sides: x = 11 − 5, so x = 6. You can verify this by substituting x = 6 back into the original equation: 3(6) + 5 = 18 + 5 = 23, and 2(6) + 11 = 12 + 11 = 23 — both sides match, confirming x = 6 is correct.

A slightly trickier example with brackets: 5(x − 2) = 3x + 4. Expanding the left side first gives 5x − 10 = 3x + 4. Moving the x-terms together: 5x − 3x − 10 = 4, so 2x − 10 = 4. Moving the constant: 2x = 4 + 10 = 14. Dividing by the coefficient of x: x = 14 / 2 = 7.

Special Cases: No Solution and Infinite Solutions

Not every linear equation has exactly one solution. If, after moving every term to one side, the x-terms completely cancel out, one of two things happens. If the remaining constants are also equal (giving something like 0 = 0), the equation is called an identity, and it's true for every possible value of x — this is called having infinite solutions. An example is 2(x + 3) = 2x + 6, since both sides simplify to the same expression.

On the other hand, if the x-terms cancel but the remaining constants don't match (something like 0 = 12), the equation is a contradiction and has no solution at all — no value of x can ever make both sides equal. An example is 4x − 9 = 4x + 3, where subtracting 4x from both sides leaves −9 = 3, which is never true. This calculator automatically detects both of these special cases and explains them clearly instead of just showing an error.

Linear Equations vs. Quadratic Equations

The key difference between a linear equation and a quadratic equation is the highest power of the variable involved. A linear equation only has x to the first power (like 3x + 5), so its graph is a straight line and it has at most one solution. A quadratic equation includes an x² term (like x² − 4x + 3), so its graph is a curved parabola and it can have zero, one, or two real solutions found using the quadratic formula. If your equation contains an x² term, this calculator will let you know so you can switch to a quadratic equation calculator instead.

Real-World Applications of Linear Equations

Linear equations aren't just a classroom exercise — they show up constantly in everyday problem-solving:

  • Budgeting and finance: figuring out how many units of something you can afford, or when savings will reach a target amount, given a fixed rate.
  • Business and pricing: calculating break-even points, where total cost equals total revenue for a product or service.
  • Physics and motion: relating distance, speed, and time when an object moves at a constant rate.
  • Cooking and scaling recipes: adjusting ingredient quantities proportionally using a simple linear relationship.
  • Construction and engineering: converting between units, calculating material needs, or working out simple load and cost relationships.
  • Everyday planning: splitting a bill, converting currencies at a fixed rate, or working out how long a fixed budget will last at a steady spending rate.

Tips for Solving Linear Equations Faster

A few habits make solving linear equations much quicker and reduce mistakes: always expand brackets before doing anything else, always perform the same operation on both sides of the equation at the same time, and always double-check your final answer by plugging it back into the original equation. If a problem has fractions, multiplying every term by the common denominator first often turns it into a much simpler equation to solve by hand. And whenever you're unsure about a multi-step equation, this linear equation calculator instantly checks your work and shows every step, so you can compare it against your own working and catch any small errors quickly.

Frequently Asked Questions

What is the formula for a linear equation?

The general formula is ax + b = c, where a, b, and c are known numbers and x is the unknown. Solving for x gives x = (c − b) / a, as long as a is not zero.

How do I solve a linear equation with x on both sides?

Move all the x-terms to one side by adding or subtracting, then move all the constant numbers to the other side the same way. Finally, divide both sides by the coefficient of x to isolate it completely.

What does it mean if a linear equation has no solution?

It means the x-terms cancel out on both sides, but the remaining constants don't match — for example 0 = 5. Since that statement is never true, no value of x can satisfy the equation.

What does it mean if a linear equation has infinite solutions?

It means both sides simplify to exactly the same expression, so the equation is true no matter what value you plug in for x. This happens when the equation is an identity, like 2(x + 3) = 2x + 6.

Can this calculator solve equations with brackets?

Yes. Enter equations with simple brackets like 4(x − 2) = 3x + 1, and the calculator automatically expands them before solving, showing that step in the full solution.

What's the difference between a linear and a quadratic equation?

A linear equation only has x raised to the power of 1, so it graphs as a straight line and has at most one solution. A quadratic equation includes an x² term, graphs as a curve, and can have up to two solutions.