Partition Function p(n) Calculator

Enter a non-negative integer n to get the number of integer partitions p(n).

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

This calculator computes the integer partition function p(n), a classic object of study in number theory: the number of distinct ways to write n as a sum of positive integers, where order doesn't matter (so 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1 counts as 4 partitions, not more). The function grows explosively — p(100) already exceeds 190 million.

p(n) is famous for the Hardy–Ramanujan asymptotic formula that approximates it for large n, and for Ramanujan's remarkable congruences (like p(5n+4) always divisible by 5). This calculator returns the exact value, computed for any n up to 300.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators