An equation asks a simple question: "what value of x makes the left side equal to the right side?" This equation solver takes three coefficients — a, b, and c for the equation a·x² + b·x + c = 0 — and returns the real root or roots, along with the discriminant and the formula used. Set a to 0 and it automatically solves a linear equation; leave a non-zero and it solves the quadratic case. When the discriminant is negative, the parabola never crosses the real x-axis, and this numeric tool reports the real part of the roots rather than printing complex numbers with the imaginary unit i.
Whether you are checking algebra homework, working through a word problem, or debugging a physics formula, the result updates as you type. No sign-up, no step cost — just the real solution or solutions and the math behind it.
How to Use
- Identify the form of your equation. If it has an x² term, you have a quadratic. If the highest power of x is 1, you have a linear equation.
- Enter Coefficient a (x²) — the number multiplied by x². For a linear equation such as 2x + 6 = 0, set a = 0.
- Enter Coefficient b (x) — the number multiplied by x. In 2x + 6 = 0, b = 2.
- Enter the Constant c — the loose number moved to the left side. In 2x + 6 = 0, c = 6.
- Read the result card. For a linear equation you get a single solution x. For a quadratic you get the discriminant D, the root type (two real, one repeated, or two complex), and the two roots.
- Move any term across the equals sign by flipping its sign before entering it. The calculator always assumes the equation is written as a·x² + b·x + c = 0, with everything on the left and 0 on the right.
If the result card flags the equation as degenerate — "0 = 0" or "0 = a non-zero number" — it means a and b are both 0 and there is either no single answer or infinitely many answers.
Linear Equations: ax + b = 0
When a = 0, the equation collapses to b·x + c = 0. The solution is one line:
x = −c / b
Worked example: 2x + 6 = 0. Here b = 2, c = 6, so x = −6 / 2 = −3. Check it: 2(−3) + 6 = −6 + 6 = 0. Correct.
The only failure mode is b = 0. If both a and b are 0, then the equation reads c = 0. When c is also 0, every x works (an identity); when c is not 0, no x works (a contradiction). The solver flags both instead of dividing by zero.
Quadratic Equations: ax² + bx + c = 0
For a non-zero a, the roots come from the quadratic formula:
x = (−b ± √(b² − 4ac)) / (2a)
The expression under the square root, D = b² − 4ac, is the discriminant. It tells you the shape of the answer before you compute anything:
- D > 0 — two distinct real roots. The parabola crosses the x-axis twice.
- D = 0 — one repeated real root (a double root). The parabola touches the axis at a single point.
- D < 0 — two complex conjugate roots. The parabola never touches the real x-axis, but it still has perfectly valid roots in the complex plane.
Worked example: x² − 5x + 6 = 0. Here a = 1, b = −5, c = 6. The discriminant is D = (−5)² − 4(1)(6) = 25 − 24 = 1. Because D is positive, there are two real roots: x = (5 ± √1) / 2, giving x = 3 and x = 2. The equation factors as (x − 2)(x − 3) = 0, which is a nice way to verify the answer by hand.
Examples
Example 1 — A phone bill (linear). A cell phone plan charges $35 per month plus $0.15 per minute of calls. You want to know how many minutes x bring the bill to exactly $50. Write 0.15x + 35 = 50, then move 35 to the left: 0.15x − 15 = 0. Here a = 0, b = 0.15, c = −15. The solver gives x = 15 / 0.15 = 100 minutes. At 100 minutes of calls the bill hits $50 exactly.
Example 2 — A discounted shirt (linear). A shirt is on sale for 20% off and the discounted price is $48. If p is the original price, then p minus 20% of p equals $48: 0.80p = 48, or 0.80p − 48 = 0. The solver returns p = 48 / 0.80 = $60 as the original price.
Example 3 — Projectile motion (quadratic). A ball thrown upward from ground level follows height h = 50t − 5t² (in meters). To find when it hits the ground, solve 50t − 5t² = 0. Rewrite as −5t² + 50t + 0 = 0, so a = −5, b = 50, c = 0. The discriminant is D = 2500, and the roots are t = 0 and t = 10. The ball starts on the ground at t = 0 and lands again after 10 seconds.
Example 4 — Large coefficients (quadratic). The equation x² − 1,000,001x + 1,000,000 = 0 factors as (x − 1)(x − 1,000,000) = 0. The solver handles coefficients at or above 1,000,000 without overflow and returns the two roots 1 and 1,000,000, confirming that factoring works even for very large numbers.
FAQ
What is the difference between a linear and a quadratic equation?
A linear equation has x raised only to the first power (for example, 3x − 12 = 0) and has exactly one solution. A quadratic equation contains an x² term (for example, x² − 9 = 0) and can have two real roots, one repeated real root, or two complex roots. Set coefficient a to 0 in this tool to force the linear case; set it non-zero for the quadratic case.
How do I move terms to one side of the equals sign?
Move every term to the left side and leave 0 on the right. When a term crosses the equals sign, flip its sign. For example, 4x = 12 becomes 4x − 12 = 0, so a = 0, b = 4, c = −12. Then x = 12 / 4 = 3.
What does the discriminant tell me?
The discriminant D = b² − 4ac appears under the square root of the quadratic formula. If D is positive there are two real roots; if D is zero there is one repeated real root; if D is negative the roots are complex conjugates with an imaginary part. Checking D first is a quick way to predict the type of answer.
Can this solver handle negative or complex roots?
Negative coefficients and negative real roots are normal — just enter them directly. When the discriminant is negative, the two roots are complex conjugates that involve the imaginary unit i. This numeric calculator does not print those complex numbers; instead it shows the real part (−b / 2a) and flags the case, so you know the parabola never touches the real x-axis. For the exact complex form, write √(−D) and pair it with i on paper.
What if my equation has more than one x² or more than one x?
Combine like terms first. If you see 2x² + 3x² − x + 5x − 2 = 0, add the x² coefficients (2 + 3 = 5) and the x coefficients (−1 + 5 = 4) before entering: a = 5, b = 4, c = −2. The solver expects a single x² term, a single x term, and a single constant.
Why does the solver say the equation has no solution?
That happens when a = 0 and b = 0 but c is not 0. The equation then reads 0·x + c = 0, or c = 0, which is a contradiction no value of x can satisfy. If a, b, and c are all 0, the equation is an identity and every x works. In both degenerate cases the tool flags the situation instead of dividing by zero.
Disclaimer
This equation solver is provided for informational purposes only and does not constitute mathematical, engineering, or academic advice. Results are computed from the exact coefficients you enter using the standard linear and quadratic formulas; always verify critical solutions by substituting the root back into the original equation. The authors are not responsible for any errors in calculated results or for decisions made based on this tool.