Calculators

Distinct Integer Partition Calculator

Count exact unordered sums of distinct positive integers for totals from 0 to 1000, privately in your browser.

Count unordered sums of different positive integers. Each part may appear only once. Enter a total from 0 to 1000; zero has one empty partition. Results stay in your browser.

Enter a total to count distinct partitions.

Count partitions without repeated parts

A distinct integer partition writes n as a sum of different positive integers. Order does not matter: 1 + 4 and 4 + 1 are the same partition. For n = 5 the three partitions are 5, 4 + 1 and 3 + 2. Repeated parts such as 3 + 1 + 1 are excluded. The empty sum gives one partition of zero. Dynamic programming starts with D(0) = 1 and all other counts zero. For each allowed part j from 1 through n, update D(s) = D(s) + D(s − j) for s descending from n to j. Descending updates ensure each part is used at most once; processing parts in increasing order avoids counting reordered sums again. This differs from ordinary partitions, which allow repeats, and compositions, which distinguish order. Enter a whole number from 0 to 1000 using one to four digits. Leading zeros and surrounding whitespace are accepted; signs, decimals and scientific notation are rejected. Exact BigInt arithmetic preserves every digit. Inputs are not uploaded or stored.

Frequently Asked Questions

Everything you need to know about this tool, how it works, and privacy.

Does the order of parts matter?

No. For example 4 + 1 and 1 + 4 count as one partition of 5. Each positive part may appear only once.

What is the result for zero?

Zero has one partition: the empty sum. For 5 the result is three: 5, 4 + 1 and 3 + 2.

How are exact counts calculated?

A descending dynamic programming update counts each allowed positive part at most once. BigInt preserves all digits for totals from 0 to 1000. All processing stays in your browser.