An equation-in-x calculator solves an equation for the value or values of x that make both sides equal. Enter the equation using a supported format, and the calculator returns candidate solutions; the exact method depends on whether the equation is linear, quadratic, or a more complex type.
Formula
This calculator solves the quadratic equation ax² + bx + c = 0 with the quadratic formula:
x = (−b ± √(b² − 4ac)) / (2a)
- a is the coefficient of x².
- b is the coefficient of x.
- c is the constant term.
- D = b² − 4ac is the discriminant, which indicates what kind of roots the equation has.
Enter the equation in standard form, with zero on one side. The calculator displays both roots, x1 and x2, plus the discriminant. Coefficients are plain numbers, so no units are required. This setup assumes a is not zero; if a = 0, the equation is linear rather than quadratic. The displayed formula also assumes D is zero or positive, so the square root is real.
Worked Example
Using the default values a = 2, b = 3, and c = −5 gives the equation 2x² + 3x − 5 = 0.
- Calculate the discriminant: D = 3² − 4 × 2 × (−5) = 9 + 40 = 49.
- Calculate the first root: x1 = (−3 + √49) / (2 × 2) = (−3 + 7) / 4 = 1.00.
- Calculate the second root: x2 = (−3 − √49) / 4 = (−3 − 7) / 4 = −2.50.
The solutions are x = 1.00 and x = −2.50. Substitution checks them: 2(1)² + 3(1) − 5 = 0, and 2(−2.5)² + 3(−2.5) − 5 = 0.
What “Solve for x” Means
An equation says that two expressions have the same value. Solving for x means finding every value of x that keeps that equality true. For example, in 2x + 3 = 11, subtracting 3 from both sides and dividing by 2 gives x = 4.
“Equation in x calculator” can refer to a general online solver, not one single mathematical formula. Some tools accept a full equation and try to identify its type; others require coefficients or are designed for a particular form. The calculator above is specifically for quadratic equations, which contain x² but no higher powers of x.
How to Put an Equation in Standard Form
For a quadratic, standard form is ax² + bx + c = 0. Move all terms to one side by adding or subtracting the same expression on both sides, then combine like terms and identify the coefficients, including their signs.
- For x² + 4x = 12, subtract 12 from both sides: x² + 4x − 12 = 0. Here a = 1, b = 4, and c = −12.
- For 3x² = 5x + 2, subtract 5x and 2: 3x² − 5x − 2 = 0. Here a = 3, b = −5, and c = −2.
- For −x² + 7 = 2x, move everything to the left: −x² − 2x + 7 = 0. Here a = −1, b = −2, and c = 7.
The sign is part of each coefficient. Entering c = 5 instead of c = −5 changes the equation and therefore its answers. If a printed equation contains fractions, decimals are acceptable when entered accurately, though exact fractions can help avoid rounding error in hand calculations.
Understanding the Roots and Discriminant
The quadratic formula gives two roots when counted with multiplicity, but they are not always two different real numbers. The discriminant determines the result:
- D > 0: There are two distinct real solutions.
- D = 0: There is one real solution repeated twice; x1 and x2 are equal.
- D < 0: There are no real solutions. There are two complex solutions, which require a calculator that supports complex numbers.
For instance, x² − 5x + 6 = 0 has D = 25 − 24 = 1, so it has two real roots, 2 and 3. By contrast, x² + 1 = 0 has D = −4; its solutions are i and −i, not real numbers. A real-only calculator cannot show those complex roots using the square-root expression in the block.
Choosing the Right Equation Solver
Match the tool to the form and goal of the problem. A linear equation such as 4x − 9 = 7 needs a linear solver, or can be rearranged directly. A quadratic needs a quadratic solver like this one. Equations involving x³ or higher powers, fractions with x in denominators, exponentials, logarithms, or trigonometric functions may need a polynomial, symbolic, or numerical solver.
Some equations have no solution, one solution, or many solutions. A numerical solver may report approximate roots and can depend on the starting guess; it might find one root without proving that no others exist. A symbolic solver may provide exact expressions, but it can still require restrictions such as excluding values that make a denominator zero. Check that a tool supports the equation’s operations and domain before relying on its output.
Common Errors and Limits
Most wrong answers come from entering a different equation than intended, rather than from the quadratic formula itself. Common issues include leaving terms on the right instead of converting to standard form, losing a negative sign, or treating the coefficient of x² as 1 when it is not. If a term is missing, its coefficient is zero: for x² − 9 = 0, b = 0.
Do not round coefficients or intermediate calculations unnecessarily. The calculator rounds the displayed roots to two decimal places, but its formula uses the entered values; a rounded display may not appear to substitute to exactly zero. Substitute unrounded roots, or use more displayed precision, when checking a close result. The quadratic formula does not directly solve equations that are not quadratic, and a real-number implementation cannot represent complex roots when D is negative.
Frequently Asked Questions
How do I solve an equation for x?
Rearrange the equation using the same operation on both sides until x is isolated, or use a solver suited to the equation’s form. For a quadratic, put all terms on one side and use the quadratic formula.
Can a quadratic equation have two answers?
Yes. It can have two distinct real roots when its discriminant is positive. If the discriminant is zero, the roots repeat; if it is negative, the roots are complex rather than real.
What if the x² coefficient is zero?
Then the equation is not quadratic. If the equation has an x term, solve it as a linear equation; if all variable terms disappear, the result may be always true or impossible depending on the remaining constant.
Why does my answer differ from another calculator?
Check that both tools received the same equation and coefficient signs, and compare their rounding settings. A tool may also report complex roots, approximate roots, or solutions within a restricted domain that another tool does not show.
How can I check a solution?
Substitute each proposed value for x into the original equation and evaluate both sides. A valid solution makes the two sides equal, subject to any rounding in the displayed value.
Related
Formula used
in a | Coefficient a | - | 2 | - | - in b | Coefficient b | - | 3 | - | - in c | Constant c | - | -5 | - | - out x1 | First solution x | - | (-b + sqrt(b^2 - 4 * a * c)) / (2 * a) | 2 out x2 | Second solution x | - | (-b - sqrt(b^2 - 4 * a * c)) / (2 * a) | 2 out D | Discriminant | - | b^2 - 4 * a * c | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- SSE Calculator: What It Measures and How It Works
- Power of a Number Calculator: Exponents Explained32.000000
- Power of Two Calculator: Find 2ⁿ1,024
- Greater or Less Than Calculation: How to Compare Values1
- Greater Than 10 Calculator: Compare Any Number
- Calculate Least Squares Regression Equation