Build the equation in the display at the top: click the Var, Num, Op and bracket buttons, or type on the keyboard; click inside the display to move the caret. Learn more about building equations
Clear empties the display, the curved arrow undoes the last edit and the โซ button deletes the character before the caret. Learn more about editing
Click Solve, or press Enter in the display, once the equation is complete; an expression without an equals sign is refused. Learn more about solving
The right panel lists the solution steps, the answer card gives the value marked Exact or Approximate, and the graph shows the line; the box under the solver explains the method. Learn more about the solution
An equation whose variable terms cancel ends in All real numbers or No solution instead of a value. Learn more about special cases
x
Solve linear equations step by step
Enter equation...
Var
Num
Op
Select an equation type or enter your own equation, then click Solve to see the step-by-step solution.
How the solver works
The solver reads one linear equation in x, y or n, expands any brackets and collects the terms, then moves the variable terms to the left and the constants to the right and divides by the coefficient. Each move is listed as a step on the right, and the graph draws the left side as a line with the solution on the horizontal axis. When the variable terms cancel, the equation is reported as an identity (all real numbers) or a contradiction (no solution). Learn more about linear equations
The solver shows an equation display at the top with a blinking yellow caret marking the cursor position. Click anywhere in the display to move the cursor, or use arrow keys, Home, and End for keyboard navigation. Type directly with your keyboard or use the button panel below.
Three quick experiments:
โข Type 2x+3=11 and press Enter โ the right panel shows the step-by-step solution: identify terms, move constants to the right, divide by the coefficient. Final answer x=4. โข Click an example template like "Two Step" โ a random equation of that form loads into the display. โข Use brackets and the multiplication operator to enter things like 3โ (x+2)=15.
The Solve button is disabled until you enter something. Pressing Enter on the display is equivalent to clicking Solve. The graph panel shows the underlying line y=ax+b with the solution marked on the x-axis. An expression without an equals sign is refused with the message "Input must be an equation (use = sign)", and an equation of higher degree with "This equation is not linear". What makes an equation linear is explained in what is a linear equation.
Building Equations with Buttons and Keyboard
DemoBrackets, undo, delete, Solve
Step 0 of 4
The button panel groups inputs by type. All inputs can be made either by clicking or typing on the keyboard.
โข Variable row โ x, y, n. The solver picks up whichever variable appears in your equation. โข Number row โ digits 0 through 9 and the decimal point. โข Operator row โ multiplication, division, plus, minus, equals. โข Bracket buttons โ open and close parentheses for grouping.
Keyboard shortcuts work as expected: type letters and digits directly, use star or slash for multiplication and division (auto-converted to proper symbols on display), and press Enter to solve. Ctrl+Z undoes the last action up to fifty edits back; Backspace deletes the character before the cursor; Delete removes the character after it.
The Clear button empties the display entirely; the curved-arrow button steps back through the undo stack one edit at a time; the โซ button deletes the character before the caret, like Backspace. Why these few symbols are all a linear equation needs is explained in what is a linear equation.
Try an Example โ Eight Form Templates
DemoOpen the templates, load two forms
Step 0 of 4
Click the "Try an Example" header to expand the template panel. Each card generates a random equation of that form. Clicking the same card again produces a new random version.
โข One Step โ x+a=b. Simplest case. โข Two Step โ ax+b=c. The standard introductory form. โข Variables Both Sides โ ax+b=cx+d. Requires moving the variable. โข Distributive โ a(x+b)=c. Practice expanding brackets. โข Fraction Coefficient โ x/a+b=c. Practice clearing fractions. โข Identity โ ax+b=ax+b. Always true. โข Contradiction โ ax+b=ax+c with b๎ =c. Never true. โข Multi-Step โ a(bx+c)+d=e. Combines multiple techniques.
Roughly 80 percent of generated equations have clean integer solutions; the rest produce fractional answers to practice exact computation. Loading a template clears the previous solution; click Solve to work the new equation. The moves the solver applies to every template are listed in the solving process explained.
Reading the Step-by-Step Solution
DemoVariables on both sides, then a fraction answer
Step 0 of 3
The solution panel on the right shows each algebraic move as a labeled step.
โข Identify Terms โ extracts the coefficient and constant from each side. โข Move Variable Terms to Left โ subtracts the right-side variable term from both sides. โข Move Constants to Right โ moves the left-side constant to the other side. โข Divide by Coefficient โ isolates the variable for the final answer.
Each step displays the equation in its before-and-after form with a transformation arrow between them. The final answer card at the bottom shows x= value, marked as Exact when the solution is a clean integer or fraction, or Approximate when it requires decimal expansion.
For equations with brackets, the solver expands them implicitly when collecting terms โ the display applies distribution before identifying coefficients rather than showing it as a separate visible step.
A whole number or a fraction is marked Exact: 3x=7 gives x=7/3, marked Exact with its decimal value 2.333333 in the note, while an answer that needed a decimal expansion is marked Approximate. The box under the solver, How the solver works, summarises the method in a few lines and links to the theory below. The three moves are justified in the solving process explained.
Identity, Contradiction, and Special Cases
DemoAn identity, a contradiction, the Identity template
Step 0 of 4
The solver detects two structural cases that look like linear equations but do not have a single numerical solution.
โข Identity โ all variable terms cancel and the constants match. The equation reduces to something true like 0=0. Solution set is all real numbers. The final answer card displays "All real numbers" with a check mark. โข Contradiction โ all variable terms cancel but the constants do not match. The equation reduces to a false statement like 0=5. There is no solution. The final answer card displays "No solution" with a cross mark.
These cases arise naturally when both sides of the equation are scalar multiples of each other, or when they differ only by a constant. The solver flags them explicitly rather than producing a meaningless numerical answer or crashing on division by zero.
Try the Identity and Contradiction templates from the example panel to see both cases in action. Why the variable can cancel is explained in the solving process explained.
What is a Linear Equation?
A linear equation in one variable is an equation of degree 1 in that variable:
ax+b=c
where a, b, and c are constants and a๎ =0. More generally, both sides can be linear expressions:
ax+b=cx+d
The defining property: each side is a polynomial of degree at most 1 in the variable. No powers higher than 1, no variable in denominators, no roots, no logs, no exponentials involving the variable.
Geometrically, y=ax+b defines a straight line in the plane. Solving ax+b=c amounts to finding the x-coordinate where that line crosses the horizontal line y=c. The graph panel in the solver shows exactly this intersection point.
For deeper coverage see linear equations theory, slope-intercept form, and first-degree polynomials.
Three algebraic moves are sufficient to solve any linear equation.
โข Combine like terms on each side โ collect everything into the form a1โx+b1โ=a2โx+b2โ where the coefficients and constants are explicit numbers. This step also handles distribution of brackets. โข Move variable terms to one side, constants to the other โ subtract a2โx from both sides, then move b1โ to the right. The equation now reads (a1โโa2โ)x=b2โโb1โ. โข Divide by the coefficient โ if a1โโa2โ๎ =0, divide both sides by it. The result is x=(b2โโb1โ)/(a1โโa2โ).
If a1โโa2โ=0, the variable cancels. Then either b1โ=b2โ (identity, every value works) or b1โ๎ =b2โ (contradiction, no value works).
Each move preserves the solution set because applying the same operation to both sides of an equation yields an equivalent equation.
For comprehensive treatment see solving linear equations, balancing equations, and equivalent equations.
Linear Inequalities โ same form as linear equations but with <, >, โค, or โฅ in place of equality. Solved with the same moves, plus sign-flipping when multiplying or dividing by a negative.
Systems of Linear Equations โ two or more linear equations in two or more variables solved simultaneously. Geometrically the intersection of lines or planes.
Slope-Intercept Form โ y=mx+b. The same equation cast as a line in coordinate geometry, with m the slope and b the y-intercept.
Literal Equations โ formulas with multiple variables rearranged to solve for any chosen variable. Same moves apply.
Quadratic Equations โ degree 2 in the variable. Solved by factoring, completing the square, or the quadratic formula.
Linear Functions โ functions of the form f(x)=mx+b. The graph is a straight line.
Identity vs Contradiction โ the two degenerate cases of linear equations where no unique numerical solution exists.