Stirling Numbers Calculator
Compute Stirling numbers of the first and second kind, and the Bell number for n.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Step 1: Open Stirling Numbers Calculator and add your input
Type your numbers or text, add your file, or pick the options you need. Nothing is uploaded: everything stays in your browser.
- 2Step 2: What Stirling Numbers Calculator does
Compute Stirling numbers of the first and second kind, and the Bell number for n.
- 3Step 3: Read the result and compare
The result appears at once. Change one value to see how the answer moves, then keep the figure that fits your case.
- 4Step 4: Copy or save it
Copy the result or download it. For an important decision, confirm it with the official source or an adviser.
About this tool
Enter n and k. The calculator gives the unsigned Stirling number of the first kind c(n, k) (permutations of n with k cycles), the signed value, the Stirling number of the second kind S(n, k) (partitions of n items into k non-empty sets) and the Bell number B(n).
Recurrences
c(n, k) = (n − 1)c(n − 1, k) + c(n − 1, k − 1). S(n, k) = k·S(n − 1, k) + S(n − 1, k − 1). The signed first-kind number is (−1)ⁿ⁻ᵏ c(n, k).
Bell number
B(n) = Σ S(n, k) counts all ways to partition a set of n items.
Worked example
For n = 7 and k = 3: c(7, 3) = 1,624, S(7, 3) = 301 and B(7) = 877.
Tips for best results
Check every box before you rely on a result, because one wrong digit changes the whole answer. Use the exact figures from your payslip, bill, certificate or contract, and keep a note of the date you calculated. Rates, thresholds and rules change from time to time, so for tax, fees and legal matters treat the output as an estimate and confirm with the official source named on this page. You can run as many scenarios as you like; nothing is saved or sent, and refreshing the page clears the boxes.
Quick facts
- Category: Math & Science
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in many languages.
- Content last reviewed:
Frequently asked questions
What does S(n, k) count?
Ways to split n labelled items into k non-empty groups.
What does c(n, k) count?
Permutations of n items with exactly k cycles.
What if k is larger than n?
Both are 0.
How large can n be?
Up to 150.
