Calculate

Calculate

Updates as you type

Result

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. Move 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.

Solve ax + b = c

Rearrange to x = (c−b)/a. The coefficient a must be non-zero; otherwise it is not a valid one-variable linear equation.

Compute y from y = mx + b

Multiply slope m by x, then add intercept b. This is useful for forecasting and simple trend lines.

Find line from two points

Compute slope m = (y2−y1)/(x2−x1), then intercept b = y1−mx1. The two x-values must be different.

Domain and edge cases

If a = 0 in ax + b = c or x1 = x2 in two-point mode, the line cannot be solved in slope-intercept form.

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

Then the equation is not a standard one-variable linear equation for x. The calculator hides the result.

Yes. Linear equation solutions are often decimals or fractions.

That creates a vertical line with undefined slope, which cannot be written as y = mx + b.

Slope is the rate of change of y with respect to x.

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

For educational and planning use only.

Last reviewed: 2026-08-16 — 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.