# Balls in a Box: filling playpen with plastic balls: how many balls needed?

#### malta001

##### New member
Hi to everyone,

I have a problem and would like a practical solution please.

I have a toddler playpen which measures 90cm * 90cm * 30cm (height) and I would like to fill it with those plastic balls to play (5.5cm diameter). Now I have searched and found this formula (C = 2πr = πd = 9) and after using this then multiplication of the sides and so, I came to the amount of 45,287 balls which I find rather too high to be true. Perhaps it is calculating the whole area by pieces but dunno.

Can someone provide the correct formula and also calculate it in advance?

Thanks a lot

#### Subhotosh Khan

##### Super Moderator
Staff member
Hi to everyone,

I have a problem and would like a practical solution please.

I have a toddler playpen which measures 90cm * 90cm * 30cm (height) and I would like to fill it with those plastic balls to play (5.5cm diameter). Now I have searched and found this formula (C = 2πr = πd = 9) and after using this then multiplication of the sides and so, I came to the amount of 45,287 balls which I find rather too high to be true. Perhaps it is calculating the whole area by pieces but dunno.

Can someone provide the correct formula and also calculate it in advance?

Thanks a lot
The correct way to figure out maximum number of balls (of small diameter) in a relatively large volume can be found in:

https://en.wikipedia.org/wiki/Close-packing_of_equal_spheres

If you need further help - please post back....

#### HallsofIvy

##### Elite Member
Hi to everyone,

I have a problem and would like a practical solution please.

I have a toddler playpen which measures 90cm * 90cm * 30cm (height) and I would like to fill it with those plastic balls to play (5.5cm diameter). Now I have searched and found this formula (C = 2πr = πd = 9)
This formula is for the circumference of a circle of radius r (and diameter d) but what is important is the volume. And rather than calculating the volume of the spheres, to allow for the fact that spheres do not 'pack', I would model the sphere and air around it as a cube having side length equal to the diameter of the spheres, 5.5 cm. such a cube has volume \$(5.5)^3= 166.375 cubic centimeters. The playpen itself has volume (90)(90)(30)= 243,000
cubic centimeters. You should be able to fit about 243000/166.375= 1460 balls in the playpen.

and after using this then multiplication of the sides and so, I came to the amount of 45,287 balls which I find rather too high to be true. Perhaps it is calculating the whole area by pieces but dunno.

Can someone provide the correct formula and also calculate it in advance?

Thanks a lot

#### Denis

##### Senior Member
You should be able to fit about 243000/166.375= 1460 balls in the playpen.
Because playpen's 30 and 90 dimensions not divisible by 5.5, then:
floor(30 / 5.5) = 5
floor(90 / 5.5) = 16
5*16*16 = 1280 balls

Agree Halls?

#### Subhotosh Khan

##### Super Moderator
Staff member
Because playpen's 30 and 90 dimensions not divisible by 5.5, then:
floor(30 / 5.5) = 5
floor(90 / 5.5) = 16
5*16*16 = 1280 balls

Agree Halls?
That is a lower bound - without exploring packing factor

#### Denis

##### Senior Member
That is a lower bound - without exploring packing factor
YESSSSSS....Halls stated that: a ball is treated as a cube...