Skip to main content
Calkulon
Back to Guides
3 min read6 Steps

How to Calculate Stirling Numbers: Step-by-Step Guide

Calculate Stirling numbers manually

Skip the math — use the calculator

Step-by-Step Instructions

1

Choose the Type of Stirling Number

First, determine whether you need to calculate a Stirling number of the first kind (s(n, k)) or the second kind (S(n, k)). This will determine which formula to use.

2

Identify the Values of n and k

Next, identify the values of n and k that you want to use in the calculation. These values should be positive integers.

3

Apply the Formula

Now, plug the values of n and k into the formula for the type of Stirling number you are calculating. Make sure to calculate the binomial coefficients and evaluate the sum correctly.

4

Simplify the Expression

Simplify the expression by evaluating the sum and calculating the final result.

5

Check Your Work

Finally, check your work to ensure that you have calculated the Stirling number correctly. If you are unsure, consider using a calculator or computer program to verify your result.

6

Use a Calculator for Convenience

If you need to calculate large Stirling numbers or perform calculations frequently, consider using a calculator or computer program to speed up the process and ensure accuracy.

Introduction to Stirling Numbers

Stirling numbers are used in combinatorial mathematics to count the number of ways to partition a set of n objects into k non-empty subsets. There are two types of Stirling numbers: Stirling numbers of the first kind and Stirling numbers of the second kind.

Stirling Numbers of the First Kind

Stirling numbers of the first kind, denoted by s(n, k), count the number of permutations of n objects that have exactly k cycles. The formula for Stirling numbers of the first kind is:

s(n, k) = (1/k!) * ∑(i=0 to k) (-1)^(k-i) * (k choose i) * (i^n)

Stirling Numbers of the Second Kind

Stirling numbers of the second kind, denoted by S(n, k), count the number of ways to partition a set of n objects into k non-empty subsets. The formula for Stirling numbers of the second kind is:

S(n, k) = (1/k!) * ∑(i=0 to k) (-1)^(k-i) * (k choose i) * (i^n)

Worked Example

Let's calculate the Stirling number S(5, 3) using the formula:

S(5, 3) = (1/3!) * ∑(i=0 to 3) (-1)^(3-i) * (3 choose i) * (i^5) = (1/6) * ((-1)^3 * (3 choose 0) * (0^5) + (-1)^2 * (3 choose 1) * (1^5) + (-1)^1 * (3 choose 2) * (2^5) + (-1)^0 * (3 choose 3) * (3^5)) = (1/6) * (0 + 3 * 1 + (-3) * 32 + 1 * 243) = (1/6) * (0 + 3 + (-96) + 243) = (1/6) * 150 = 25

Common Mistakes to Avoid

When calculating Stirling numbers, make sure to:

  • Use the correct formula for the type of Stirling number you are calculating
  • Calculate the binomial coefficients (k choose i) correctly
  • Evaluate the sum correctly

When to Use a Calculator

While it is possible to calculate Stirling numbers by hand, it can be time-consuming and prone to errors. If you need to calculate large Stirling numbers or perform calculations frequently, it is recommended to use a calculator or computer program to speed up the process and ensure accuracy.

Ready to Calculate?

Skip the manual work and get instant results.

Open Calculator

Settings

PrivacyTermsAbout© 2026 Calkulon