Calculate

3x + 5 = 20

Results update as you type.

Solution

—

The formula

A linear equation has constant rate of change. Common forms are ax + b = c and y = mx + b, where m is slope and b is y-intercept. Two distinct points define one unique line.

ax + b = c → x = (c−b)/a · y = mx + b · m = (y2−y1)/(x2−x1), b = y1−mx1

Worked example

  1. Given 3x + 5 = 20.
  2. Subtract 5: 3x = 15.
  3. Divide by 3: x = 5.

Result: x = 5

How this calculator solves linear equations

Each mode applies a direct algebraic rearrangement of linear forms and shows the matching graph when it helps.

Solve ax + b = c

Rearrange to x = (c−b)/a. If a = 0, the calculator reports no solution (contradiction) or infinite solutions (identity) instead of hiding the result.

y = mx + b

Multiply slope m by x, then add intercept b. The graph marks the point (x, y) on the line.

Line from two points

Compute slope m = (y2−y1)/(x2−x1), then intercept b = y1−mx1. If x1 = x2, the line is vertical (x = x1) and cannot be written as y = mx + b.

Exact vs decimal

When the answer is a simple rational number, the calculator prefers an exact fraction and labels it Exact. Otherwise it shows a decimal approximation.

Interesting facts

Linear models assume constant change

In a linear model, each +1 increase in x changes y by exactly m units.

Two points define one line

Any two distinct points in a plane uniquely determine one straight line.

Used in real-world calculations

Linear equations are used in budgeting, break-even analysis, unit pricing, calibration curves, and basic motion planning.

Frequently asked questions

If b equals c, every x works (infinite solutions). If b differs from c, there is no solution. The calculator shows which case you have.

Yes. When x is a simple fraction, you get an Exact badge and a fractional form alongside the decimal.

That creates a vertical line with undefined slope. The calculator returns x = x1 instead of forcing y = mx + b.

Slope is the rate of change of y with respect to x — rise over run.

Yes. Negative coefficients and coordinates are valid in all supported modes.

References

  1. Linear equations in one variable — Khan Academy Solving ax + b = c style equations step by step.
  2. Elementary algebra references — OpenStax Open textbook coverage of linear equations.

For educational and planning use only.

Last reviewed: 2026-10-12 — Reviewed by: Editorial Team

Embed this calculator

Add this calculator to your website with a free iframe widget.

Theme

The widget stretches to the width of its container and adjusts its height automatically.