Math Calculator

Linear Equation Solver

Solve linear equations exactly.

Equation inputs

Keep the equation and its exact solution together.

Enter one equals sign with an expression on each side. Use the selected variable.

Entry and display options

Each entry mode keeps its own source values when you switch modes.

Changing the variable renames its letters in the typed equation.

Load a worked example

Use parentheses for grouping, explicit or implicit multiplication, and division by nonzero constant expressions. Multiplication and division have equal precedence and are read from left to right. Group a fractional coefficient before multiplying it by the variable. Powers, functions, multiple variables, variable denominators and nonlinear products are unsupported.

Exact solutions, classification and substitution checks do not change when this setting changes.

Numeric literals retain sixty significant decimal digits and scientific input exponents from negative one hundred through positive one hundred. Integer fractions in coefficient mode retain sixty digits per integer. Typed equations support six hundred characters, one hundred sixty arithmetic tokens and sixteen nested parentheses or unary signs. Exact numerators and denominators are bounded to eighteen hundred digits. Decimal displays use half-away-from-zero rounding and scientific notation for very large or sub-resolution nonzero values.

One solution

x=4x=4

Decimal view

x=4x=4

The solution set is over the real numbers. Classification uses exact coefficients, and a unique solution is checked in both original expressions. A rounded decimal display does not replace the exact fraction.

Equation as parsed

2⋅x+3=112\cdot x+3=11

Review the grouping and operators before using the answer. Multiplication is typeset explicitly, and a fraction bar groups its full numerator and denominator.

Your equation solved step by step

  1. Read the equation

    2⋅x+3=112\cdot x+3=11

    Parse the selected variable and supported arithmetic with standard precedence. Multiplication and division are evaluated from left to right; parentheses make denominator grouping explicit.

  2. Simplify both sides

    2x+3=112x+3=11

    Distribute constant factors and combine variable terms separately from constants. Finite decimal sources are exact rational values, so no display rounding enters this step.

  3. Collect the variable terms

    2x+3=112x+3=11

    Subtract the right-side variable term from both sides. The remaining variable coefficient is the exact difference of the two original coefficients.

  4. Collect the constant terms

    2x=82x=8

    Subtract the left constant from both sides. Applying the same operation to both sides preserves the solution set.

  5. Divide by the nonzero coefficient

    x=82=4x=\frac{8}{2}=4

    The collected coefficient is nonzero, so division produces exactly one real solution. Keep its reduced fraction before choosing a rounded decimal display.

  6. Substitute into the original expressions

    2⋅(4)+3=112\cdot \left(4\right)+3=11

    Replace every occurrence of the selected variable with the exact solution, keeping the original operations and grouping.

  7. Verify equality exactly

    11=11,Δ=011=11,\qquad \Delta=0

    Both sides evaluate to the same exact value. The left-side value minus the right-side value is zero; rounded decimal coincidence is not used as the verification test.

Inputs saved with this equation

Entry mode
Typed equation
Selected variable
x
Typed equation
2x + 3 = 11
Rounded decimal places
6

All result details

The table records both simplified sides and the collected equation. A unique solution adds exact substitution values and their difference. Identity and contradiction cases keep their coefficient records without inventing a numeric solution. Approximate decimal displays are marked; CSV retains every exact digit.

Linear equation calculation details
QuantityExact valueRounded decimalInterpretation
Left variable coefficient2222After distributing constant factors and combining like terms on the left.
Left constant3333Constant term in the simplified left expression.
Right variable coefficient0000After distributing constant factors and combining like terms on the right.
Right constant11111111Constant term in the simplified right expression.
Collected variable coefficient2222Left variable coefficient minus right variable coefficient.
Isolated right constant8888Right constant minus left constant.
Exact solution4444Reduced rational solution; changing decimal places leaves it unchanged.
Original left side at the solution11111111Exact substitution into the left expression.
Original right side at the solution11111111Exact substitution into the right expression.
Verification difference0000Original left-side value minus original right-side value.
What Can You Create?

Solve an equation while preserving the reasoning behind its answer

A single exact solution

Type a complete equation or enter four side coefficients, then follow the exact collection of terms. Fractions, finite decimals and constant expressions remain rational quantities throughout the process. A unique answer is shown as a reduced fraction with a separate decimal view, followed by substitution into the original parsed expressions and an exact equality check rather than a tolerance-based numerical guess.

Variables and grouping on both sides

Work with constant factors around brackets, constant denominators and variable terms on either side of the equals sign. The equation preview makes parsed multiplication and fraction grouping visible before the working is used. Swapping sides preserves the answer, while the variable selector changes the chosen unknown letter. Independent coefficient mode helps inspect the same general form without requiring a longer typed expression.

Identities, contradictions and invalid syntax

Read a clear real-number solution set when the variable terms cancel. An identity, a contradiction and a malformed or unsupported expression are different outcomes, so the tool keeps them separate. It does not turn a zero denominator into a convenient replacement, divide by a zero collected coefficient, or silently cancel a variable denominator and lose a restriction from the original equation.

Formulas and worked examples

Linear equation formulas and step-by-step examples

A supported expression simplifies to a variable term and a constant. Write the two sides as ax+bax+b and cx+dcx+d, where the coefficients are exact real rational values supplied by the entered numbers and constant arithmetic. Collecting terms gives Ax=BAx=B, with A=a−cA=a-c and B=d−bB=d-b. The value of AA decides whether isolating a unique solution is possible.

ax+b=cx+d⟹(a−c)x=d−bax+b=cx+d\quad\Longrightarrow\quad(a-c)x=d-bA≠0: x=BA,A=0, B=0: x∈R,A=0, B≠0: ∅A\ne0:\ x=\frac{B}{A},\qquad A=0,\ B=0:\ x\in\mathbb{R},\qquad A=0,\ B\ne0:\ \varnothing
  1. Start with the default equation and isolate the unknown

    For 2x+3=112x+3=11, the left coefficient is 22, the left constant is 33, and the right expression has zero variable coefficient and constant 1111. Collecting the variable term leaves it unchanged, then subtracting 33 from both sides gives 2x=82x=8. Dividing by the nonzero coefficient gives x=4x=4. Substitution returns 2(4)+3=112(4)+3=11, so the original left value and right value agree exactly.

  2. Distribute a constant before collecting terms

    For 2(x+3)=102(x+3)=10, distributing the factor gives 2x+6=102x+6=10. Subtracting the constant gives 2x=42x=4, and division gives x=2x=2. The substituted original expression is 2(2+3)=102(2+3)=10. The parentheses matter: 2x+3=102x+3=10 would be a different equation. Inspect the parsed equation before using the solution, especially when entering a longer expression with several bracketed terms.

  3. Keep fractional coefficients exact

    For (2x−1)/3=(x+2)/4(2x-1)/3=(x+2)/4, the simplified sides are (2/3)x−1/3(2/3)x-1/3 and (1/4)x+1/2(1/4)x+1/2. The collected coefficient is 2/3−1/4=5/122/3-1/4=5/12, and the isolated constant is 1/2−(−1/3)=5/61/2-(-1/3)=5/6. Therefore x=(5/6)/(5/12)=2x=(5/6)/(5/12)=2. Substitution gives both original sides the exact value 11. No rounded approximation to either fractional coefficient is needed to obtain or verify this result.

  4. Distinguish cancellation from an invalid division

    For 3(x+2)=3x+63(x+2)=3x+6, simplification gives 3x+6=3x+63x+6=3x+6, then 0=00=0 after collecting terms. Every real value works. Replacing the final constant with 77 gives 0=10=1, which has no solution. Neither case permits division by the zero collected coefficient. An expression such as x/x=1x/x=1 instead has a variable denominator and is rejected by this grammar; treating it as an all-real identity would lose the excluded value x=0x=0.

Use equality-preserving steps and check the original expression

The OpenStax treatment of variables and constants on both sides explains collecting terms. Its general linear-equation strategy includes simplification, classification and checking. The examples here are independently evaluated calculations. This solver additionally states its parser limits, real-number interpretation and exact display conventions so the computed answer has a clear mathematical meaning.

Why Users Love This Tool

Keep algebra transformations exact and their conditions visible

Precision in the operations that decide the answer

  • Finite decimal digits are retained as exact rational values rather than rounded before solving.
  • A tiny nonzero collected coefficient stays distinct from an exact zero.
  • Both original sides are evaluated at a unique exact solution and compared directly.
  • Changing decimal places affects presentation without changing coefficients, classification or verification.

Working that can be inspected and saved

  • Equation entry supports familiar brackets and linear constant arithmetic with stated precedence.
  • Unsupported powers, variable denominators and nonlinear products receive specific validation messages.
  • Identity and contradiction outcomes explain why a single numeric answer is unavailable.
  • Source records, complete CSV, copying, sharing and print keep the problem attached to its method.
Perfect For

Equation support for practice, teaching and checking a rearrangement

Students building algebra confidence

Compare the entered equation with its simplified sides, then inspect how variable terms and constants are collected. Preset examples include brackets, fractions, an identity and a contradiction. A substitution check connects the isolated answer back to the original problem. Use the worked transformations to explain the solution independently instead of relying only on the headline value.

Teachers presenting contrasting cases

Change coefficients to move between one solution, no solution and all real solutions. Closely spaced decimal coefficients demonstrate why an exact zero matters. The coefficient mode makes those changes easy to isolate, while typed mode shows familiar classroom notation. Print or share an example with its active inputs so another learner can inspect the same assumptions and reproduce the working.

People checking a one-unknown model

Enter a linear balance, simple cost relationship or other equation after defining its units and variable. The solver checks mathematical equality for the entered expressions; it does not choose the model or verify external measurements. Keep the exact source record when using fractional or small coefficients, and check whether the selected real-number domain matches the practical interpretation of the problem.

How It Works

How it works in three quick steps.

1

Choose typed equation or coefficient entry

Type a complete equation with one equals sign, or enter the variable coefficient and constant for each side. Select the unknown letter before reviewing the result. Typed input supports parentheses and constant arithmetic as well as variable terms on both sides. The two entry modes keep their own source values when switched, and example buttons load distinct worked situations.

2

Review the parsed equation and exact classification

Check the typeset grouping before using the result. The solver simplifies each side, collects variable terms and constants, then classifies the exact collected equation. A nonzero coefficient produces one solution; a zero coefficient produces either an identity or a contradiction. Invalid syntax, nonlinear products, variable denominators and division by zero receive an input error instead of a fabricated answer.

3

Check substitution and save the full working

For a unique solution, compare the original left and right expressions evaluated at the exact answer. Their difference must be exactly zero. Choose a rounded decimal display separately from the reduced fraction. Copy a summary, share active settings, download all exact table rows or print the source record and algebra. The browser print dialog can save the same record as a PDF.

Download & Print

Keep the entered equation, solution set and verification together

Download every exact table value

CSV retains active sources, the classification, simplified side coefficients, collected values and any unique solution with its substitution checks. The method record also preserves plain-text versions of the algebra steps. Large reduced numerators and denominators remain complete strings, avoiding an early conversion to binary floating-point values. Import unusually large exact columns as text when using spreadsheet software that would otherwise round them.

Print the method or save a PDF

Review the browser print preview before saving or printing. Navigation and editing controls are removed, while the outcome, typeset equation, transformation steps, source record and complete native table remain. Landscape orientation gives explanatory table columns more room. Extremely long exact expressions use an explicit compact notice on paper; retain the CSV alongside the PDF when the full digits are needed for those cases.

Share a reproducible algebra example

Share equation stores the active validated mode and source strings in a URL fragment, keeping the page canonical unchanged. A recipient can reopen and edit the same supported equation. Section links move focus without overwriting the shared fragment, and Reset clears it while restoring the original example. Copy summary provides a plain-text alternative for notes or messages when an editable link is unnecessary.

FAQ

Frequently Asked Questions

Which linear equations can this solver handle?
You can type one-variable equations containing finite decimals, scientific notation, parentheses, addition, subtraction, constant multiplication and division by nonzero constant expressions. Variable terms may appear on both sides. Implicit multiplication is supported before the selected variable or an opening parenthesis. Alternatively, enter the coefficient and constant for each side directly. The parser keeps every supported intermediate expression linear; powers, functions, multiple unknowns, variable denominators and products of two nonconstant variable expressions are outside this tool's supported grammar.
How does the solver work when the variable is on both sides?
After simplifying each side, write the equation as ax+b=cx+dax+b=cx+d. Subtracting the right variable term and the left constant gives (a−c)x=d−b(a-c)x=d-b. When a−c≠0a-c\ne0, divide by that exact coefficient to obtain x=(d−b)/(a−c)x=(d-b)/(a-c). The tool displays these transformations and substitutes the result into both original expressions. Applying the same permitted operation to both sides preserves the solution set; the special zero-coefficient cases are classified before any division is attempted.
Can I enter brackets, fractions and decimal coefficients?
Yes. For example, 2(x+3)=102(x+3)=10 and (2x−1)/3=(x+2)/4(2x-1)/3=(x+2)/4 are supported. Parentheses group the numerator or denominator you intend, and division by a nonzero constant can create an exact fractional coefficient. Finite decimal source digits are treated as exact rational values, so 0.1x+0.2=0.50.1x+0.2=0.5 has the exact solution x=3x=3. Coefficient-entry mode also accepts signed integer fractions directly. A finite decimal approximation to a recurring value remains that finite value; convert the recurring quantity deliberately before using it.
What do multiplication and division mean in typed input?
Multiplication and division have equal precedence and are processed from left to right. Use parentheses to remove ambiguity, especially when a fraction sits beside a variable. To mean a fractional coefficient multiplying the unknown, group the fraction explicitly, as in (1/2)x=3(1/2)x=3. To divide a full expression by a constant, group the numerator, as in (x+1)/2=3(x+1)/2=3. The typeset equation shows multiplication signs and grouped fraction bars so you can inspect how your input was interpreted before relying on its answer.
When does an equation have no solution or infinitely many solutions?
If collecting terms leaves 0x=B0x=B, there is no valid division by the coefficient. When B≠0B\ne0, the resulting contradiction is false for every real value and the solution set is empty. When B=0B=0, the equation is an identity and every real value works. For example, 3(x+2)=3x+73(x+2)=3x+7 has no solution, while 3(x+2)=3x+63(x+2)=3x+6 is an identity. Exact coefficient arithmetic keeps a very small nonzero coefficient distinct from a true zero.
Why are variable denominators and nonlinear products rejected?
A denominator containing the variable can exclude values from the original domain. Cancelling it without tracking those restrictions could turn a conditional statement into a false all-real identity. This solver therefore rejects expressions such as x/x=1x/x=1 and 1/x=21/x=2 rather than treating them as ordinary linear input. It also rejects a product whose two factors both retain variable terms. Higher-degree expressions that might cancel after further manipulation are outside the supported workflow; use a tool designed to track those operations and domains.
How is a unique solution checked?
The solver substitutes the exact reduced rational solution into the original parsed operations, retaining their grouping in the displayed working. It then evaluates both sides with exact arithmetic and records their values and difference in the table. A successful check has identical left and right values and a zero difference. Rounded decimal agreement is not used as a substitute for this equality test. Identity and contradiction cases retain their collected coefficient records without inventing a single number to substitute.
Can I change the unknown, swap sides or switch input modes?
The variable selector provides four common unknown letters and renames the selected letter in the typed equation. The swap-sides control reverses the equation while preserving its solution set, in either typed or coefficient mode. Switching entry modes retains each mode's own values, so inspect the active source record after switching. Example buttons deliberately load their named equation using the default unknown. Reset restores the original worked example and clears shared settings from the URL fragment. These controls do not change the mathematical meaning of an already valid equation.
What input size and decimal accuracy are supported?
Numeric literals support sixty significant decimal digits and scientific exponents from negative one hundred through positive one hundred. Coefficient fractions support sixty digits per signed integer. A typed equation may contain up to six hundred characters, one hundred sixty arithmetic tokens and sixteen nested parentheses or unary signs. Exact numerators and denominators are bounded to eighteen hundred digits. The decimal display uses zero through twelve places with half-away-from-zero rounding and scientific notation for extreme nonzero values; it never changes classification or the exact fraction.
Can I save the exact solution and its steps?
Copy summary keeps the active inputs, classification, exact coefficient values, solution and verification record in plain text. Share equation copies an editable URL fragment with active validated settings, preserving the entered source strings. CSV includes every exact table row and the method record. Print removes navigation and editing controls while retaining typeset working and source settings; choose Save as PDF in the browser to create a document. Very long exact expressions use an explicit compact print notice, while the CSV retains their complete digits.
About This Tool

About this exact one-variable linear equation solver

Toolarithm's Linear Equation Solver connects a source equation to a complete solution classification. A familiar two-step exercise is one use case, but variable terms on both sides, fractional constants and bracketed expressions require the same underlying care: preserve equality while simplifying and keep the original problem available for checking. The typed and coefficient entry modes expose those relationships from two perspectives, with independent source values so an editor change does not silently rewrite an unrelated input mode.

The calculation engine represents supported numeric sources as exact rational values. It reduces every supported expression to a variable coefficient and a constant, subtracts the right coefficient and left constant, then checks the resulting equation before dividing. A nonzero coefficient gives one exact solution. A zero coefficient leads to either an identity or a contradiction, depending on the isolated constant. Classification therefore does not depend on a floating-point tolerance or a rounded decimal display that could hide a meaningful difference.

A unique solution is substituted back into the original parsed operations, and the exact values of both sides are retained with their difference. The grammar deliberately excludes operations that would require a wider algebra system or extra domain tracking, including variable denominators and nonlinear intermediate products. This keeps the promised real-number interpretation explicit. Accessible LaTeX and MathML carry the symbolic working in both server-rendered default content and interactive results. Source records, plain copying, editable links, full CSV and print give the saved answer enough context to remain reviewable after the original session.

Editorial Transparency

Who maintains this page

Ownership and review

Written and maintained by the Toolarithm editorial team. No review date is shown without a maintained editorial record. No independent professional review is claimed.

Methodology

Equations are checked by substituting worked examples into the stated relationship and comparing the result with the interactive implementation.

Read the editorial methodology

Dates and sources

Review dates change only after a substantive method or content check.

Keep building

Explore more calculators

Calculators hub