Bell Number Calculator

Partitions

Bell number B(10)115,975
previous Bell number B(9)21,147
next Bell number B(11)678,570
ways to partition a set of 10 labelled items115,975
How this was calculated
  1. The Bell number B(n) counts the ways to split a set of n labelled items into any number of non-empty, unlabelled groups - the set partitions.
  2. The Bell triangle builds them row by row: each row starts with the last number of the row before, and every next entry adds the number above it.
  3. Row 10 of the triangle starts with B(10) = 115,975, between B(9) = 21,147 and B(11) = 678,570.
  4. Equivalently, B(n) is the sum of the Stirling numbers of the second kind S(n, k) over all group counts k - the triangle and the sum always agree.

Ask a simple question - in how many ways can a set of labelled items be split into groups, if the groups themselves carry no labels and any number of groups is allowed? - and the answer is a Bell number. For 3 items there are 5 ways; for 4 items, 15; for 10 items, already 115,975.

This Bell number calculator builds the values with the Bell triangle (Aitken's array), the classical addition-only construction: each row begins with the last number of the row before, and every subsequent entry adds the number above it. The first entry of row n is B(n).

Bell numbers grow faster than any exponential, which is what makes them interesting: B(15) = 1,382,958,545 and B(16) = 10,480,142,147. They count set partitions wherever grouping is the whole story - clustering, equivalence relations, and the moments of the Poisson distribution among them.

Worked examples

Partitions of a 10-element set

(Value at n · 10)

Bell number B(10)115,975
previous Bell number B(9)21,147
next Bell number B(11)678,570
ways to partition a set of 10 labelled items115,975

B(15)

(Value at n · 15)

Bell number B(15)1,382,958,545
previous Bell number B(14)190,899,322
next Bell number B(16)10,480,142,147
ways to partition a set of 15 labelled items1,382,958,545

First 8 Bell numbers

(First n terms · 8)

first 8 Bell numbers1, 1, 2, 5, 15, 52, 203, 877
last term877
sum of the terms1,156
number of terms8

What a Bell number counts

A set partition divides a set into non-empty, disjoint, unlabelled blocks whose union is the whole set. B(n) counts the partitions of an n-element set. The count ignores both the order of the blocks and any structure inside them: for a 10-element set, all 115,975 groupings - from one block of ten to ten singletons - are included.

The small cases can be checked by hand. B(0) = 1 (the empty set has one, empty, partition), B(1) = 1, B(2) = 2 (together, or apart), B(3) = 5 and B(4) = 15. The calculator's list mode reproduces exactly these: the first 8 Bell numbers are 1, 1, 2, 5, 15, 52, 203, 877.

  • B(0) = 1, B(1) = 1, B(2) = 2, B(3) = 5, B(4) = 15
  • B(10) = 115,975 partitions of a 10-element set
  • Blocks are non-empty, disjoint and unlabelled

The Bell triangle

The triangle computes every Bell number with additions alone. Write 1. Each new row starts with the last number of the previous row; then each entry is the sum of the entry above it and the entry just written. The rows begin 1; 1, 2; 2, 3, 5; 5, 7, 10, 15; 15, 20, 27, 37, 52 - and the first entries are the Bell numbers in order.

Row 15 of the triangle starts with B(15) = 1,382,958,545. The calculator carries the triangle in exact integer arithmetic, so values such as B(16) = 10,480,142,147 come out digit-perfect even where floating-point tools would start rounding.

One more property of the triangle is worth noticing: read along its left edge it gives the Bell numbers, but read along the top edge it gives the same sequence again - the construction is symmetric in a way that lets you extend rows in either direction. It is this economy, a whole two-dimensional array from one addition rule, that made the triangle the standard hand method for Bell numbers long before computers, and it remains the clearest way to see where the values come from.

  • Each row starts with the previous row's last number
  • Every next entry adds the number above
  • Row n starts with B(n)

The Stirling number connection

Refine the question - how many partitions have exactly k blocks? - and the answer is a Stirling number of the second kind, S(n, k). Summing over all possible block counts returns the Bell number: B(n) is the row sum of the Stirling triangle. This is the calculator's conceptual cross-check: the triangle construction and the Stirling sum are independent routes to the same values.

The connection is practically useful too. If a problem fixes the number of groups - three teams, four clusters - it is a Stirling question; if the number of groups is free, it is a Bell question. Many counting mistakes in combinatorics come down to confusing the two.

  • S(n, k): partitions of n items into exactly k blocks
  • B(n) = sum of S(n, k) over all k
  • Fixed group count: Stirling. Free group count: Bell

How fast Bell numbers grow

The growth is super-exponential: the ratio B(n + 1) / B(n) itself grows without bound. Between B(14) = 190,899,322 and B(16) = 10,480,142,147 the count multiplies by roughly 55 in two steps. The first 8 Bell numbers sum to just 1,156 - a reminder of how violently the sequence accelerates after a gentle start.

This growth is why Bell numbers appear as a warning in computer science: any algorithm that enumerates set partitions - some clustering, grammar and phylogenetics procedures do - is fighting this sequence. Knowing B(n) for your n tells you immediately whether brute force is an option.

  • B(14) = 190,899,322; B(15) = 1,382,958,545; B(16) = 10,480,142,147
  • Growth is faster than any fixed-base exponential
  • First 8 values sum to 1,156

Worked example: partitioning four items

For a set of 4 items - call them a, b, c, d - the 15 partitions can be grouped by block structure: one block of four (1 way); a triple and a singleton (4 ways); two pairs (3 ways); a pair and two singletons (6 ways); four singletons (1 way). The total 1 + 4 + 3 + 6 + 1 = 15 is B(4), and the summands are the Stirling numbers S(4, 1) to S(4, 4) - the Stirling-sum view of the same count.

Already at 5 items the count is 52, beyond comfortable hand enumeration, and at 10 items it is 115,975. The jump from enumerable to astronomical in five steps is the practical content of the Bell numbers' growth rate.

  • B(4) = 15 = 1 + 4 + 3 + 6 + 1 by block structure
  • The summands are Stirling numbers of the second kind
  • B(5) = 52, B(10) = 115,975

Bell numbers in probability and beyond

The moments of the Poisson distribution are Bell numbers in disguise: the n-th moment of a Poisson variable with mean 1 is exactly B(n). This is Dobinski's formula territory - B(n) also equals (1 / e) times the infinite sum of k^n / k!, a series that converges with startling speed and gives a third independent way to compute the values.

Equivalence relations on a set are set partitions by another name, so B(n) also counts equivalence relations - and, in computer science, the possible clustering outcomes of n unlabelled-cluster assignments, the state space of mixture models, and the rhyme schemes of an n-line poem, the application Bell himself liked to cite.

  • Poisson(1) moments are Bell numbers
  • B(n) counts equivalence relations too
  • Dobinski: B(n) = (1/e) x sum of k^n / k!

Bell or Stirling: choosing the right count

The two questions differ by one phrase. 'Into any number of groups' is Bell: B(10) = 115,975. 'Into exactly k groups' is Stirling: the counts S(10, k) for k = 1..10, which sum to that same 115,975. Choosing wrongly is the most common error in elementary counting - a problem about forming 'committees' or 'clusters' without a fixed count is a Bell problem, however Stirling-shaped it may look.

A useful diagnostic: if splitting one group further, or merging two groups, produces another valid configuration that the problem counts separately, the group count is free and Bell applies. If the configuration space fixes the number of blocks in advance - exactly three teams, exactly four clusters - Stirling applies. The calculator's page covers the free case; the Stirling numbers page in the related links covers the fixed case, and the two pages' values are consistent by the row-sum identity.

  • Free group count: Bell
  • Fixed group count k: Stirling S(n, k)
  • Row-sum identity ties the two pages together

Using the calculator

Value mode returns B(n) with its predecessor and successor - B(9) = 21,147 and B(11) = 678,570 flank B(10) = 115,975 - which makes the growth tangible and catches index slips. List mode gives the first n values with their sum. Single values are supported up to n = 30; the exact-arithmetic triangle keeps every digit honest.

Eric Temple Bell, whose name the numbers carry, studied them in the 1930s; the triangle construction is older, associated with Alexander Aitken. The sequence is OEIS A000110.

  • Value mode up to n = 30, exact integers
  • List mode with running sum
  • OEIS A000110

FAQs

What is the Bell number for 10 items?

B(10) = 115,975 - the number of ways to partition a set of 10 labelled items into any number of unlabelled groups.

What does a Bell number count?

Set partitions: the ways to split n labelled items into non-empty, unlabelled groups, with any number of groups allowed.

What is B(15)?

1,382,958,545. It sits between B(14) = 190,899,322 and B(16) = 10,480,142,147.

How is the Bell triangle built?

Each row starts with the last number of the row before it, and every following entry adds the number above it. The first entry of row n is B(n).

What are the first Bell numbers?

1, 1, 2, 5, 15, 52, 203, 877 - for sets of 0 through 7 elements. They sum to 1,156.

How do Bell numbers relate to Stirling numbers?

B(n) is the sum of the Stirling numbers of the second kind S(n, k) over all block counts k: Stirling fixes the number of groups, Bell leaves it free.

Sources

Related calculators

Stirling Numbers Calculator
Stirling numbers of the second kind S(n, k) - the ways to partition n items into k groups - with the Bell number.
Catalan Number Calculator
The Catalan numbers — C(2n, n) divided by (n + 1) — counting bracketings, binary trees, polygon triangulations and lattice paths that never cross the diagonal.
Eulerian Number Calculator
Eulerian numbers A(n, m): how many permutations of n elements have exactly m descents, with the row total and the share of all permutations.