Linear Equation Calculator
Solve ax + b = c, find the equation of a line through two points, or work with y = mx + b. See the graph and the steps.
Calculate
3x + 5 = 20
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.
Worked example
- Given 3x + 5 = 20.
- Subtract 5: 3x = 15.
- 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
- Linear equations in one variable Solving ax + b = c style equations step by step.
- Elementary algebra references Open textbook coverage of linear equations.