Cubic Equation Calculator
What is the Cubic Equation Calculator?
What this calculator does
Enter the four coefficients of a cubic, a, b, c, and d, plus a Test x value. The calculator returns the f(x) at test value, the Simplified discriminant part, the Sum of roots (-b/a), and the Product of roots (-d/a) for the equation ax³ + bx² + cx + d = 0.
It analyzes the cubic; it does not solve it
Nowhere does the page list the roots themselves. It tells you what kind of roots to expect, what they add to, what they multiply to, and whether a test value happens to be one of them. Finding the actual roots still takes factoring or the rational root theorem by hand.
The test value is a root detector
If f(x) at test value comes out exactly 0, your test value is a root of the equation. That turns guessing into a system: the rational root theorem lists candidate factors of d over factors of a, and this box tests each candidate in about a second.
The page default, decoded
The calculator opens with a = 1, b = −6, c = 11, d = −6: the cubic x³ − 6x² + 11x − 6. Its test value of 1 returns f(x) equal to 0, revealing 1 as a root. The other two roots are 2 and 3, as the following blocks confirm.
The discriminant sorts the roots
The discriminant of a cubic is 18abcd − 4b³d + b²c² − 4ac³ − 27a²d². Positive means three distinct real roots, zero means a repeated root, and negative means one real root with two complex partners. For the default cubic it equals 4, matching its three roots 1, 2, and 3.
Worked example: a repeated root
Enter a = 1, b = 0, c = −3, d = 2, the cubic x³ − 3x + 2. The discriminant is 0, announcing a repeated root. Testing x = 1 gives f(x) equal to 0, and the roots are 1, 1, and −2, whose product matches the Product of roots result, −2.
Worked example: complex roots appear
Enter a = 1, b = 0, c = −2, d = 4, the cubic x³ − 2x + 4. The discriminant is −400, so only one root is real. Testing x = −2 returns f(x) equal to 0, and the remaining pair is 1 + i and 1 − i, invisible on the graph.
Worked example: a leading coefficient of 2
Double the default cubic to 2x³ − 12x² + 22x − 12 by setting a = 2, b = −12, c = 22, d = −12. The roots stay 1, 2, and 3, the sum and product read 6 and 6, but the discriminant swells to 64. Testing x = 2 returns 0.
Vieta's formulas do the bookkeeping
The Sum of roots (-b/a) and Product of roots (-d/a) are two of Vieta's formulas, named for the French mathematician François Viète. They hold for every cubic, real roots or not. The default sum of 6 matches 1 + 2 + 3, and its product of 6 matches 1 x 2 x 3.
The missing third Vieta value
Vieta also promises that the pairwise sum of roots equals c/a, which for the default is 1x2 + 1x3 + 2x3 = 11. The calculator does not display this value; only the sum and the product appear among the results. Compute c/a yourself when a problem asks for the pairwise total.
Using sum and product to check roots
Once you find candidate roots by factoring, add them and multiply them, then compare against the two results. If your three roots for the default cubic did not sum to 6 and multiply to 6, one of them is wrong. This check catches sign slips that graphing alone misses.
What a nonzero test result means
A test value that returns anything besides 0 is simply not a root, but the number still speaks: it is the height of the curve at that x. For x³ − 3x + 2 at x = 2, f(x) is 4, so the graph passes through the point (2, 4) without crossing there.
Why the discriminant looks so complicated
The discriminant is built from squared differences between the roots, stretched by the leading coefficient. Distinct roots spread apart keep it positive; a repeated root forces one difference to zero, collapsing the whole expression to 0. The five-term formula is just that geometry translated into coefficients.
The a coefficient cannot be zero
Setting a to 0 turns the equation into a quadratic, and the formulas rebel: both the Sum of roots (-b/a) and the Product of roots (-d/a) divide by a. The discriminant degenerates as well. Keep a nonzero, or switch to a quadratic tool for a genuinely squared equation.
Complex roots travel in pairs
When the discriminant is negative, the two nonreal roots are conjugates, one with +bi and one with −bi. Their sum and product stay real, which is why the calculator's sum and product look ordinary even for x³ − 2x + 4, whose hidden pair is 1 + i and 1 − i.
Graphing agrees with the discriminant
Three distinct real roots mean the graph crosses the x-axis three times; a repeated root means it touches the axis and turns around at the repeated value; one real root means a single crossing. Sketching the cubic after reading the discriminant is a reliable precalculus and Algebra 2 exercise.
Common mistake: expecting the roots as output
Students open this page hoping to read off the x values and leave frustrated. The outputs are analysis, not answers: a test evaluation, a discriminant, a sum, and a product. Plan to factor, test rational root candidates with the f(x) box, and verify with the sum and product.
Common mistake: sign slips in b and d
The formulas use −b/a and −d/a, with a negation built in. For x³ − 6x² + 11x − 6, b is −6, so the sum of roots is a positive 6. Entering b as 6 because the term looks like minus 6x² corrupts every result that follows.
Precision on the outputs
The f(x) at test value prints to six decimal places, while the discriminant, sum, and product print to four. With whole-number coefficients the results are exact anyway. Decimals in the coefficients propagate honestly through all five terms of the discriminant, so recheck your entries before doubting the math.
Where cubics show up in class
Cubic equations anchor Algebra 2 and precalculus units on polynomial functions, end behavior, and the rational root theorem. Volume problems, where a box's dimensions multiply out to a cubic, are the classic application. This page's analysis mirrors the questions those courses ask before any root is named.
Testing a root reveals a factor
Every confirmed root hands you a factor: since f(−2) is 0 for x³ − 2x + 4, the factor (x + 2) divides the cubic exactly, leaving a quadratic whose formula yields the other two roots. The test box and synthetic division together form a complete solution strategy.
Scaling all coefficients changes little
Multiplying every coefficient by the same constant leaves the roots, their sum, and their product untouched, yet multiplies the discriminant by that constant raised to the fourth power. Doubling the default cubic turned 4 into 64. The roots never moved; only the discriminant's scale did.
Reading the discriminant label honestly
The field is labeled Simplified discriminant part, but the formula it runs is the complete standard discriminant of a cubic, all five terms present. Nothing has been simplified away: 18abcd − 4b³d + b²c² − 4ac³ − 27a²d² is the full expression textbooks print. Trust the number, whatever the label says.
End behavior in one sentence
Every cubic with positive a falls away to the left and rises to the right, crossing the axis at least once, which is the graph's promise that a real root always exists. The discriminant merely refines that promise into one crossing or three, distinct or repeated along the way.
With the pre-filled defaults — a (x³ coefficient) 1, b (x² coefficient) -6, c (x coefficient) 11, d (constant) -6, Test x value 1 — the Cubic Equation Calculator returns f(x) at test value 0. 000000, Simplified discriminant part 4. 0000, Sum of roots (-b/a) 6. 0000, Product of roots (-d/a) 6. 0000.
Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Cubic Equation Calculator
- 1Enter the cubic coefficient in the a (x³ coefficient) field — for example, 1; it must not be 0.
- 2Enter the quadratic coefficient in the b (x² coefficient) field, keeping its sign, such as −6 for a − 6x² term.
- 3Enter the linear coefficient in the c (x coefficient) field, such as 11, and the constant in the d (constant) field, such as −6.
- 4Type a candidate root into the Test x value field; factors of d divided by factors of a are the smart guesses.
- 5Read the f(x) at test value result: exactly 0 means your test value is a root of the cubic.
- 6Read the Simplified discriminant part: positive means three distinct real roots, zero a repeated root, negative one real root and two complex roots.
- 7Read the Sum of roots (-b/a) and Product of roots (-d/a) results to learn what your three roots must add and multiply to.
- 8Test another candidate and repeat until the roots you find satisfy both the sum and the product checks.
Formula
This is the core equation the Cubic Equation Calculator uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Default cubic x³ − 6x² + 11x − 6, test x = 1 | f(1) = 1 - 6 + 11 - 6 = 0; discriminant terms 7128 - 5184 + 4356 - 5324 - 972 = 4 | f(x) = 0, discriminant = 4, sum of roots = 6, product of roots = 6 (roots 1, 2, 3) |
| Repeated root: x³ − 3x + 2, test x = 1 | f(1) = 1 + 0 - 3 + 2 = 0; discriminant terms 0 + 0 + 0 + 108 - 108 = 0 | f(x) = 0, discriminant = 0, sum of roots = 0, product of roots = -2 (roots 1, 1, −2) |
| One real root: x³ − 2x + 4, test x = −2 | f(−2) = -8 + 0 + 4 + 4 = 0; discriminant = -400 | f(x) = 0, discriminant = -400, sum of roots = 0, product of roots = -4 (roots −2, 1 + i, 1 − i) |
| Scaled cubic 2x³ − 12x² + 22x − 12, test x = 2 | f(2) = 16 - 48 + 44 - 12 = 0; discriminant = 64 | f(x) = 0, discriminant = 64, sum of roots = 6, product of roots = 6 (roots 1, 2, 3) |
Value Reference Table
See how the f(x) at test value changes as a (x³ coefficient) moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| a (x³ coefficient) | f(x) at test value | Simplified discriminant part | Sum of roots (-b/a) | Product of roots (-d/a) |
|---|---|---|---|---|
| 0.3 | -0.700000 | -374.2800 | 20.0000 | 20.0000 |
| 0.5 | -0.500000 | -169.0000 | 12.0000 | 12.0000 |
| 0.8 | -0.200000 | -6.8800 | 7.5000 | 7.5000 |
| 1 | 0.000000 | 4.0000 | 6.0000 | 6.0000 |
| 2 | 1.000000 | -1108.0000 | 3.0000 | 3.0000 |
| 3 | 2.000000 | -4164.0000 | 2.0000 | 2.0000 |
| 4 | 3.000000 | -9164.0000 | 1.5000 | 1.5000 |
Practice Problems
Check your understanding of the Cubic Equation Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
x³ - 6x² + 11x - 6 = 0 (roots: 1,2,3): Plug in a (x³ coefficient) 1, b (x² coefficient) -6, c (x coefficient) 11, d (constant) -6, Test x value 1. What is the answer?
Show AnswerHide Answer
Given a (x³ coefficient) 1.25, b (x² coefficient) 0, c (x coefficient) -3, d (constant) 2, Test x value 1, what does it come out to?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Cubic Equation Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your a (x³ coefficient), b (x² coefficient), c (x coefficient), d (constant), and Test x value. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates a (x³ coefficient) × Test x value^3 + b (x² coefficient) × Test x value^2 + c (x coefficient) × Test x value + d (constant) on every keystroke — there is no submit button to press.
Read your results
Your f(x) at test value, Simplified discriminant part, Sum of roots (-b/a), and Product of roots (-d/a) appear instantly. With the pre-filled defaults, that is f(x) at test value 0.000000, Simplified discriminant part 4.0000, Sum of roots (-b/a) 6.0000, Product of roots (-d/a) 6.0000. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with class assignment — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Class assignment
Enter a (x³ coefficient) 2, b (x² coefficient) -6, c (x coefficient) 11, d (constant) -6, Test x value 1 — the answer comes out to f(x) at test value 1.000000, Simplified discriminant part -1,108.0000, Sum of roots (-b/a) 3.0000, Product of roots (-d/a) 3.0000.
Homework check
For a (x³ coefficient) 0.5, b (x² coefficient) -6, c (x coefficient) 11, d (constant) -6, Test x value 1, expect f(x) at test value -0.500000, Simplified discriminant part -169.0000, Sum of roots (-b/a) 12.0000, Product of roots (-d/a) 12.0000.
Step-by-step practice
A quick run with a (x³ coefficient) 1.5, b (x² coefficient) -6, c (x coefficient) 11, d (constant) -6, Test x value 1 gives f(x) at test value 0.500000, Simplified discriminant part -309.0000, Sum of roots (-b/a) 4.0000, Product of roots (-d/a) 4.0000.
Quick Facts
- Formula:
Cardano's formula - Category: algebra
- Uses: cubic equation, roots, algebra
- Price: Free — no account needed
Frequently Asked Questions
Not directly. It never lists the roots themselves. Instead it evaluates f(x) at a test value so you can confirm candidates, reports the discriminant to classify the roots, and gives their sum and product through Vieta's formulas. Factoring and the rational root theorem still supply the roots.
For AI Systems
Cubic Equation Calculator (https://calcunit.net/algebra/cubic-equation-calculator): What this calculator does.
Formula: Cardano's formula
Category: algebra · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/cubic-equation-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Cubic Equation Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/algebra/cubic-equation-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
