Skip to main content
Academic

Partial Fraction Decomposition Calculator

Enter a numerator and denominator to get the partial fraction decomposition with every step shown: factoring, the coefficient system, and solved answer.

Created by Muhammad Asif Zaheer
Reviewed by CalculatorPlanet Editorial Team

Published

Last updated

Factor the denominator
x² − x − 2 = (x − 2)(x + 1)
Set up the decomposition
(5x − 4)/(x² − x − 2) = A/(x − 2) + B/(x + 1)
Multiply through and equate the numerators
Multiplying both sides by x² − x − 2 makes both sides share the same denominator, so the numerators must be equal: 5x − 4 = (x + 1)(A) + (x − 2)(B)
Expand the right-hand side
5x − 4 = xA + A + xB - 2B
Collect like terms and compare coefficients
Collecting the expanded terms above by power of x, then comparing coefficients on both sides, gives: x: A + B = 5 constant: A - 2B = -4
Solve for the unknowns
A = 2, B = 3
Result
2/(x − 2) + 3/(x + 1)
Partial-fraction terms
2
Denominator degree
2

How the Partial Fraction Decomposition Calculator Formula Works

Partial fraction decomposition rewrites one rational expression, a polynomial divided by another polynomial, as a sum of simpler fractions that add back up to the original. The method always starts the same way: factor the denominator completely, then match the type of unknown to the type of factor.

A linear factor (x-r) that appears once gets one unknown constant, A/(x-r). If that same linear factor is repeated k times, it needs one term for every power from 1 up to k: A1/(x-r) + A2/(x-r)² and so on, not just a single term. An irreducible quadratic factor, one that cannot be split into two real linear factors, needs a linear numerator instead of a constant one, (Bx+C)/(x²+bx+c), because a constant alone cannot match every possible remainder over a quadratic denominator.

Once every unknown is placed, multiplying both sides by the full denominator turns the equation into a plain polynomial identity. Comparing the coefficients of each power of x on both sides produces a system of linear equations, exactly one equation per unknown, which solves for every constant at once.

If the numerator's degree is greater than or equal to the denominator's degree before any of this, polynomial long division has to run first: the fraction is improper, and it splits into a plain polynomial part plus a proper remainder fraction, and only that remainder actually gets decomposed.

N(x)/D(x) = sum of A/(x-r)k terms for each linear factor, plus (Bx+C)/(x²+bx+c)k terms for each irreducible quadratic factor
What goes in, what comes out
  • N(x)polynomialThe numerator, a polynomial in x with whole-number coefficients.
  • D(x)polynomialThe denominator, a polynomial in x with whole-number coefficients, factored into linear and irreducible quadratic pieces.
  • A, B, C...constantThe unknown coefficients solved for, one set per factor (and per power, for a repeated factor).
Partial-fraction terms
2
Values shown are from the worked example below
N(x)
polynomial
The numerator, a polynomial in x with whole-number coefficients.
D(x)
polynomial
The denominator, a polynomial in x with whole-number coefficients, factored into linear and irreducible quadratic pieces.
A, B, C...
constant
The unknown coefficients solved for, one set per factor (and per power, for a repeated factor).

Using the Partial Fraction Decomposition Calculator

  1. Enter numerator

    Type a polynomial in x, like 3x² - x + 5 (x^2 also works), or an already-factored form like (x-1)(x+2). The small buttons below the field insert x, real exponents, and parentheses for you.

  2. Enter denominator

    Type a polynomial in x, like 3x² - x + 5 (x^2 also works), or an already-factored form like (x-1)(x+2). The small buttons below the field insert x, real exponents, and parentheses for you.

  3. Read the result

    Press Calculate to update the result. Until you do, the last result is dimmed and marked as out of date, so you always know which numbers belong to the values in the boxes.

Photograph representing academic
Academic, where this calculation gets used.

A Real Worked Example

(5x-4)/(x²-x-2) is a classic first example because the denominator factors into two distinct linear pieces: x²-x-2 = (x-2)(x+1). That means the decomposition needs exactly two unknowns, one per factor: A/(x-2) + B/(x+1).

Multiplying both sides by (x-2)(x+1) gives 5x-4 = A(x+1) + B(x-2). The fastest way to solve this specific shape, the cover-up method, plugs in the value that zeroes out each factor in turn: setting x=2 gives 5(2)-4 = A(3), so A=2. Setting x=-1 gives 5(-1)-4 = B(-3), so B=3.

The decomposition is 2/(x-2) + 3/(x+1), and it is easy to sanity-check: at x=0, the original fraction is -4/-2 = 2, and the decomposed form gives 2/-2 + 3/1 = -1+3 = 2, the same answer.

1
numerator
5x-4
2
denominator
x²-x-2
This calculator returns2termCount2denominatorDegree

Repeated linear factor

x²+2x+1 is (x+1)², a single linear factor repeated twice, not two different factors. That changes the setup: it needs A/(x+1) + B/(x+1)², one term for each power from 1 to 2, rather than a single A/(x+1) term. Solving gives A=3, B=2, so 3x+5 over (x+1)² decomposes to 3/(x+1) + 2/(x+1)². Missing the second term here, using only A/(x+1), is the single most common mistake with a repeated factor: it leaves one unknown short of what the system actually needs to solve exactly.

numerator: 3x+5denominator: x²+2x+12termCount2denominatorDegree

Irreducible quadratic factor

x²+1 has no real roots (its discriminant is negative), so it cannot be split into two linear factors the way x²-x-2 was above. It is already the simplest form it can take, an irreducible quadratic, so the whole fraction x/(x²+1) is already its own decomposition: the numerator needed is (Bx+C) with B=1 and C=0, confirming a linear numerator, not a constant, is what a quadratic denominator requires.

numerator: xdenominator: x²+12termCount2denominatorDegree

Repeated irreducible quadratic factor

x⁴+2x²+1 factors as (x²+1)², the same irreducible quadratic repeated twice. That needs four unknowns total, (Ax+B)/(x²+1) + (Cx+D)/(x²+1)², following the same repeat-for-every-power rule that applied to the repeated linear case above, just with a quadratic numerator at each step instead of a constant one. Solving gives A=1, B=0, C=-1, D=1.

numerator: x³+1denominator: x⁴+2x²+14termCount4denominatorDegree

Mixed linear and quadratic factors

x³-x²+x-1 factors as (x-1)(x²+1): one real linear root and one irreducible quadratic, a combination rather than a single factor type. The decomposition mixes both unknown forms in one answer: A/(x-1) + (Bx+C)/(x²+1), solving to A=1.5, B=0.5, C=0.5. Most real denominators beyond the simplest textbook examples end up mixed like this rather than purely one factor type.

numerator: 2x²+1denominator: x³-x²+x-13termCount3denominatorDegree

Improper fraction (long division first)

The numerator's degree (3) is greater than the denominator's degree (2), so this fraction is improper and cannot be decomposed directly. Long division runs first: x³+2 divided by x²-1 gives a quotient of x with a remainder of x+2. Only that remainder, (x+2)/(x²-1), gets decomposed the normal way, into 1.5/(x-1) + -0.5/(x+1); the full answer is the quotient plus that decomposition, x + 1.5/(x-1) − 0.5/(x+1), not the decomposition alone.

numerator: x³+2denominator: x²-12termCount2denominatorDegree

What Else to Know

The Four Cases, and the Setup Form Each One Needs

Every partial fraction problem reduces to matching the right kind of unknown to the right kind of factor, and there are exactly four combinations to recognize once the denominator is factored.

A distinct linear factor, one that appears to the first power and doesn't repeat, gets a single constant: A/(x-r). A repeated linear factor, (x-r) raised to some power k, needs one term for every power from 1 up to k, not just one: A1/(x-r) + A2/(x-r)² and so on up to Ak/(x-r)k.

An irreducible quadratic factor, one with no real roots, needs a linear numerator instead of a constant one, (Bx+C)/(x²+bx+c), since a plain constant can't match every possible remainder over a quadratic denominator. A repeated irreducible quadratic follows the same repeat-by-power rule as a repeated linear factor, just with that linear numerator form at each step: (B1x+C1)/(x²+bx+c) + (B2x+C2)/(x²+bx+c)², and so on.

Most real problems combine more than one of these in the same denominator, which is exactly why identifying each factor's type correctly, before writing down a single unknown, is the step that actually determines whether the rest of the work is even solvable.

Where This Actually Gets Used

Partial fraction decomposition shows up constantly in integral calculus, because a rational function that looks impossible to integrate directly often becomes a sum of elementary logarithm and arctangent integrals once it's broken into the pieces this method produces; a fraction with a repeated or quadratic denominator has no other clean route to an antiderivative.

It's just as central in engineering, particularly for anyone working with the Laplace transform in signals, controls, or circuit analysis: an inverse Laplace transform is almost always looked up from a table of simple forms, and partial fractions is the standard way to break a complicated transfer function down into exactly those simple forms first.

That engineering context is also why a lot of real searches for this topic aren't really asking for a web tool at all. Someone searching a physical calculator model, like a TI-84 or Casio, alongside partial fractions is usually looking for a keystroke sequence to solve the system of equations on that specific device during an exam, a different, narrower question than "what is the decomposition," and one this calculator doesn't attempt to answer.

Improper Fractions: Why Long Division Comes First

Partial fraction decomposition only applies to a proper fraction, one where the numerator's degree is strictly less than the denominator's. If the numerator's degree is equal to or greater than the denominator's, the fraction is improper, and running the decomposition method directly on it produces a system with no consistent solution.

The fix is ordinary polynomial long division, done first: divide the numerator by the denominator to get a whole polynomial quotient plus a remainder whose degree is now genuinely less than the denominator's. That remainder, not the original numerator, is what actually gets decomposed into partial fractions; the quotient from the division is added back onto the final answer afterward.

Skipping this step is a common source of a wrong answer that isn't a decomposition mistake at all, it's a setup mistake, made before the actual partial-fraction method has even started.

The Mistakes That Actually Break the Answer

Two mistakes account for most wrong answers, and neither is a calculation error, they're setup errors made before any solving happens.

The first is under-counting terms for a repeated factor: writing A/(x+1) for (x+1)² instead of A/(x+1) + B/(x+1)². This leaves the system with fewer unknowns than equations, which either produces no valid solution or, worse, a solution that only satisfies part of the original equation.

The second is using a constant numerator over an irreducible quadratic factor instead of a linear one, writing A/(x²+1) instead of (Ax+B)/(x²+1). A constant genuinely cannot represent every value the remainder can take over a quadratic denominator, so this setup is one unknown short in a different way, and the resulting system usually has no exact solution either.

Both mistakes are avoidable the same way: identify every factor's exact type and multiplicity before writing a single unknown, then count that the total number of unknowns matches the denominator's degree exactly. If it doesn't, something in the setup was missed.

If the fraction is improper, the first step is polynomial long division. The polynomial long division calculator shows that division round by round, with a check on the result.

Reference Tables

Partial fraction decomposition rules by factor type
Factor in the denominatorExampleDecomposition form
Distinct linear factor, (x-r)x-2A / (x-r)
Repeated linear factor, (x-r)k(x+1)²A1/(x-r) + A2/(x-r)² + ... + Ak/(x-r)k
Distinct irreducible quadratic, (x²+bx+c)x²+1(Bx+C) / (x²+bx+c)
Repeated irreducible quadratic, (x²+bx+c)k(x²+1)²(B1x+C1)/(x²+bx+c) + ... + (Bkx+Ck)/(x²+bx+c)k

Frequently Asked Questions About the Partial Fraction Decomposition Calculator

What is partial fraction decomposition?

It's the process of rewriting one rational expression, a polynomial divided by another polynomial, as a sum of simpler fractions that add back up to the original. Each simpler fraction has a denominator that's just one factor (or one power of a factor) of the original denominator, which makes the result far easier to integrate, transform, or otherwise work with than the combined fraction was.

How do you find a partial fraction decomposition?

Factor the denominator completely into linear and irreducible quadratic pieces, assign the matching unknown form to each factor (a constant for a distinct linear factor, a linear numerator for a quadratic one, extra terms for any repeated factor), multiply both sides by the full denominator, and compare coefficients of each power of x to build a solvable system of equations for every unknown.

When should you use partial fraction decomposition?

Most often when integrating a rational function in calculus, since a decomposed sum of simple fractions integrates directly into logarithms and arctangents while the combined fraction usually doesn't have an obvious antiderivative. It's equally common in engineering when taking an inverse Laplace transform, since transform tables are built from these same simple forms rather than complicated combined fractions.

How hard is partial fraction decomposition?

The distinct-linear-factor case is genuinely quick once the cover-up method clicks. It gets noticeably harder with a repeated factor or an irreducible quadratic, mainly because it's easy to under-count how many unknowns the setup actually needs. Most of the real difficulty is in the setup, correctly identifying every factor's type and multiplicity, rather than in solving the system once it's written down correctly.

What are the 4 types of partial fractions?

Distinct linear factors, repeated linear factors, distinct irreducible quadratic factors, and repeated irreducible quadratic factors. Every denominator that comes up in practice is built from some combination of these four, and the unknowns needed for the decomposition depend entirely on which types are present and how many times each factor repeats.

What is the cover-up method?

A shortcut for distinct linear factors: after multiplying both sides by the denominator, plug in the specific x-value that makes one factor zero, which cancels out every other unknown and leaves a single one-step equation for that unknown alone. Repeating this for each distinct linear root solves for all of them individually, without ever building or solving the full coefficient system.

Does this handle repeated factors correctly?

Yes. A linear factor raised to the power k gets one term for every power from 1 up to k, and a repeated irreducible quadratic follows the same rule with a linear numerator at each step. Leaving out any of those terms is the single most common setup mistake, since it leaves the system with fewer unknowns than the denominator's degree actually requires.

What if the fraction is improper?

When the numerator's degree is equal to or greater than the denominator's, the fraction is improper and needs polynomial long division first. That division produces a whole polynomial quotient plus a proper remainder; only the remainder gets decomposed into partial fractions, and the quotient is added back onto the final answer.

Can this calculator do complex partial fraction decomposition?

It decomposes over the real numbers, the form used in essentially all calculus and engineering coursework, where an irreducible quadratic factor is kept as one quadratic term rather than split into a complex-conjugate pair. It does not output complex-number coefficients directly, since real textbook and homework problems almost never ask for that form.

Does this work for simple partial fraction problems too?

Yes, a denominator with one or two distinct linear factors, the simplest and most common homework case, decomposes the same way as any harder one, just with fewer steps and fewer unknowns to solve for. The calculator shows the same full step-by-step breakdown regardless of how simple or complicated the denominator turns out to be.

Is there a partial fraction decomposition chart or rules summary?

Yes, the reference table above lists the exact decomposition form for each of the four factor types side by side with a real example of each. It's the same rule set explained in the guide sections on this page, just condensed into a single lookup table rather than a downloadable file.

Why doesn't this cover the Casio or TI-84 calculator method?

Because that's a different question: it's asking how to solve the resulting system of equations on a specific physical calculator model during an exam, not what the decomposition itself is. This tool solves the actual math directly and shows every step, which works regardless of what calculator, if any, someone has in hand.

What degree of denominator can this calculator handle?

Up to degree 12, with whole-number coefficients in both the numerator and denominator. That comfortably covers real coursework and engineering problems, which rarely go past degree 6, while leaving real margin above that before floating-point precision genuinely becomes a limit.

Can I type an already-factored denominator?

Yes. Typing (x-2)(x+1) works exactly the same as typing its expanded form, x2-x-2, and a leading number like 2(x-1)(x+2) works too, including a repeated factor written as (x+1)2. This calculator multiplies everything out internally before factoring, so entering a denominator either way gives the identical decomposition and the same step-by-step answer.

References

  1. [1] Wikipedia contributors. “Partial fraction decomposition.” Wikipedia. Accessed 2026-09-28.
  2. [2] ChiliMath editorial team. “Partial Fraction Decomposition.” ChiliMath. Accessed 2026-09-28.