Skip to main content

Partial Fraction Decomposition Calculator

Decompose a rational expression P(x)/Q(x) into a sum of simpler partial fractions — proper or improper, with repeated linear and irreducible quadratic factors — using exact rational arithmetic and a full step-by-step derivation.

Input

A polynomial in x, e.g. 3x + 5 or x^2 - 4. Can be equal or higher degree than the denominator (an improper fraction) — we'll divide first.

Q(x) as a product of linear and/or quadratic factors, each in parentheses with an optional ^power — e.g. (x - 1)(x + 2)^2 or (x - 1)(x^2 + 1). We don't auto-factor an arbitrary polynomial (that's not solvable exactly in general) — enter the factored form and every step is computed exactly.

Output

Partial Fraction Terms
Denominator factorNumeratorTerm
No data yet
Step-by-Step Derivation
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/partial-fraction-decomposition-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "numerator": "3x + 5",
    "denominator": "(x - 1)(x + 2)"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `partial-fraction-decomposition-calculator` tool (Partial Fraction Decomposition Calculator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/partial-fraction-decomposition-calculator/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="Partial Fraction Decomposition Calculator — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits

Also available with

Guides

Partial fraction decomposition breaks a rational expression P(x)/Q(x) back down into the simpler fractions that would combine to produce it — the reverse of adding fractions with a common denominator. It's the standard first step before integrating a rational function, and the arithmetic gets tedious fast once the denominator has a repeated or quadratic factor. This calculator runs the full method exactly — every coefficient is an exact fraction, never a rounded decimal — and shows the linear system it solved to get there.

How to use it

  1. Enter the numerator P(x) as a polynomial in x, e.g. 3x + 5 or x^2 - 4.
  2. Enter the denominator Q(x) in factored form — a product of linear and/or quadratic factors, each in parentheses with an optional ^power, e.g. (x - 1)(x + 2)^2 or (x - 1)(x^2 + 1).
  3. Read off the decomposition, the polynomial part (if the fraction was improper), the term-by-term table, and the full derivation.

Why the denominator has to be factored already

Factoring an arbitrary polynomial exactly has no general closed-form past degree 4, and even deciding whether one factors neatly over the rationals is its own hard problem — a calculator that silently guessed a "close enough" factorization would hand back a wrong answer with total confidence, which is worse than asking one more question. Supplying Q(x) already factored keeps every step exact: no root-finding, no floating point, ever. If a quadratic factor you enter turns out to actually be reducible over the rationals (its discriminant is a perfect square), the calculator rewrites it as two linear factors automatically before decomposing.

The method

  1. Improper fraction? If deg(P) ≥ deg(Q), divide first (ordinary polynomial long division) to get a polynomial part plus a proper remainder, then decompose the remainder.
  2. Build the ansatz. Each linear factor (x − r) to the power n contributes A₁/(x−r) + A₂/(x−r)² + … + Aₙ/(x−r)ⁿ; each irreducible quadratic factor to the power n contributes (B₁x + C₁)/(quad) + … + (Bₙx + Cₙ)/(quad)ⁿ.
  3. Equate coefficients. Multiply both sides by Q(x) and compare the coefficient of each power of x — this produces a square system of linear equations in the unknown numerators, solved by exact Gauss-Jordan elimination over rational-number (BigInt) fractions.
  4. For the simplest case — every denominator factor linear and distinct, no repeats — the derivation also shows the cover-up (Heaviside) shortcut as an independent cross-check: cover each (x − r) and evaluate everything else at x = r.

FAQ

Why does a quadratic factor need (Ax + B) on top instead of just A?

A single constant over an irreducible quadratic can't reproduce every possible numerator of that degree — the numerator has to be allowed to have its own x term, or the system of equations has no solution for a generic P(x).

What if my denominator's factor doesn't fit degree 1 or 2?

Split it further. Any real polynomial factors into linear and irreducible-quadratic pieces, so a cubic or higher factor you have isn't in its final factored form yet — factor it the rest of the way (by hand, or with a Cubic Equation Solver for a cubic) before entering it here.

My factor isn't monic (e.g. (2x - 4)) — does that matter?

No — enter it exactly as you have it. The calculator pulls out the leading coefficient internally and folds it into the numerator, so (2x - 4) and (x - 2) decompose to the same underlying fraction terms.

Related tools

To expand a factored polynomial back into standard form — the reverse direction of this tool's second step — see the Expand Polynomials Calculator. To divide an improper numerator by the denominator by hand instead of automatically, see the Polynomial Long Division Calculator.

Privacy

All calculations run entirely in your browser — the numerator and denominator you enter are never sent to a server.

partial fractionspartial fraction decompositionresolve into partial fractionsrational functionrational expressioncover-up methodheaviside methodintegrate rational functionalgebracalculus

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.