Cubic Equation & Root Calculator
Enter the four coefficients of a cubic equation. Find every real root, see whether each crosses or touches the x-axis, and inspect a close-up around any intercept. The equation's exact discriminant establishes the number and multiplicity of roots. Distinct real roots are supported by exact isolating intervals, and complex solutions appear as a conjugate pair.
Cubic equation explorer
See where a cubic crosses or touches the axis and how the curve turns between its roots.
Cubic coefficients
ax³ + bx² + cx + d = 0
Three distinct real roots
Exact discriminant 900
Curve and intercepts
- Real root
- Turning point
- Inflection
Root and interval ledger
Each certified interval contains exactly one real root. Approximate coordinates are rounded for display.
Real root 1
x = -2
Multiplicity 1 · Crosses the x-axis
Real root 2
x = 1
Multiplicity 1 · Crosses the x-axis
Real root 3
x = 3
Multiplicity 1 · Crosses the x-axis
- Local maximum
- ( -0.7862996478, 8.208820735 )
- Local minimum
- ( 2.119632981, -4.060672587 )
- Inflection
- ( 0.6666666667, 2.074074074 )
How to use this calculator
- Enter the Cubic, Quadratic, Linear and Constant coefficients for ax³ + bx² + cx + d = 0. Use zero for any missing lower power.
- Read the root classification and exact discriminant. Try the worked examples for three real roots, a double root or complex conjugates.
- Inspect Curve and intercepts. Choose Focus root to center the horizontal scale on one intercept, or All features to compare turning points and the inflection.
- Check the Root and interval ledger for root multiplicities, exact solutions and the certified rational bounds for approximated real roots.
- Select Download cubic CSV or Show selectable CSV to retain the coefficients, classification, roots and intervals.
The Formula
The mathematical logic powering this calculation is:
For f(x) = ax³ + bx² + cx + d with a ≠ 0, Δ = b²c² − 4ac³ − 4b³d − 27a²d² + 18abcd. Δ > 0 gives three distinct real roots. Δ < 0 gives one real root and two nonreal conjugates. When Δ = 0 and H = b² − 3ac = 0, the triple root is −b/(3a). Otherwise Δ = 0 gives a double root r = (9ad − bc)/(2H) and a simple root −b/a − 2r. These classifications and repeated roots are exact for the entered coefficients.
For distinct real roots, start beyond the Cauchy bound 1 + max(|b/a|, |c/a|, |d/a|). The difference in Sturm sign variations at two rational endpoints gives the exact number of roots in that interval, with the lower endpoint excluded and the upper included. Bisect until each retained interval contains exactly one root and has width at most 10⁻⁵⁰. A root found exactly during isolation is shown as a reduced fraction. The finite work bound reports an isolation error if it is reached.
For one real root r and a conjugate pair u ± vi, u = (−b/a − r)/2. The discriminant product gives v² = −Δ/[4a²f′(r)²]. The reported complex coordinates use the real-root interval midpoint and are numerical approximations.
Turning points come from f′(x) = 3ax² + 2bx + c. The inflection is at x = −b/(3a) and is stationary when H = 0. Real and complex decimal display, the turning points and the finite graph use approximations. The exact discriminant, exact roots, and rational interval bounds preserve distinctions that may round away on the graph. Enter plain decimals of magnitude at most 1,000,000, with at most six fractional places.Worked Example
If you input:
- a: 1
- b: −2
- c: −5
- d: 6
Result:
The discriminant is 900. The polynomial factors as (x + 2)(x − 1)(x − 3), so the three real roots are −2, 1 and 3. Each has multiplicity 1 and crosses the x-axis. The inflection is (2/3, 56/27).
Frequently Asked Questions
How many real roots can a cubic equation have?
A real cubic has at least one real root. A positive discriminant gives three distinct real roots. A negative one gives a single real root and a complex conjugate pair. A zero discriminant gives either one triple root or one double and one simple root.
What is a certified root interval?
It is a pair of exact rational bounds with a verified count of one real root between them. The interval excludes its lower bound and includes its upper bound. The midpoint supplies the displayed approximate coordinate. A root hit exactly is shown as an exact value.
Why can two roots look like one on the plot?
Two distinct roots can project to the same pixel when the plotted x-range is large. The exact discriminant and intervals resolve their mathematical distinction. Focus root changes the horizontal scale and centers the selected intercept at offset zero.
How does multiplicity affect the graph?
A simple root crosses the x-axis, a double root touches it at a turning point, and a triple root crosses it with a horizontal tangent. The multiplicity describes how many times the same root factor occurs.
Why are complex solutions shown together?
For real coefficients the nonreal solutions have a shared real coordinate and imaginary coordinates of opposite sign. They appear as u ± vi in the ledger. The real-plane graph shows only the real intercepts.
What if the coefficient of x³ is zero?
A zero cubic coefficient reduces the degree. The quadratic or linear calculator handles that equation. Enter zero in any of the remaining three cubic boxes when the corresponding term is absent.
Which results are exact?
The discriminant, multiplicities, isolation bounds, repeated roots and inflection coordinates are exact for the entered decimals. An isolated simple root is shown exactly when bisection hits it. Other simple-root coordinates, complex coordinates and the plot are numerical presentations.
Similar Calculators
Quadratic Formula Calculator
Solve any quadratic equation ax² + bx + c = 0 and find its real or complex roots instantly.
Polynomial Division Calculator
Divide polynomials using long or synthetic division. Inspect each step, the exact quotient and remainder, and the reconstruction identity.
Piecewise Function Graph Calculator
Graph a piecewise function with open and closed endpoints. Evaluate f(x), compare one-sided limits, and identify gaps, jumps and removable discontinuities.
Partial Fraction Decomposition Calculator
Decompose rational functions into exact partial fractions. Inspect repeated factors, coefficient equations, poles and holes, with graph and CSV export.
