Integer Partition Calculator

Count the ways a whole number can be written as a sum of positive integers, where order does not matter. It also counts partitions into distinct parts and lists every partition for small numbers.

1 Fill in the box

2 Your answer

Your answer shows here as you type.

How to use the Integer Partition Calculator

  1. Enter a whole number from 0 to 200.
  2. Read the number of partitions, which counts every way to write n as a sum of positive integers in any order.
  3. For n from 1 to 20, scroll the text below the results to see each partition listed.

Frequently asked questions

What is an integer partition?

An integer partition of n is a way to write n as a sum of positive integers where the order does not matter. For example, 4 has five partitions: 4, 3 + 1, 2 + 2, 2 + 1 + 1 and 1 + 1 + 1 + 1.

What is the partition function p(n)?

p(n) is the number of partitions of n. Typical values are p(5) = 7, p(10) = 42 and p(100) = 190,569,292. It grows roughly like exp(pi times the square root of 2n/3) divided by 4n times the square root of 3.

What is a partition into distinct parts?

It is a partition in which no part repeats. For 5 there are 3: 5, 4 + 1 and 3 + 2. Euler showed that this count equals the number of partitions of n into odd parts.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.