Linear Equation Solver
Use this Linear Equation Solver to enter values, adjust options, and review results in a compact responsive workspace.
Results are calculated automatically as you enter data.
Use one variable, decimals, or simple fractional coefficients such as 1/2x.
Formula and interpretation
▼ See explanations and tips below ▼
Related Calculators
What Is a One-Variable Linear Equation?
A one-variable linear equation is an equation that contains one unknown value, usually written as a single letter such as \(x\), and the variable is only raised to the first power. A simple example is:
The goal is to find the value of the variable that makes the equation true. That value is called the solution.
Solving a linear equation is really a process of keeping both sides balanced. Whatever operation you use on one side of the equals sign, you must use the same operation on the other side. This keeps the equation equivalent while you rewrite it into a simpler form.
A one-variable linear equation can have:
- One solution, such as \(x = 7\).
- All real numbers as solutions, when both sides are always equivalent.
- No solution, when the equation simplifies to a false statement.
Why Solving Linear Equations Matters
Linear equations are one of the foundations of algebra. They appear whenever a quantity changes by a constant amount or when a relationship can be written with a fixed part and a variable part.
Students use linear equations to practice algebraic thinking, but the idea also appears in everyday and applied problems. For example, you might use a linear equation to work backward from a total cost, compare two simple plans, solve for an unknown measurement, or check whether two expressions describe the same value.
Learning to solve these equations also builds habits that matter in later math: combining like terms, using inverse operations, checking results, and recognizing when a problem has no single answer.
Key Terms to Know
- Variable: A letter that represents an unknown number.
- Coefficient: The number multiplied by the variable. In \(5x\), the coefficient is \(5\).
- Constant: A number without a variable, such as \(-3\) or \(12\).
- Like terms: Terms that have the same variable part, such as \(4x\) and \(-x\).
- Equivalent equations: Equations that have the same solution set.
- Solution: A value that makes the equation true when substituted for the variable.
- Identity: An equation that is true for every real value of the variable.
- Contradiction: An equation that is false for every real value of the variable, so it has no solution.
How Solving a Linear Equation Works
A useful way to understand one-variable linear equations is to rewrite both sides in the form “coefficient times the variable plus a constant.”
For example, many one-variable linear equations can be viewed like this:
where:
- \(a\) is the coefficient of the variable on the left side.
- \(b\) is the constant on the left side.
- \(c\) is the coefficient of the variable on the right side.
- \(d\) is the constant on the right side.
To solve, collect the variable terms on one side and the constant terms on the other side:
Factor out the variable:
If \(a - c \ne 0\), divide by the remaining coefficient:
That final step isolates the variable, which means the variable is by itself with a coefficient of \(1\).
There are two special cases:
- If \(a - c = 0\) and \(d - b = 0\), the equation is an identity. The solution is all real numbers.
- If \(a - c = 0\) and \(d - b \ne 0\), the equation is a contradiction. There is no solution.
Examples of Linear Equations in Practice
Example 1: A Basic One-Solution Equation
Solve:
Add \(5\) to both sides:
Divide both sides by \(3\):
Check the answer by substituting \(7\) back into the original equation:
The solution is:
Example 2: Variables on Both Sides
Solve:
Subtract \(x\) from both sides:
Add \(9\) to both sides:
Divide by \(3\):
The solution is:
This means \(5\) is the only value that makes both sides equal.
Example 3: Fraction Coefficients
Solve:
Add \(3\) to both sides:
Multiply both sides by \(2\):
Fraction coefficients are handled with the same balancing idea. The main difference is that multiplying by the reciprocal can make the equation easier to solve.
Example 4: Identity and No-Solution Cases
An identity happens when both sides reduce to the same expression. For example:
After distributing on the right side, this becomes:
If you subtract \(2x\) from both sides, you get:
That statement is always true, so every real number is a solution.
A no-solution equation produces a false statement. For example:
Subtract \(5x\) from both sides:
That statement is false, so the equation has no solution.
How to Interpret the Result
A result such as \(x = 4\) means the equation has one real solution, and replacing the variable with \(4\) makes the original equation true.
If the result is All real numbers, the equation is an identity. The variable cancels out and the remaining statement is true, so every real number works.
If the result is No solution, the equation is a contradiction. The variable cancels out and the remaining statement is false, so no value works.
When a solution is shown as a fraction and a decimal, the fraction is often the more exact and compact form. The decimal form is useful for quick comparison or estimation. For example:
and
describe the same solution, but the fraction shows the repeating value more clearly.
A verification check is a way to confirm the result. It substitutes the solution into the original equation and compares the left side with the right side.
Common Mistakes and Misconceptions
One common mistake is entering or writing an expression instead of an equation. A linear equation needs an equals sign, such as \(2x + 3 = 11\). An expression like \(2x + 3\) can be simplified or evaluated, but it cannot be solved for a single value unless it is set equal to something.
Another common mistake is treating every equation as if it has one solution. Some linear equations are identities, and some are contradictions. If the variable terms cancel out, the remaining number statement tells you which case you have.
It is also easy to forget to perform the same operation on both sides. Adding, subtracting, multiplying, or dividing only one side usually changes the equation and leads to a wrong answer.
Fractions can cause errors when users divide by the wrong number or forget that dividing by a fraction is the same as multiplying by its reciprocal. For example:
means:
Another mistake is expecting a linear equation solver to handle nonlinear expressions. Terms such as \(x^2\), \(xx\), roots, powers, and products of variables are not one-variable linear terms.
When to Use Linear Equation Solving
Use linear equation solving when you need to find an unknown value in a relationship that can be written with one variable to the first power.
Common uses include:
- Checking algebra homework or practice problems.
- Solving equations with variables on both sides.
- Working with decimals, negative numbers, or fraction coefficients.
- Finding the break-even point in a simple fixed-plus-variable situation.
- Reversing a simple formula to find an unknown value.
- Identifying whether an equation has one solution, all real numbers, or no solution.
Limitations and Things to Keep in Mind
The algebraic method works for one-variable linear equations. It does not apply directly to equations with powers, roots, products of variables, trigonometric functions, logarithms, or multiple variables.
For this calculator, the equation should be entered as a one-variable linear equation with exactly one equals sign. It is designed for a single-letter variable and terms that can be collected into coefficient-and-constant form.
Keep these practical limits in mind:
- Parentheses and distribution are part of algebra, but this calculator expects the equation to be entered without parentheses.
- Multi-letter variable names are not supported.
- Equations with more than one variable are not supported.
- Nonlinear terms such as \(x^2\) or repeated variables such as \(xx\) are not supported.
- A denominator of zero is invalid.
- Decimal output is rounded for display when a rational has a repeating decimal expansion.
- Fraction output shows the exact reduced rational result, including denominators larger than \(10000\).
- Integers, decimals, fractions, and scientific-notation literals are parsed as exact rational values before the equation is classified. Extremely long literals or exponents are rejected to keep calculations safe.
For important schoolwork, exams, tutoring, or professional use, do not only copy the final answer. Review the steps and check the solution in the original equation.
How to Use This Calculator
- Enter a one-variable linear equation with exactly one equals sign.
- Use one single-letter variable, such as \(x\).
-
Write coefficients before the variable, such as \(2x\), or use input notation such as
2*x. - Use integers, decimals, or fractions for coefficients and constants.
- Review the solution, decimal form, fraction form, verification check, and step-by-step work.
- Use the verification result to confirm that the solution makes both sides of the original equation match.
Frequently Asked Questions
What makes an equation linear?
A one-variable equation is linear when the variable appears only to the first power and the equation can be rewritten in a form such as \(ax + b = 0\) or \(ax + b = cx + d\). Terms such as \(x^2\), \(\sqrt{x}\), and products involving variables are not linear.
Why can I do the same operation to both sides?
An equation says that two expressions are equal. If you add, subtract, multiply, or divide both sides by the same valid value, the balance is preserved and the new equation has the same solution set. The main exception is division by zero, which is undefined.
What does “All real numbers” mean?
“All real numbers” means every real value of the variable makes the equation true. This happens when both sides of the equation are equivalent after simplifying and collecting like terms.
What does “No solution” mean?
“No solution” means there is no value of the variable that makes the equation true. In a linear equation, this often happens when the variable terms cancel out and the remaining statement is false, such as \(0 = -1\).
Should I use the fraction result or the decimal result?
Use the fraction result when you want an exact compact form, especially for values such as \(\frac{1}{3}\) or \(\frac{7}{8}\). Use the decimal result when you want a quick approximation or when decimals are easier to compare.
Sources and References
Books
- Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis. Elementary Algebra 2e. OpenStax, 2020. Chapter 2, “Solving Linear Equations and Inequalities,” especially Sections 2.3–2.5, Chapter 2 Key Terms, and Chapter 2 Key Concepts. OpenStax online edition.
- Jay Abramson. College Algebra 2e. OpenStax, 2021. Section 2.2, “Linear Equations in One Variable.” OpenStax Section 2.2.