How it works
Solve a single linear equation. A zero coefficient does not determine one unique solution and is rejected.
Inputs and units
| Input | Example value | What to enter |
|---|---|---|
| Coefficient a | 3 | Enter a numeric value. |
| Constant b | -12 | Enter a numeric value. |
Worked example
Show example inputs and results
This example is generated by the same calculation engine using the starting values in the form. Your own inputs produce your own result.
- Coefficient a
- 3
- Constant b
- -12
Complete example results
- Solution for x
- 4
Reading the result
Use quantities on the same basis. The starting value in percentage change, the denominator in a ratio and the length unit in geometry determine the meaning of the answer. Check the formula conditions alongside the example.
Move the equation into ax + b = 0 form
For 3x + 6 = 18, subtract 18 from both sides to get 3x − 12 = 0. Enter a = 3 and b = −12. The result is x = 4, and substitution checks it: 3 × 4 + 6 = 18. Enter the coefficient and constant, not the full equation text.
Keep the sign of the constant
The equation 5x + 15 = 0 uses a = 5 and b = 15, so x = −3. The sign in x = −b/a comes from moving the constant to the other side. If a is zero, the expression no longer determines one unique solution: 0x + 0 = 0 is true for every x, while 0x + 15 = 0 has none.
Questions and answers
Can I use the example values for my own calculation?
The example values illustrate the calculation. Replace every input with your own information, especially dates, rates and the selected operation.
Why are some results rounded?
Results display up to 8 decimal places. Calculations use the unrounded values; very small values use scientific notation. JavaScript floating-point arithmetic can introduce tiny rounding differences.
Are my inputs sent to a server?
The calculator processes inputs in your browser. Its code does not send your values to a server.