Mathematics
Exact polynomial arithmetic and long division
Add, subtract, multiply, divide or evaluate polynomials from their coefficients. Optionally extract rational linear factors and keep the exact residual.
The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. JSON, HTML and TXT downloads keep your inputs and all result rows, with exact values where available. Automatic recalculation after editing is off unless you switch it on. Nothing is saved, imported or sent automatically.
Result
Formula / calculation:
Enter the coefficients from the constant term upwards, separated by semicolons: 3; 0; 2 means 3 + 2x². Coefficients can be whole numbers, decimals (point or comma), fractions or scientific notation. Degree up to 12 and up to 400 characters; results are exact fractions, with the rounded decimal (0 to 12 places) shown separately. The rational-factor option tests possible rational roots (at most 512 checks, coefficients up to 1,000,000 after clearing fractions) and lists factors x − r, repeated for multiple roots; multiplying them by the remaining polynomial gives the original exactly. A remaining factor of higher degree may still be reducible; the tool does not claim otherwise.
Decimal results are approximate. Inputs stay in this browser tab.
How it works
Coefficients are kept as exact fractions. Derivatives and antiderivatives use the power rule (xⁿ becomes n·xⁿ⁻¹, and xⁿ⁺¹/(n + 1) when integrating); the Taylor form expands (x − a)ⁿ with binomial coefficients. Enter the coefficients from the constant term upwards, separated by semicolons: 3; 0; 2 means 3 + 2x². Coefficients can be whole numbers, decimals (point or comma), fractions or scientific notation. Degree up to 12 and up to 400 characters; results are exact fractions, with the rounded decimal (0 to 12 places) shown separately. The rational-factor option tests possible rational roots (at most 512 checks, coefficients up to 1,000,000 after clearing fractions) and lists factors x − r, repeated for multiple roots; multiplying them by the remaining polynomial gives the original exactly. A remaining factor of higher degree may still be reducible; the tool does not claim otherwise.
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Polynomial A: constant-first coefficients, separated by ;
- -1;0;1
- Operation
- Multiply A·B
- Polynomial B: constant-first coefficients
- 1;1
- Evaluate at x (rational)
- 2
Result
- A coefficients, constant first
- -1; 0; 1
- B coefficients, constant first
- 1; 1
- Result coefficients, constant first
- -1; -1; 1; 1
- Result degree (zero polynomial: none)
- 3
- Entered x (exact)
- 2
- Evaluated result (exact)
- 9
- Evaluated result (rounded)
- 9.00
Frequently asked questions
How do I multiply or divide polynomials with this tool?
Enter rational coefficients in x, constant first and separated by semicolons, choose add, subtract, multiply, divide or evaluate, and calculate. Division exports the reconstruction A = BQ + R.
What limits apply to the polynomials?
Degree up to 12, input up to 400 characters and exact output up to 500 characters per row. A nonzero divisor is required.
Can the tool find rational linear factors?
Yes, as an option. It extracts bounded rational linear factors x - r with multiplicity and keeps the exact residual. Numerators and denominators are limited to 1,000,000 and the search to 512 steps.
Does it fully factorise polynomials?
No. There is no general factorisation or free-form algebra parser, and even after all rational candidates are tested higher-degree factors may remain, with no claim of irreducibility.
How do I recover the original polynomial from the factors?
Multiply the product of the monic factors by the residual coefficient list to recover A exactly.
How can I use it for an expenditure-based GDP exercise?
Choose Evaluate A(x), set x=1 and enter signed components, for example 60;2;20;15;10;-7 for 100. Coefficient positions do not classify economic activity, and these are illustrative inputs.