Stirling Number Calculator

Calculate Stirling numbers of the first and second kind for any n and k values up to 20.

Parameters

Unsigned: c(n, k) — permutations of n elements with k cycles.

Result

c(5, 2)
50

Triangle Table

rows 0–5

Each cell shows the value for that (n, k) pair. The highlighted cell is your selected (n, k).

Copied!

Summary

Calculate Stirling numbers of the first and second kind for any n and k values up to 20.

How it works

  1. Select whether you want Stirling numbers of the first kind (cycle permutations) or the second kind (set partitions).
  2. Enter the values of n (number of elements) and k (number of groups/cycles).
  3. Click Calculate to compute the result using the triangular recurrence relation.
  4. View the full triangle table up to n for quick lookup of related values.
  5. Copy the result to the clipboard for use in your work.

Use cases

  • Count the number of ways to arrange n objects into k non-empty cycles (first kind).
  • Count the number of ways to partition n objects into k non-empty subsets (second kind).
  • Verify combinatorics homework or exam answers for Stirling number problems.
  • Explore the Stirling triangle table for pattern recognition in combinatorics research.
  • Convert between falling factorials and ordinary polynomials using first kind coefficients.
  • Compute Bell numbers by summing Stirling numbers of the second kind across k.

Frequently Asked Questions

Last updated: 2026-06-13 · Reviewed by Nham Vu