Skip to content
CalculatorAtlas

Linear Equation Calculator

Tested

Solve ax + b = c for x.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

A linear equation ax + b = c has the solution x = (c − b) ÷ a. For 2x + 3 = 11, x = (11 − 3) ÷ 2 = 4.

Enter a, b and c. The calculator returns x.

Related tools: Linear Interpolation Calculator: Interpolate a value between two known points. Line Equation from Two Points Calculator: Equation of the line through two points. Slope Calculator: Slope, angle, distance and line equation through two points.

How to use the Linear Equation Calculator

  1. Enter a.
  2. Enter b.
  3. Enter c.
  4. Press Calculate to see the result, and use Reset to start again.
Inputs of the Linear Equation Calculator
InputWhat to enterAllowed values
aA number—
bA number—
cA number—

Formula and method

Formula

x = (c − b) ÷ a

IEEE-754 double precision; shown to at most 6 decimal places.

Isolate x; a must not be 0.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: a = 2; b = 3; c = 11.

Results of example 1
ResultValue
x4

Example 2

Inputs: a = -5; b = 0; c = 10.

Results of example 2
ResultValue
x-2

The first line is the headline result (x). IEEE-754 double precision; shown to at most 6 decimal places.

Check

Substitute back: 2(4) + 3 = 11 ✓. The steps are subtract b from both sides, then divide by a.

When a = 0

If a = 0 the equation has either no solution or every number as a solution, so a must be non-zero. For two unknowns you need a system of equations.

How the result changes with a

Holding every other input at the first worked example, this table changes only a. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.

How the result changes with a
ax
18
24
42
81

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • a: entering "0" shows "a must not be 0." beside that field and no result.

Choosing between the Linear Equation Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Linear Equation Calculator and similar calculators
CalculatorYou enterIt returns
[Linear Interpolation Calculator](/math/linear-interpolation/)x₁, y₁ and x₂Interpolated y
[Line Equation from Two Points Calculator](/math/line-equation-from-two-points/)x₁, y₁ and x₂Equation
[Slope Calculator](/math/slope-calculator/)x₁, y₁ and x₂Slope
[LCM Calculator](/math/lcm-calculator/)numbersLeast common multiple
[Factor Calculator](/math/factor-calculator/)numberFactors

Background: algebra

Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.

If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.

Assumptions and limitations

  • a ≠ 0

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for a to confirm this.

Frequently asked questions

What is x in 5x − 10 = 15?

Add 10 to get 5x = 25, so x = 5.

What if the equation has x on both sides?

Move the x terms to one side first.

Is every linear equation solvable?

Yes, provided a ≠ 0: then x = (c − b) ÷ a has exactly one solution.

What does the Linear Equation Calculator calculate?

Solve ax + b = c for x. It returns x.

What formula does the Linear Equation Calculator use?

x = (c − b) ÷ a. Isolate x; a must not be 0.

What do I need to enter in the linear Equation Calculator?

You enter a, b and c.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. a ≠ 0.

What is an example of a linear Equation result?

With a 2, b 3 and c 11, the x is 4.

Sources

  • OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.