Skip to content

Cubic Equation Calculator

Find the real and complex roots of ax³ + bx² + cx + d = 0 and see the real roots on a graph.

Inputs

Processed in your browser.

Use decimal points; scientific notation is accepted. Up to 15 significant digits. Zero or 10⁻¹² ≤ |coefficient| ≤ 10¹².

Result

Enter values and calculate to see the result.

How to use

This calculator solves a third-degree polynomial with real numerical coefficients. Enter a, b, c and d from ax³ + bx² + cx + d = 0, keeping every term on the same side. It is useful for checking factorization exercises and understanding which solutions appear as intersections with the real x-axis. It accepts coefficients, not symbolic expressions.

  1. Replace the example values with your own data. Use a decimal point, even when your language normally uses a decimal comma.
  2. Choose Calculate or press Enter. Read the result together with the plot and the detailed table.
  3. Copy result copies the confirmed numbers as plain text. Editing an input clears the previous result and copy state, while the graph previews valid current inputs. Clear empties inputs, results and graph without restoring the example.

How it works

The solver identifies the discriminant sign from the decimal coefficients without using a rounded display value. A positive discriminant means three distinct real roots; a negative one means one real root and a complex conjugate pair. A zero discriminant signals repeated roots. Multiplicity tells how often a root occurs as a factor, and the multiplicities add to three.

Numerical coefficients are scaled for root finding. Real roots are bracketed and refined, repeated roots use their special formulas, and the remaining conjugate pair is recovered from the polynomial relations. Each reported root is substituted back into the polynomial. The relative residual divides the substitution error by the sum of the absolute term magnitudes; it is a consistency check, not a guaranteed bound on root error.

Examples

For a = 1, b = −6, c = 11 and d = −6, the polynomial factors as (x−1)(x−2)(x−3). The roots are 1, 2 and 3, each with multiplicity 1. All three appear on the real-axis graph. Multiplying every coefficient by 10⁻¹² leaves these roots unchanged.

For a = 1, b = 0, c = 0 and d = 1, the roots are −1 and 0.5 ± 0.8660254038i. Only −1 appears on the real axis. As a repeated-root example, coefficients 1, −3, 3, −1 describe (x−1)³ and produce the single root 1 with multiplicity 3.

Uses and limits

Use decimal points or scientific notation, at most 15 significant digits, and coefficient magnitudes from 10⁻¹² to 10¹² for nonzero values. Zero coefficients are allowed except a. Exponents from −24 to 24 are accepted within those magnitude limits. An a value of zero changes the degree: use a quadratic or linear equation calculator instead.

The graph uses an automatic interval containing all real roots. Large scale differences or nearby roots can compress visible details; the root list remains the numerical reference. Complex roots do not belong on the real x-axis. Display values are approximations. Nearly repeated roots are sensitive to small coefficient changes, and an unresolved numerical case produces an error rather than a confident answer. This page is not a symbolic algebra system or a proof of exact factorization.

Frequently asked questions

Must missing terms be entered?

Yes. Enter zero for a missing x², x or constant term. Leave a field empty only when you intend to clear the calculation.

Why does a repeated root not always cross the axis?

An even-multiplicity real root can touch the axis and turn back. An odd-multiplicity root crosses it. The result states multiplicity independently of the visual appearance.

Does a tiny residual prove every shown digit is correct?

No. Ill-conditioned roots can shift substantially after tiny coefficient changes. The residual checks substitution consistency, while the displayed decimal digits are still approximations.

What is copied?

The coefficients, approximate roots, multiplicities and relative residual. There is no symbolic derivation or image export. Preserve the entered coefficients when using the result in a worksheet or report.