How this calculation works
This is a guarantee for one box. The count in a particular box can be much smaller.
ceil(objects / boxes)A worked example
25 objects in six boxes force at least one box to contain five objects.
Good to know
Each object belongs to one box.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Find the smallest unavoidable maximum
With 25 objects and six boxes, suppose every box held at most four objects. The total capacity under that assumption would be 6 × 4 = 24. The twenty-fifth object forces some box to hold at least five, so the guaranteed occupancy is five.
This bound can be attained by distributing the objects as 5, 4, 4, 4, 4 and 4. Consequently no larger occupancy is guaranteed for every possible allocation. The general formula is the ceiling of objects divided by boxes.
Read the existential statement correctly
The result says at least one box reaches the bound. It does not say every box does, or identify which box. All 25 objects could instead be assigned to a single box, making the actual maximum much larger. The guarantee remains valid for that highly uneven allocation.
The Floor and ceiling of a number calculator helps interpret why a noninteger average must round upward for this guarantee. If the objects divide evenly among the boxes, the bound equals that exact average. Empty boxes are allowed. When there are fewer objects than boxes but at least one object, the guaranteed occupancy is one, even though several boxes may remain empty.
A few questions, answered
What does zero objects return?
Zero. Every box can have occupancy zero, and at least one box certainly has at least zero objects.
Is this an average occupancy estimate?
The average is objects/boxes. The output is an integer lower bound on the largest box occupancy across all possible allocations.