Linear Equation Calculator
Solve linear equations in the form ax + b = c and find the value of x with a clear formula, worked example, and step-by-step calculation.
Solve a Linear Equation
Enter the coefficient and constants from your equation. The calculator isolates x, displays the solution, and shows how each algebraic step produces the answer.
Your result
—
| Equation | — |
| Coefficient a | — |
| Constant b | — |
| Constant c | — |
| Solution | — |
Step-by-step calculation
What is a linear equation?
A linear equation is an equation in which the highest power of the variable is one. A common one-variable form is ax + b = c, where a, b, and c are constants and a is not zero. The variable x appears only to the first power, so its graph is a straight line when the equation is represented as a function.
Solving a linear equation means finding the value of x that makes the two sides equal. The main goal is to isolate x while preserving equality. Whatever operation is performed on one side of an equation must also be performed on the other side.
How to solve ax + b = c
There are two basic algebraic operations. First, remove the constant b from the left side by subtracting b from both sides. This gives ax = c − b. Next, divide both sides by a to isolate x.
Step 2: ax = c − b
Step 3: x = (c − b) ÷ a
The final formula is therefore x = (c − b) / a. This form is useful when you already know the three numerical values and want to solve directly.
Linear equation example
Consider the equation 5x + 10 = 30.
5x + 10 = 30
Step 2 — Subtract 10 from both sides
5x = 30 − 10
5x = 20
Step 3 — Divide by 5
x = 20 ÷ 5
x = 4
To verify the result, substitute x = 4 into the original equation: 5(4) + 10 = 30. Since both sides equal 30, x = 4 is the solution.
Formula used by the calculator
ax + b = c
Subtract b from both sides:
ax = c − b
Divide by a:
x = (c − b) ÷ a
The formula is valid for the standard one-variable linear equation when a ≠ 0. If a were zero, the expression would no longer be a standard equation that can be solved by dividing by a.
Understanding the role of a, b, and c
Each value has a specific role in the equation ax + b = c:
- a is the coefficient multiplying x.
- b is the constant added to the variable term.
- c is the constant on the right side of the equation.
A negative value is perfectly valid. For example, in −3x + 6 = 15, the coefficient is −3, the constant b is 6, and c is 15. The calculator keeps those signs when constructing the equation and showing the solution steps.
Why keeping both sides balanced matters
An equation can be thought of as a balance between its left and right sides. If you subtract the same number from both sides, equality is preserved. Likewise, dividing both sides by the same nonzero number preserves the solution.
This is why the calculator’s steps first remove b and then divide by a. These operations simplify the equation without changing the value of x that satisfies it.
Common mistakes when solving linear equations
- Changing a sign incorrectly: subtracting a negative number is equivalent to adding its positive value.
- Forgetting to apply an operation to both sides: equality must be maintained throughout the calculation.
- Dividing by the wrong coefficient: the final division is by a, the coefficient of x.
- Entering a as zero: the direct formula requires division by a, so a cannot be zero.
- Skipping the check: substituting the answer back into the original equation is a simple way to catch arithmetic or sign errors.
How to check a linear equation solution
After finding x, substitute it into the original equation rather than a rearranged version. Calculate the left side and compare it with c. If both sides produce the same value, the solution satisfies the original equation.
Where linear equations are used
Linear equations appear throughout mathematics and practical problem solving. They can represent a fixed starting amount plus a value that changes at a constant rate. Examples include simple cost calculations, distance-and-rate problems, unit conversions, budgeting relationships, and introductory algebra.
More advanced models may contain several variables, fractions, inequalities, or systems of equations. Those situations require methods beyond the single-variable formula used on this page.
When this calculator is useful
This calculator is designed for equations that can be expressed as ax + b = c. It is useful for checking homework, learning algebraic rearrangement, verifying hand calculations, and quickly solving straightforward one-variable equations.
It shows the intermediate algebra rather than only displaying a final number, making it easier to see how the constant is moved and how x is isolated.
Frequently asked questions
What is the formula for a linear equation?
For the form ax + b = c, solve for x using x = (c − b) ÷ a, provided that a is not zero.
Can a be negative?
Yes. A can be any nonzero real number, including a negative number. The calculator preserves the sign when calculating the solution.
Why can’t I enter zero for a?
The direct formula divides by a. Division by zero is undefined, so the standard calculation on this page requires a to be nonzero.
Can b or c be negative?
Yes. Both constants can be negative, positive, or zero. Enter the numerical value with its correct sign.
How do I solve 3x − 9 = 12?
Here a = 3, b = −9, and c = 12. The formula gives x = (12 − (−9)) ÷ 3 = 21 ÷ 3 = 7.
What is the difference between a linear and quadratic equation?
A linear equation has the variable to the first power, such as ax + b = c. A quadratic equation contains a second-degree term such as ax².
Does the calculator show the steps?
Yes. After calculation, it shows the original equation, the rearrangement, the division used to isolate x, and a substitution check.
How accurate is the result?
The calculation uses JavaScript numerical arithmetic and displays the result to a practical number of decimal places. For critical work, independently verify the result using the original equation.
