What this calculator does
The Polynomial from Roots Calculator reverses the usual root-finding problem: instead of solving for the zeros of a polynomial, it builds the polynomial when you already know its roots. Given a set of real roots and an optional leading coefficient, it returns the fully expanded standard form of \(P(x)\), along with its degree, leading coefficient, and constant term.
How to use it
Enter your roots as a comma-separated list (for example 1, -2, 3). Set the leading coefficient a — use 1 for the simplest monic polynomial, or another value to scale it. The calculator multiplies the factors \((x - r)\) together, applies the leading coefficient, and prints the expanded polynomial.
The formula explained
By the Factor Theorem, if \(r\) is a root of \(P(x)\) then \((x - r)\) is a factor. A polynomial with roots \(r_1, r_2, \ldots, r_n\) is therefore $$P(x) = a \prod_{i=1}^{n} \left( x - r_i \right).$$ The calculator performs this product step by step, expanding into descending powers of \(x\). The leading coefficient determines the highest-degree term, while the constant term equals \(a\) times the product of the negated roots.
Worked example
Suppose the roots are 1, −2, and 3 with \(a = 1\). Multiply \((x - 1)(x + 2)(x - 3)\). First $$(x - 1)(x + 2) = x^2 + x - 2.$$ Then $$(x^2 + x - 2)(x - 3) = x^3 - 2x^2 - 5x + 6.$$ So \(P(x) = x^3 - 2x^2 - 5x + 6\), a cubic of degree 3 with constant term 6.
FAQ
Can I enter repeated roots? Yes — listing a root twice gives it multiplicity two, producing a squared factor.
Does it handle complex roots? This tool works with real roots. To include complex conjugate pairs, enter them as a real quadratic factor instead.
What does the leading coefficient do? It scales the entire polynomial vertically without changing the roots, so \(a = 2\) doubles every coefficient.