Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Partial fraction calculator

Enter a rational function as a numerator and a denominator. You get the decomposition in exact fractions, with the setup, the system of equations, the solution and a check that the pieces add back up.

Polynomials in x with exact coefficients. Typing the denominator in factored form always works; expanded denominators are factored for you when the roots are rational.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Integrate the pieces with the integral calculator, or see why parts and partial fractions go together in integration by parts.

What partial fractions are

Partial fraction decomposition rewrites one complicated fraction of polynomials as a sum of simpler ones. It's the standard first step for integrating a rational function, because each simple piece has a known integral, and it's also used for inverse Laplace transforms.

How it's done

  1. Divide if needed. If the numerator's degree is at least the denominator's, use polynomial long division first. Only the remainder is decomposed.
  2. Factor the denominator into linear factors and irreducible quadratics (quadratics with no real roots).
  3. Write one term per factor using the rules below, with unknown constants on top.
  4. Clear the denominators by multiplying both sides by the original denominator, then match the coefficients of each power of x. That gives a system of linear equations.
  5. Solve the system and substitute the constants back in.
Linear factor (x − r):   A/(x − r)
Repeated (x − r)ⁿ:   A₁/(x − r) + A₂/(x − r)² + … + Aₙ/(x − r)ⁿ
Irreducible quadratic q(x):   (Bx + C)/q(x), and one such term per power if it repeats

The calculator does all of this in exact fractions and then multiplies everything back out to confirm it gets your original fraction. If that check fails, it shows no answer.

Worked example

Decompose (3x + 5)/((x − 1)(x + 2)).

  1. The degree of the top (1) is less than the bottom (2), so no division is needed.
  2. Write (3x + 5)/((x − 1)(x + 2)) = A/(x − 1) + B/(x + 2).
  3. Multiply by (x − 1)(x + 2): 3x + 5 = A(x + 2) + B(x − 1).
  4. Match coefficients: x terms give A + B = 3; constants give 2A − B = 5. Adding them, 3A = 8, so A = 8/3 and B = 1/3.
  5. Answer: 8/(3(x − 1)) + 1/(3(x + 2)). The shortcut of putting x = 1 into 3x + 5 = A(x + 2) + B(x − 1) gives 8 = 3A directly (the "cover-up" method).

More examples

FractionPartial fractions
1/(x²(x + 1))−1/x + 1/x² + 1/(x + 1)
(2x² + 3)/((x − 1)(x² + 1))5/(2(x − 1)) − (x + 1)/(2(x² + 1))
1/(x³ − x)−1/x + 1/(2(x + 1)) + 1/(2(x − 1))
x³/(x² − 1)x + 1/(2(x + 1)) + 1/(2(x − 1))

What isn't supported

  • Irrational or complex linear factors. A factor like x² − 2 has real roots ±√2, which aren't rational, so it can't be split into factors with rational coefficients. The calculator says so rather than giving decimals.
  • Denominators it can't factor. Expanded denominators are factored by finding rational roots. A quartic like x⁴ + 5x² + 4 that splits only into quadratics must be typed in factored form, (x² + 1)(x² + 4).
  • Decimals that aren't exact, functions other than polynomials, variables other than x, and denominators above degree 12.

To integrate the result, use the integral calculator; each A/(x − r) term integrates to A·ln|x − r|. For polynomial roots, see the polynomial roots calculator.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • (3x + 5)/((x − 1)(x + 2)) = 8/(3(x − 1)) + 1/(3(x + 2)) ✓
  • Repeated factor: 1/(x²(x + 1)) = −1/x + 1/x² + 1/(x + 1) ✓
  • Irreducible quadratic: (2x² + 3)/((x − 1)(x² + 1)) = 5/(2(x − 1)) − (x + 1)/(2(x² + 1)) ✓
  • Expanded denominator: 1/(x³ − x) = −1/x + 1/(2(x + 1)) + 1/(2(x − 1)) ✓
  • Improper: x³/(x² − 1) = x + 1/(2(x + 1)) + 1/(2(x − 1)) ✓
  • Repeated quadratic: (5x² + 2x + 3)/(x(x² + 1)²) = 3/x − 3x/(x² + 1) + (2x + 2)/(x² + 1)² ✓
  • Edge case: x² − 2 has irrational roots, so it isn't supported ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

How do you do partial fraction decomposition?

Divide first if the top's degree is at least the bottom's. Factor the denominator, write one term per factor (and per power of a repeated factor), multiply through by the denominator, match coefficients, and solve for the constants.

What do you put over an irreducible quadratic factor?

A linear numerator, Bx + C. Over a linear factor you put a constant.

How do you handle repeated factors?

Give each power its own term. For (x − 1)³, write A/(x − 1) + B/(x − 1)² + C/(x − 1)³.

Why use partial fractions?

To integrate rational functions. Each simple piece has a standard integral, such as ∫A/(x − r) dx = A·ln|x − r| + C.

What if the numerator's degree is too big?

Do polynomial long division first. The answer is the quotient plus the partial fractions of the remainder over the denominator.

Related calculators