Linear Equation Solver
Solve a linear equation of the form ax + b = c
Enter the three values from your linear equation to find x. The solver handles standard, no-solution, and infinite-solution cases and verifies the answer.
How to solve a linear equation and what the result means
A linear equation is an equation where the unknown variable, usually called x, appears only to the first power — no x-squared terms, no square roots, just x multiplied by a constant. The standard form used by this solver is ax + b = c, where a is the coefficient of x, b is a constant on the left side of the equation, and c is the value on the right side. Solving means finding the value of x that makes the equation true.
The method is straightforward: subtract b from both sides to isolate the ax term, then divide both sides by a to get x alone. The result is x = (c - b) / a. This formula works for any values of a, b, and c as long as a is not zero. When a is zero, the equation changes character entirely — it becomes a statement about whether b equals c, rather than a question about x.
The solver also provides a verification step. After calculating x, it substitutes that value back into the original left side (a times x plus b) and confirms the result matches c. This check catches any arithmetic errors and gives you confidence that the solution is correct. If the verification output does not match c, there is an error somewhere in the input — this acts as a built-in sanity check.
The slope of the line y = ax + b is shown as an additional piece of information. Every linear equation in this form corresponds to a straight line when graphed. The coefficient a is the slope of that line, which tells you how steeply it rises or falls. A positive slope means the line goes up from left to right. A negative slope means it goes down. A slope of zero means the line is horizontal.
When a linear equation has no solution or infinite solutions
Most linear equations have exactly one solution. But two special cases arise when a equals zero. If a is zero and b does not equal c, the equation becomes something like 0 = 5, which is never true. This means no value of x can satisfy the equation, and the system has no solution. This situation is called an inconsistent equation.
If a is zero and b equals c, the equation becomes something like 4 = 4, which is always true. Any value of x would satisfy it because x does not appear in the equation at all. This is called a dependent or identity equation, and the solution set is all real numbers. Both of these cases are handled by this solver with clear explanations rather than an error message.
In practice, no-solution and infinite-solution cases often appear when you are simplifying or combining equations and need to check whether your system is consistent. They also appear in geometry when testing whether two lines are parallel (no intersection, no solution) or the same line (infinitely many shared points).
Setting up your equation in the correct format
Before using this solver, make sure your equation is in the form ax + b = c. If you have an equation written differently, rearrange it first. For example, if you have 5x = 2x + 9, subtract 2x from both sides to get 3x = 9, then rewrite as 3x + 0 = 9, giving a = 3, b = 0, c = 9. If you have 2(x + 3) = 14, expand the brackets to get 2x + 6 = 14, giving a = 2, b = 6, c = 14.
Negative coefficients are fully supported. If your equation is -4x + 7 = 3, enter a = -4, b = 7, c = 3. Decimal values also work. For example, 1.5x + 0.5 = 5 gives a = 1.5, b = 0.5, c = 5, and the solver returns x = 3. The results are displayed to two decimal places. If you need an exact fractional answer for a problem that produces an irrational or repeating decimal, note that the displayed result is rounded.
This solver handles one-variable linear equations only. For systems of two linear equations with two unknowns, use the Simultaneous Equation Solver on this site. For polynomial equations involving x-squared or higher powers, use the Quadratic Equation Solver or a more specialized tool. Linear equations are the simplest type and the most common starting point in algebra, making this solver useful for students, homework checks, and quick calculations where you need to isolate a variable rapidly.