Quartic Equation Solver
Why a fourth-degree equation needs its own solver
A quartic equation is a polynomial equation whose highest power of the variable is 4. In standard form, it looks like ax⁴ + bx³ + cx² + dx + e = 0, and the goal is to find every value of x that makes the polynomial equal zero. Quartic equations appear in algebra classes, curve intersections, optimization models, control problems, optics, kinematics, and many other applied settings. They are simple enough to write down compactly, but rich enough to produce several different root patterns: four real roots, two real roots with a complex-conjugate pair, two complex-conjugate pairs, or repeated roots that sit on top of each other numerically.
This calculator is built for the practical case where you want reliable numerical roots without doing a long symbolic derivation by hand. Enter the coefficients exactly as they appear in your equation, and the solver returns four roots counted with multiplicity. If the equation factors nicely, the answers may land on familiar values such as −2, −1, 1, and 2. If the equation does not factor over the real numbers, the tool will still report complex roots. That makes it useful both as a homework checker and as a quick computational aid when a quartic emerges from a larger model.
There is one important expectation to keep in mind from the start: the results are numerical approximations, not exact radicals. That is usually the right tradeoff for a browser calculator. Numerical roots are fast, readable, and easy to verify by substitution. They also reflect the real behavior of difficult quartics, especially those with nearly repeated roots or coefficients that differ wildly in magnitude. The sections below explain what the coefficients mean, how the iteration works, and how to read the output with confidence.
Quartic equation overview
A quartic equation is a fourth-degree polynomial set equal to zero:
When a ≠ 0, the polynomial is truly quartic and, counting multiplicity, it has exactly four roots in the complex numbers. Some of those roots may fall on the real axis, and others may lie off the real axis with nonzero imaginary parts. If the coefficients are real numbers, any non-real roots occur in complex-conjugate pairs. In plain language, that means if p + qi is a root, then p − qi must also be a root.
That four-root structure is the main reason quartics are more interesting than quadratics. A quadratic gives you at most two solutions. A quartic has enough room for several distinct geometric and algebraic behaviors, including multiple turning points, repeated factors, and mixed real-complex solutions. This solver is designed to show all of that directly in one result list.
How to use this solver
The calculator expects your equation in standard descending-power form. If your quartic is written differently, rewrite it first so that all terms are collected on one side and arranged as powers of x from highest to lowest. Then enter each coefficient into the matching field below. Zero coefficients are perfectly acceptable and often appear in symmetric equations, biquadratics, and many textbook examples.
- Enter the coefficients a, b, c, d, e for your equation.
- Make sure a is not 0. If a = 0, the equation is cubic or lower degree and a quartic solver is not the right tool.
- Click Solve Quartic to compute all roots. Results may include real values and complex values of the form p + qi.
Tip on scaling: multiplying every coefficient by the same nonzero constant does not change the roots. If your coefficients are extremely large or extremely tiny, rescaling them before solving can improve numerical stability. A common habit is to divide every coefficient by the largest absolute coefficient so the numbers are all in a more comfortable range.
What each coefficient means
Each coefficient changes the polynomial in a slightly different way. The leading coefficient a sets the overall scale and determines whether the quartic rises on both ends or falls on both ends when you graph it. The cubic coefficient b adds skew and shifts the balance of the curve. The quadratic coefficient c affects the middle curvature, the linear coefficient d changes the local tilt, and the constant term e is the value of the polynomial at x = 0. If e = 0, then x = 0 is automatically a root because the equation has a factor of x.
In applied problems, the variable x may carry units such as seconds, meters, volts, or dollars. The coefficients therefore carry matching units so that every term in the polynomial represents the same overall quantity. Even though the coefficients have different units from one another, the roots themselves always inherit the units of x. If x represents time, then a real root is a time value. If a root is complex, it may still be mathematically valid but not physically meaningful for that particular model.
- a: leading scale factor; must be nonzero for a true quartic.
- b: cubic term; often influences asymmetry and left-right imbalance.
- c: quadratic term; shapes the central bend of the graph.
- d: linear term; changes local slope behavior.
- e: constant term; equals f(0) and controls whether x = 0 is a root.
Because the solver works numerically, you do not need to guess in advance whether the quartic factors. Still, reading the coefficients thoughtfully can help you anticipate what the solution should look like. For example, if the odd-power terms vanish so that b = 0 and d = 0, the equation may be easier to analyze as a quadratic in x². Likewise, if e is small or zero, one root may sit near the origin.
What the calculator is doing (formulas)
There are two broad ways to solve quartics. The classical algebraic route uses Ferrari’s method, which transforms the quartic, solves an associated cubic, and then reduces the problem to quadratics. That method is elegant, exact in theory, and historically important, but it produces long expressions that are not especially friendly in a lightweight browser tool. For day-to-day calculation, a numerical method is usually the clearer and more robust choice.
Numerically, a degree-4 polynomial can be understood through its four linear factors over the complex numbers. If the roots are r₁, r₂, r₃, and r₄, then the polynomial can be written as a leading coefficient times four factors:
This page uses a simultaneous complex root-finding strategy. The script starts from four initial guesses and refines them together. One popular update pattern for this family of methods is the Durand–Kerner step:
z_k ← z_k - f(z_k) / ∏_{j ≠ k} (z_k - z_j)
The numerator measures how far the current guess is from being a true root. The denominator keeps the guesses from collapsing onto one another by accounting for the distance between each guess and the others. The JavaScript on this page first divides through by the leading coefficient so the polynomial is monic, which is what the Durand–Kerner step assumes, then evaluates the polynomial repeatedly, updates the four guesses together, and stops once the corrections become very small or the iteration limit is reached. The four estimates start at powers of the off-axis number 0.4 + 0.9i rather than on the real or imaginary axis. That deliberate asymmetry matters: seeds like 1, i, −1, −i sit on the axes and can stall on equations whose roots are symmetric, so an off-axis fan gives the iteration room to break that symmetry and converge.
That is also why root order should not be overinterpreted. The result list shows the roots in numerical iteration order, not necessarily sorted from smallest to largest or from most negative imaginary part to most positive. For most real-world use, that is perfectly fine: what matters is that the four reported numbers satisfy the polynomial to high accuracy.
Reading the four roots the solver returns
After you solve the equation, the result area lists four roots. Some may be purely real, and some may be complex. If a displayed imaginary part is extremely tiny, the solver rounds it to zero so that a nearly real root appears as a real number. This improves readability without changing the underlying mathematical meaning.
- Real root: a solution shown with an approximately zero imaginary part. Example: x ≈ 2.
- Complex root: shown as p + qi where q ≠ 0. If inputs are real, complex roots should appear in conjugate pairs.
- Multiplicity: if a root repeats, the solver may return two very close values instead of perfectly identical ones because repeated roots are numerically delicate.
A good habit is to plug any reported root back into the polynomial and check that the result is close to zero. That substitution test is especially helpful when a root is complex or when two roots appear almost identical. If you are solving a physical problem and only real answers make sense, then complex roots can still be informative: they tell you the quartic has no additional real solutions in that region of the model.
Remember too that the roots use the same unit as x. If x represents distance, each real root is a distance. If x represents time, each real root is a time. Complex roots are mathematically legitimate, but depending on context they may represent oscillatory behavior, stability information, or simply nonphysical branches that you can discard after inspection.
Limitations and assumptions (numerical results)
This calculator is numerical, so it reports approximations with finite precision. That is the correct behavior for a web tool, but it means you should expect small rounding differences, especially on difficult equations. Quartics with nearly repeated roots are famously sensitive: a tiny change in the input can move the roots noticeably, and a repeated root may appear as two nearby roots rather than one exact repeated number.
- Numeric approximation: roots are computed numerically and displayed with finite precision.
- Conditioning matters: quartics with near-repeated roots or huge coefficient ranges can be sensitive.
- Repeated roots: a repeated root may appear as multiple nearby roots instead of an exact duplicate.
- Convergence behavior: iterative methods can converge more slowly on difficult cases.
- Not a proof system: the solver provides numerical answers, not symbolic factorization or exact radicals.
If you see unexpected output, first confirm that the coefficients were entered in the correct order. Next, consider rescaling the polynomial. Finally, test the reported roots by substitution. Those three checks resolve most apparent issues. If a is zero, the equation is not quartic, so the correct fix is to switch to a lower-degree solver rather than forcing a quartic method onto the wrong problem.
Solving x⁴ − 5x² + 4 = 0 by hand, then checking it here
Consider the equation x⁴ − 5x² + 4 = 0. Here the coefficients are a = 1, b = 0, c = −5, d = 0, and e = 4. Because the odd-power terms vanish, this is a classic case where it helps to think of the quartic as a quadratic in x².
The polynomial factors as:
x⁴ − 5x² + 4 = (x² − 1)(x² − 4)
That immediately gives two simpler equations. From x² − 1 = 0, you get x = ±1. From x² − 4 = 0, you get x = ±2. So the four roots are −2, −1, 1, and 2. If you enter those coefficients into the solver below, you should see four real roots very close to those exact values. This example is helpful because it shows what a clean, well-conditioned quartic looks like numerically.
Root patterns at a glance
| Coefficient situation | Typical outcome | What you will see in results |
|---|---|---|
| All coefficients real | Complex roots come in conjugate pairs | p + qi and p − qi appear together |
| Quartic factors into quadratics | Often 0 to 4 real roots | May be all real or partly complex |
| Near-repeated roots | Sensitive and ill-conditioned | Two roots extremely close; small numerical error is visible |
| Very large or very small coefficient magnitudes | Scaling improves stability | Better convergence after rescaling |
This table is only a guide, but it is a useful one. Quartics are flexible enough that coefficient patterns often hint at the likely root structure before you ever press solve. When your result matches that expectation, confidence goes up. When it does not, that is a sign to double-check the algebra, input order, or scaling.
Practical tips for difficult quartics
If a quartic seems stubborn, start by simplifying the arithmetic rather than changing the mathematics. Clear any obvious fractions if that makes the coefficients easier to read. Rescale very large or very small coefficients. If the quartic comes from measurements, remember that noisy data can create unstable roots, especially near repeated factors. In those cases, a tiny perturbation in the input may move a pair of roots more than you expect.
Another helpful strategy is to look for structure. When b and d are both zero, try the substitution y = x² mentally before solving. When e = 0, factor out x first because one root is immediately known. When the solver returns two nearly identical values, consider the possibility of multiplicity. And if you only need real roots for an application, focus on entries whose imaginary part is zero or extremely close to zero after rounding.
Most importantly, do not confuse numerical difficulty with a broken solver. Quartics can genuinely be sensitive objects. That sensitivity is part of the mathematics, not just part of the software. A quick substitution check is often the best way to separate a true numerical artifact from a valid but surprising answer.
Three checks when a result looks wrong
If your equation is not quartic because a = 0, reduce it to the correct degree and use the appropriate solver. If you get unexpected results, try scaling the coefficients and verify a reported root by substituting it back into the polynomial. Roots are listed in numerical iteration order, so repeated or symmetric roots may not appear in a visually sorted arrangement.
Mini-game: Durand–Kerner Drift
This optional mini-game turns the solver idea into a quick arcade challenge on the complex plane. You guide four moving root guesses toward glowing solution wells, which mirrors the way simultaneous numerical methods refine several estimates at once. Move your pointer or finger near the guesses to attract them, then press and hold to repel and separate them when they bunch up. The patterns are tied to quartic behavior, including real roots, conjugate pairs, and tight near-repeated targets that are intentionally harder to settle.
Quick takeaway: the off-axis targets come in mirrored pairs because quartics with real coefficients produce non-real roots as complex conjugates.
