Linear Equation

Solve ax + b = cx + d for x.

a x + b = c x + d

Times x on the left

Added on the left

Times x on the right

Added on the right

Enter a, b, c, and d in ax + b = cx + d. When a equals c and b equals d, every real number works. When a equals c and the constants differ, there is no solution.

Enter a, b, c, and d.

How a linear equation is solved

The equation is ax + b = cx + d. Move the x terms to one side and the constants to the other, then divide.

When the two coefficients of x are equal and the two constants are equal, every real number works. When the coefficients match and the constants do not, there is no solution.

How to use this calculator

  1. Enter a and b on the left side, and c and d on the right side.
  2. Read x. The rows below show the left side and the right side at that x.
  3. If the headline is ℝ, every real number is a solution.

Formula

Collect the x terms, then divide.

x from ax + b = cx + d
x=d−ba−c

This division is used when a is not equal to c. When a equals c and b equals d, every real number works. When a equals c and b does not equal d, there is no solution.

Source

A linear equation in one variable is defined on the Wikipedia page on linear equations.

Worked examples

Example: 2x + 3 = 11

a = 2, b = 3, c = 0, d = 11. x = 4. Both sides equal 11.

Example: 3x + 1 = x + 9

a = 3, b = 1, c = 1, d = 9. x = 4. Both sides equal 13.

What to keep in mind

Each of a, b, c, and d can be a number from −1,000,000 to 1,000,000, including decimals. 5x − 2 = 3x + 6 gives x = 4, and both sides equal 18. 2x + 4 = 2x + 4 is true for every real number. 2x + 1 = 2x + 5 has no solution. A completed result, including a, b, c, and d, can be stored in this browser’s local history and never leaves your device. Clear it with the history Clear action or by clearing site data.

Common questions about linear equations

What is x in 2x + 3 = 11?

4. Both sides equal 11.

What is x in 3x + 1 = x + 9?

4. Both sides equal 13.

What is x in 5x − 2 = 3x + 6?

4. Both sides equal 18.

What is x in 2x + 4 = 2x + 4?

Every real number. The two sides match for every x.

What is x in 2x + 1 = 2x + 5?

There is no solution. The x terms match and the constants do not.

Does this calculator store my numbers?

A completed result can be saved in this browser’s local history, including a, b, c, and d. It stays on your device and is not sent to our servers or to analytics. Clear it with the history Clear action or by clearing site data.