Linear Equation Solver screenshot

Linear Equation Solver

Solve a·x + b = c exactly with rational arithmetic, including the no-solution and every-x cases.

Privacy First
0 Runs
Updated 2026-11-22
No upload
Instant
No signup

Linear Equation Solver

Solve a·x + b = c exactly with rational arithmetic, including the no-solution and every-x cases.

How this page computes

Coefficients are parsed as exact rationals, so 0.5 is one half rather than a binary approximation. The answer prints as a decimal when its denominator divides a power of ten, and as a fraction otherwise.

The calculation runs entirely in this browser tab; nothing is uploaded.

The page solves a linear equation written as a times x plus b equals c. Coefficients may be whole numbers, decimals or fractions, and the answer is exact: 2, 3 and 7 give x equals 2.

When the coefficient of x is zero the page reports either that every x is a solution or that none is, according to whether the constants agree. It never divides by zero to produce a fake answer.

How to use the Linear Equation Solver

Enter a, b and c separated by spaces or commas, meaning a times x plus b equals c, then press Run. The first line restates the equation with the exact values.

The second line shows the rearrangement and the third gives x as a reduced fraction or an exact decimal. A zero coefficient is answered as a case, not as an error.

The rule this page applies

Subtract b from both sides and divide by a, provided a is not zero. If a is zero the equation reduces to b equals c, which is either always true or never true.

Coefficients are parsed as exact rationals, so 0.5 is one half rather than a binary approximation. The answer prints as a decimal when its denominator divides a power of ten, and as a fraction otherwise.

What to Expect

Best for

  • Solving a one-variable equation exactly
  • Checking an answer with fractions
  • Seeing why an equation has no solution

Not ideal for

  • Quadratic or higher-degree equations
  • Systems of two equations
  • Inequalities, which have their own page

What this tool keeps

  • The exact coefficients and the exact solution

What may need cleanup

  • Nothing: the solution is a final rational number

Common errors

  • A zero coefficient with unequal constants is reported as no solution
  • A non-numeric coefficient is refused by name

Example use cases

  • Solve 2x + 3 = 7
  • Solve 0x + 3 = 3

Sample input

2 3 7

Sample output

a·x + b = c with a = 2, b = 3, c = 7 x = (7 - 3) / 2 x = 2

Who this is for

  • Algebra students
  • Readers checking a one-step equation

Frequently asked questions

What order do a, b and c go in?

They are the coefficients of a times x plus b equals c, in that order. 2 3 7 therefore means 2x plus 3 equals 7.

What if a is zero?

The equation becomes b equals c. If the constants are equal every x works; otherwise no x works. The page reports which case applies instead of dividing by zero.

Can the answer be a fraction?

Yes, and it stays exact. The page prints a reduced fraction when the denominator is not a factor of a power of ten, and an exact decimal when it is.

Is anything uploaded?

Nothing is uploaded. The numbers are read and the arithmetic runs in this browser tab with JavaScript, and reloading the page discards both the input and the result.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.