Counting, Permutations & Combinations

Integer Partition Calculator

Count unordered ways to express a non-negative integer as a sum of positive integers.

Counting & Combinatorics

Partition an integer into positive parts

Order ignored
  1. 1EnterProvide the known values
  2. 2CalculateResults update automatically
  3. 3VerifyReview the details and units
Try an example

Exact count

Enter valid values to see the result.

Your entries are calculated in this browser and are not submitted to 365CALCS.COM.

Feedback

Understand the subject

What is an integer partition?

An integer partition writes a number as positive parts while ignoring their order. The parts 3 + 1 and 1 + 3 are one partition.

Use it when only the multiset of positive parts matters.

The relationship

The counting rule

See the structure

Order is deliberately ignored

Worked example

Check the rule with a small case

The five unordered positive-part sums of 4 mean p(4) = 5.

Interpret with care

Choose the right counting model

If 1 + 3 and 3 + 1 are distinct, use integer compositions instead.

Use the Permutation & Combination Generator when a small case needs to be inspected rather than only counted.

Quick guide

How to use this calculator

  1. Enter the integer n.
  2. Different orders of the same positive parts are treated as one partition.
  3. Read the partition number p(n).

Calculation method

Accumulate partitions by allowed part size

A dynamic program adds each possible positive part in increasing order, which counts every unordered partition once.

Worked example

Partition four

The partitions are 4, 3+1, 2+2, 2+1+1, and 1+1+1+1.

p(4) = 5

Supported inputs

Precision and limits

Discrete domain

Inputs are whole counts. Negative, fractional, grouped, and scientific-notation inputs are rejected.

Exact integers

Results use arbitrary-precision integers and are never rounded. Inputs and output size are bounded to keep the page responsive.

Maximum n

n is limited to 1,000 to keep the exact dynamic calculation responsive.