A partial fraction decomposition calculator reverses the operation you learned when you first added fractions with different denominators. Adding 1/(x−1) and 1/(x+2) produces a single fraction with denominator x²+x−2. Decomposition takes that single fraction and pulls it back apart into the simple pieces it came from — which is the only form in which a rational function can be integrated term by term, inverse-Laplace-transformed, or expanded as a series.
Arb Digital built this page to show the working rather than just the answer. The tool prints the factored denominator, the template it set up before solving, the linear system it produced, the solved coefficients, and a verification step that reassembles the pieces and checks they match the original numerator. If the denominator is one it cannot factor honestly, it says so and stops instead of producing a plausible but wrong decomposition.
What This Partial Fraction Calculator Does
You enter the numerator and denominator as coefficient lists, highest power first. The tool first checks whether the fraction is proper. If the numerator's degree is greater than or equal to the denominator's, it performs polynomial long division and separates a polynomial part, because partial fractions only exist for proper fractions. Our polynomial division calculator does that step alone if you want to see it isolated.
It then factors the denominator by searching for rational roots, grouping repeats into multiplicities, and identifying irreducible quadratic factors including repeated ones. From that factorisation it builds the correct template, converts the identity into a system of linear equations by equating coefficients, solves the system by Gaussian elimination with partial pivoting, and converts the resulting decimals back into exact fractions where an exact fraction exists.
This is a different job from our polynomial arithmetic calculator, which adds, subtracts and multiplies polynomials, and from the simplify fractions calculator, which reduces ordinary numeric fractions. Here the fractions are algebraic and the goal is to split rather than to combine or reduce.
How to Use It
- Enter the numerator coefficients. Include every power down to the constant, using 0 for missing terms — x³ + 1 is "1, 0, 0, 1", not "1, 1".
- Enter the denominator coefficients. Enter the expanded form. If you only have the factored form, multiply it out first, or use the polynomial arithmetic calculator to do it.
- Choose fractions or decimals. Fractions are recovered from the numeric answer using a continued-fraction search, so a coefficient that is genuinely irrational stays as a decimal.
- Read the steps panel. It shows the factorisation, the template, the solved values and a verification residual. A residual of zero means the decomposition reassembles exactly.
- Try the presets. The three buttons load a repeated linear factor, an irreducible quadratic, and an improper fraction, which are the three cases that behave differently.
The Method: How the Decomposition Is Calculated
Every proper rational function with a real denominator can be written as a sum of terms of just two shapes. For a linear factor (x − r) appearing with multiplicity m, you need m terms: A₁/(x − r) + A₂/(x − r)² + … + Aₘ/(x − r)m. For an irreducible quadratic (x² + px + q) with multiplicity m, you need m terms with linear numerators: (B₁x + C₁)/(x² + px + q) + … + (Bₘx + Cₘ)/(x² + px + q)m.
Count the unknowns and you will find they always total exactly the degree of the denominator. That is not a coincidence — it is why the system is square and has a unique solution. Multiply the identity through by the denominator, expand, and match coefficients of each power of x. The result is a square linear system, and solving it gives every unknown at once.
Work the default example by hand. (3x + 5)/(x² + x − 2) factors as (3x + 5)/((x − 1)(x + 2)), giving the template A/(x − 1) + B/(x + 2). Multiplying through: 3x + 5 = A(x + 2) + B(x − 1). Setting x = 1 kills B and leaves 8 = 3A, so A = 8/3. Setting x = −2 kills A and leaves −1 = −3B, so B = 1/3. The tool returns exactly those two values.
Repeated Factors: Why You Need Every Lower Power
The rule that catches most people is that a factor (x − r)m contributes m separate terms, one for each power from 1 up to m, and not a single term over the full power. Try the shortcut and the algebra tells you immediately: a lone A/(x − 2)² can only produce a constant numerator over that squared denominator, and there is no constant that reproduces a general linear numerator.
The preset loads (x + 3)/((x − 2)²(x + 1)), whose expanded denominator is x³ − 3x² + 4. The template is A/(x − 2) + B/(x − 2)² + C/(x + 1), and the answers are A = −2/9, B = 5/3 and C = 2/9. Notice that B, the coefficient over the highest power, can be found by the cover-up method — substitute x = 2 into (x + 3)/(x + 1) to get 5/3 — but A cannot, because covering up (x − 2) leaves a factor of (x − 2) still in the denominator. That is precisely why the general method equates all coefficients rather than substituting convenient roots.
The verification row in the steps panel exists for this case. It reassembles the decomposition over the common denominator and compares the result with the original numerator. If you have dropped a term, the residual will be non-zero and the mistake shows up immediately instead of after a page of integration.
Irreducible Quadratics Get Linear Numerators
A quadratic is irreducible over the real numbers when its discriminant p² − 4q is negative, meaning it has no real roots and cannot be split further into real linear factors. x² + 1 is the canonical example. Such a factor takes a numerator of the form Bx + C, not a bare constant, because a constant numerator is a special case that cannot represent every proper fraction over that denominator.
The quadratic preset loads (2x² + x + 1)/((x + 1)(x² + 1)), expanded denominator x³ + x² + x + 1. The template is A/(x + 1) + (Bx + C)/(x² + 1) and the answer is A = 1, B = 1, C = 0, so the decomposition is 1/(x + 1) + x/(x² + 1). Both terms are now standard integrals: the first gives a logarithm of a linear expression, the second gives half the logarithm of x² + 1. That split is the whole reason the technique exists, and it is developed alongside the other integration techniques in MIT's Single Variable Calculus course.
Repeated irreducible quadratics work the same way with an extra layer: (x² + 1)² needs (B₁x + C₁)/(x² + 1) plus (B₂x + C₂)/(x² + 1)². Enter x²/(x² + 1)² as numerator "1, 0, 0" and denominator "1, 0, 2, 0, 1" and the tool returns 1/(x² + 1) − 1/(x² + 1)², which you can verify in one line by putting the two terms over a common denominator.
Improper Fractions Must Be Divided First
Partial fraction decomposition is only defined for proper fractions, where the numerator's degree is strictly less than the denominator's. If it is not, no template exists, because the sum of proper fractions is always proper and can never equal something that grows like a polynomial.
The fix is polynomial long division. Divide, keep the quotient as a standalone polynomial term, and decompose only the remainder over the original denominator. The improper preset loads (x³ + 1)/(x² − 1). Dividing gives a quotient of x with a remainder of x + 1, so the expression becomes x + (x + 1)/((x − 1)(x + 1)), and the remainder fraction simplifies to 1/(x − 1) once the shared factor cancels. The tool performs the division automatically and reports the polynomial part separately, but recognising why it is necessary saves you from setting up a template that cannot be solved.
What This Tool Refuses to Do
Not every polynomial factors nicely over the rationals, and pretending otherwise is worse than refusing. This calculator finds rational roots exactly, extracts their multiplicities, splits any remaining quadratic, and searches a bounded range for repeated irreducible quadratic factors. When a denominator resists all of that — 1/(x⁵ − 1) is a clean example, because the quartic left after dividing out (x − 1) is irreducible over the rationals and is not a product of two rational quadratics — the tool reports that it could not factor the denominator and stops.
That refusal is deliberate. A decomposition built on a wrong factorisation produces terms that look right, integrate cleanly, and give an answer that is simply false. If you hit the message, either supply a denominator you have already factored and expanded, or accept that the case needs complex-valued factors. The theory of how many roots a polynomial has and where they can sit is set out in the DLMF section on the zeros of polynomials, and our quadratic equation solver and rational root calculator help with the factoring step itself.
Where Decomposition Is Actually Used
The obvious use is integration. A general rational function has no elementary antiderivative you can write down directly, but every partial fraction term does — a constant over a linear factor integrates to a logarithm, a constant over a repeated linear factor integrates to a power, and a linear numerator over an irreducible quadratic splits into a logarithm plus an arctangent.
The less obvious uses are larger. Inverse Laplace transforms in control engineering are almost entirely partial fractions: a transfer function is a rational function of s, and each partial fraction term maps to a known time-domain response, so the decomposition literally tells you which exponentials and oscillations the system produces. The same trick generates closed forms for linear recurrence relations, which is how the explicit formula for the Fibonacci numbers is derived — decompose the generating function, read off the geometric series, and the closed form falls out. Our Fibonacci calculator and complex number calculator sit next door to that work.
Arb Digital publishes hundreds of free calculators covering algebra, calculus, geometry and statistics — all free to use, with no sign-up and no limit on how often you run them.
Browse All Free Tools Suggest a ToolCommon Mistakes to Avoid
- Giving a repeated factor only one term. (x − r)³ needs three terms with denominators (x − r), (x − r)² and (x − r)³.
- Giving an irreducible quadratic a constant numerator. It needs Bx + C. A bare constant cannot represent every proper fraction over that denominator.
- Skipping the long division on an improper fraction. No template exists until the numerator's degree is strictly lower than the denominator's.
- Omitting zero coefficients. Entering x³ + 1 as "1, 1" describes x + 1 instead. Every power needs a slot.
- Trusting the cover-up method everywhere. It only gives the coefficient over the highest power of a repeated factor. The lower powers still need the full system.
Related Free Tools From Arb Digital
Use the polynomial division calculator for the long-division step, the polynomial arithmetic calculator to expand a factored denominator before entering it, the rational root calculator to find the factors by hand, and the quadratic equation solver to test whether a quadratic is irreducible. More live in the free tools hub.
Frequently Asked Questions
It is the reverse of adding algebraic fractions. A single rational function is rewritten as a sum of simpler fractions whose denominators are the factors of the original denominator. The result is the only form in which a general rational function can be integrated term by term.
Because a single term over the highest power can only carry a constant numerator, which is not general enough to reproduce every proper fraction over that factor. A factor raised to the power m contributes m terms, one for each power from one up to m.
A linear numerator of the form Bx plus C. A quadratic is irreducible when its discriminant is negative, so it has no real roots and cannot be split into real linear factors, and a constant numerator would not cover every possible proper fraction over it.
Divide first. Perform polynomial long division, keep the quotient as a separate polynomial term, and decompose only the remainder over the original denominator. Partial fractions are defined only when the numerator degree is strictly less than the denominator degree.
Because it could not factor it into rational linear factors and quadratics it can identify. Rather than guess a factorisation and return a decomposition that looks correct but is false, it stops and tells you. Factor the denominator yourself, expand it, and enter that instead.
No. Substituting a root to kill the other terms works for distinct linear factors and for the highest power of a repeated factor. It cannot recover the coefficients over the lower powers of a repeated factor, or the numerators over irreducible quadratics, so the full coefficient-matching system is still needed.
Include a zero for every missing power. Coefficients run from the highest power down to the constant, so x cubed plus one is entered as one, zero, zero, one. Leaving the zeros out silently describes a lower-degree polynomial.
It is central to inverse Laplace transforms in control engineering, where each term maps to a known time-domain response, and to solving linear recurrence relations, where decomposing the generating function produces a closed formula. The explicit formula for the Fibonacci numbers is derived this way.
This calculator is provided for study and for checking your own working. It is not a substitute for showing the algebraic steps your course or assessment requires.