Bell Number Calculator
Enter a set size n (0–25) to compute the Bell number Bn.
Result
How it is calculated
The tool builds the Bell triangle. Row 0 is 1. Each new row starts with the last number of the row above, and every further entry is the entry to its left plus the entry above that one: a(i,j) = a(i,j-1) + a(i-1,j-1). The first number of row n is the Bell number Bn, the count of ways to split n distinct items into non-empty, unlabelled groups. Here n is a whole number from 0 to 25; a decimal is rounded down (7.9 is treated as 7), and values below 0 or above 25 give no result. Up to 25 the answer fits an exact integer, so no rounding error creeps in. The tool also shows Bn-1, the previous Bell number; for n = 0 it shows 1.
Worked example
Take n = 10. Early rows are 1; 1 2; 2 3 5; 5 7 10 15; 15 20 27 37 52. Carrying on the same way, row 9 starts with 21,147 (B9) and ends with 115,975, so row 10 begins with 115,975, and that first value is the answer. Result: B10 = 115,975 ways to partition a 10-element set, and the previous Bell number B9 is 21,147. The ratio is about 5.5, which shows how fast the sequence grows.
Common mistakes
- Confusing Bell numbers with Stirling numbers of the second kind: a Stirling number counts partitions into exactly k groups, while Bn adds them up over every k from 1 to n.
- Treating the elements as identical. Bell numbers count partitions of distinct items; identical items would be a different count.
- Expecting groups to be labelled or ordered. Swapping two groups, or the order inside a group, is not a new partition.
- Entering n = 26 or more, or a negative number, and expecting a value: the tool accepts only 0 to 25.
- Entering a decimal like 7.9 and reading the result as B8; it is rounded down to 7, giving 877.
About this calculator
The Bell number Bn counts the total number of ways to partition a set of n distinct elements into non-empty, unlabeled subsets — every possible way of grouping the elements, regardless of order between or within groups. Bell numbers grow explosively (B0=1, B1=1, B2=2, B3=5, B4=15, B5=52...) and are most efficiently computed with the Bell triangle, a Pascal's-triangle-like construction where each row's first entry is the last entry of the previous row, and this calculator builds that triangle to compute Bn exactly for n up to 25.
Bell numbers are a foundational object in combinatorics and set theory courses, appearing whenever a problem asks “in how many ways can this set be grouped” — from counting equivalence relations on a set to enumerating rhyme schemes in poetry (a genuinely used application) and analyzing partition lattices in abstract algebra. They also show up in computer science when counting the number of ways to partition data into clusters without predetermined cluster labels.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Bell numbers are a good reality check before you try to brute-force a grouping problem. Trying every way to cluster 12 items means checking 4,213,597 partitions, which a computer handles easily; with 15 items it is 1,382,958,545, and with 20 items it passes 51 trillion. That jump is why exhaustive clustering search stops being practical so quickly. What problem are you counting partitions for: clustering, scheduling, or a puzzle?