This linear equation calculator solves a supported equation in one variable and shows its working and an exact check.
How to solve a linear equation
A linear equation equates expressions whose variable terms have constant coefficients. Expand parentheses and combine like terms on each side. Apply the same addition or subtraction to both sides to collect variable terms and constants. Divide by the remaining nonzero coefficient, then check the answer in the original equation.
Enter both sides as written instead of extracting coefficients. Open Calculation details to see the working and check. Paul's Online Math Notes explains equal operations on both sides and substitution into the original equation.
Choose a letter for the unknown, express each quantity using that letter, and set equal quantities on opposite sides. Enter the resulting equation. The calculator does not translate prose or decide whether the equation represents the situation.
Entering fractions, decimals and parentheses
Enter one equals sign and use the same single ASCII letter, a-z or A-Z, with the same case throughout. Each side accepts integers, finite decimals, +, -, *, / and parentheses. A decimal point may appear before or after the digits, but a number must contain digits. A leading plus or minus is allowed before a number, variable or group. Spaces separate tokens; they do not join digits.
Use / for fractions and parentheses around a multi-term numerator. For (m-2)/3+1=2m/7, the exact result is m = -7. The denominator must be a nonzero expression containing no variable. OpenStax: Fractions explains fraction arithmetic; OpenStax: Equations with Fractions or Decimals explains equivalent equations with fractional coefficients.
Multiplication may be implicit between a number and a letter or opening parenthesis, between a closing parenthesis and a letter or opening parenthesis, or between a letter and an opening parenthesis. Examples are 2x, 2(x+1), (2)(x+1), (2)x and x(2+3). At most one factor may contain the variable. In other positions, write * explicitly.
Multiplication and division have equal precedence and run left to right, including implicit multiplication. Thus 1/2x means (1/2)*x. Write x/2 or (1/2)*x to make that grouping clear. Addition and subtraction follow multiplication and division; parentheses override that order.
Finite decimals are exact entered values. For 0.1x=0.3, the calculator treats 0.1 as 1/10 and returns x = 3. Answers remain reduced fractions or integers, without decimal rounding. Mixed-number notation is unsupported; write a sum such as 1+1/2, or an improper fraction. Scientific E notation and recurring-decimal notation are unsupported.
A worked equation with both sides checked
Enter 3(x+5)=2(-6-x)-2x, the worked equation in Paul's Online Math Notes.
Distribute across each parenthesized sum: (3) × (x + 5) = (3)x + 15; (2) × (−x − 6) = (-2)x − 12.
Combine like terms on each side: (3)x + 15 = (-4)x − 12.
Subtract the right variable term from both sides: (7)x + 15 = -12. Subtract (-4)x from each side.
Subtract the left constant from both sides: (7)x = -27. Subtract 15 from each side.
Divide both sides by the variable coefficient: x = (-27) / (7) = -27/7.
Substitute into the original equation: 3((-27/7)+5)=2(-6-(-27/7))-2(-27/7). Check at x = -27/7: left side = 24/7; right side = 24/7; difference = 0.
One solution, no solution or all real values
After collecting terms, the equation has the form Ax = B. If A is nonzero, divide both sides by A for the unique solution x = B/A. If A and B are both zero, every real value works. If A is zero but B is nonzero, no value works. OpenStax: General Strategy for Linear Equations calls these conditional equations, identities and contradictions.
For 2x+3=7, the calculator returns x = 2. For 2y+6=2(y+3), it reaches 0 = 0, an identity. For 5z=5z-1, it reaches 0 = -1, a contradiction. A variable disappearing does not by itself mean there is no solution. Read the remaining equality.
Division by zero is an input error, not a no-solution result. An identity or contradiction has no single value to substitute; its collected constant equality explains the classification.
Supported equations and input limits
This tool solves one supported equation in one real variable. It also classifies constant-only equalities. It does not find a line through points, draw graphs, solve simultaneous equations, read photos or accept software commands.
Powers, roots, functions, absolute-value bars, inequalities, square brackets, comma grouping and multiple variables are unsupported. A product cannot have a variable expression in both factors, even if the variable terms would later cancel. A denominator cannot contain a variable, even if it would simplify to a constant. These restrictions also exclude some expressions that could be simplified into a linear equation by hand.
Calculator Campus limits each equation to 256 characters including spaces, each number to 64 digits including leading zeros, and parentheses to 16 nested levels. These are software limits, not mathematical limits on linear equations. Correct the indicated input error before reading a new result.
For an equation with a squared unknown, the Quadratic Equation Calculator accepts its coefficients in the matching form. The Fraction Calculator evaluates fraction arithmetic without an unknown. The Ratio Calculator handles comparisons and missing terms in proportions.
When several linear equations constrain the same unknowns, solve them together with the System of Equations Calculator. It checks the shared solution against every equation and identifies inconsistent or dependent systems.
When your data are coordinate points or the coefficients of a line, the Slope Calculator finds its slope and equation, with signed rise-over-run working.