Quick guide
How to use this calculator
- Enter the number of identical objects and labeled boxes.
- Choose whether empty boxes are allowed.
- Read the exact number of distributions.
Calculation method
Separate identical objects with bars
Allowing empty boxes gives C(n+k−1,k−1). Requiring every box to be non-empty gives C(n−1,k−1), provided n is at least k.
Worked example
Distribute five objects among three boxes
When empty boxes are allowed, five stars and two bars can be arranged in 21 ways.
C(5+3−1,3−1) = C(7,2) = 21
Supported inputs
Precision and limits
Discrete domain
Inputs are whole counts. Negative, fractional, grouped, and scientific-notation inputs are rejected.
Exact integers
Results use arbitrary-precision integers and are never rounded. Inputs and output size are bounded to keep the page responsive.
