Counting & Number Theory

Bounded Identical Item Allocation Calculator

Count allocations of identical items into labelled bins with common per-bin minimum and optional maximum.

How the calculation works

First reserve the minimum in every bin. Without an upper bound, use stars-and-bars C(remaining+bins−1,bins−1). With a finite capacity, count coefficients of (1+x+…+x^capacity)^bins by an exact dynamic-programming sliding window.

Worked example

Example inputs — Total identical items: 5; Labelled bins: 3; Minimum items required in each bin: 0; Maximum in each bin; -1 means unbounded: 3. Expected results — Allocations satisfying all entered bounds: 12; Allocations with the same minimum but no upper bound: 21.

Assumptions and limits

Exact integer arithmetic is used for counts and integer results. Computation limits keep this browser tool responsive. Specify whether objects/groups are distinguishable and whether order matters; different conventions count different outcomes. Items are indistinguishable and bins are distinct. A bound applies equally to every bin; impossible totals return zero. Unlike unrestricted selection with repetition, finite capacity can exclude otherwise valid combinations. This does not count ordered item sequences or unlabelled groups.

Reference and further reading

Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.

Related calculators

Browse all 1000 calculators →

Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.