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

Exact count

Enter valid values to see the result.

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

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.