Connect via MCP →

Enter Calculation

Solves the equation a·x + b = c·x + d.

Formula

Advertisement

Results

Solution
x = 2
Unique solution
Equation a·x + b = c·x + d
Rearranged x = (d − b) / (a − c)
a − c 2

What it does

This calculator solves any linear equation that has the variable on both sides, written in the form \(a \cdot x + b = c \cdot x + d\). You provide the four numbers — the two coefficients of x and the two constant terms — and the tool returns the exact value of x, along with the rearranged formula and intermediate steps. It also detects special cases such as no solution or infinitely many solutions.

How to use it

Rewrite your equation so it matches the pattern \(a \cdot x + b = c \cdot x + d\). For example, \(3x + 5 = x + 9\) gives \(a = 3\), \(b = 5\), \(c = 1\), \(d = 9\). Enter those four values and read the answer. Coefficients and constants may be negative or decimal.

The formula explained

Starting from \(a \cdot x + b = c \cdot x + d\), subtract \(c \cdot x\) from both sides to collect the variable terms: \((a - c) \cdot x + b = d\). Then subtract b from both sides: \((a - c) \cdot x = d - b\). Finally divide by \((a - c)\):

$$x = \frac{d - b}{a - c}$$

The division is only valid when \(a - c\) is not zero. If \(a = c\) and \(b = d\), the equation is an identity true for every x (infinitely many solutions). If \(a = c\) but \(b \neq d\), the equation is a contradiction with no solution.

Advertisement
Diagram showing terms moving across an equals sign to isolate x
Collect variable terms on one side and constants on the other to solve ax + b = cx + d.

Worked example

Solve \(3x + 5 = x + 9\). Here \(a = 3\), \(b = 5\), \(c = 1\), \(d = 9\). Then $$x = \frac{9 - 5}{3 - 1} = \frac{4}{2} = 2.$$ Check: \(3(2) + 5 = 11\) and \(1(2) + 9 = 11\). Both sides match, so \(x = 2\).

Balance scale staying level with x terms on one pan and numbers on the other
An equation behaves like a balanced scale: the same operation on both sides keeps it level.

FAQ

What if my equation has terms in a different order? Combine like terms first so each side is a single x-term plus a single constant before entering the values.

Why did I get "no solution"? This happens when a equals c but b does not equal d — the x-terms cancel and you are left with a false statement like \(5 = 9\).

Can it handle decimals or negatives? Yes. Enter values like \(a = -2.5\) or \(d = 0\); the formula works for any real numbers as long as \(a - c \neq 0\).

Last updated: