If all particles are spherical and of the same diameter there are formulas for different ways the particles might pack. Hexagonal close packing is the most dense array. If the sample involves several different particle sizes the situation becomes much more complicated. It is hard (impossible?) to compute the packing density unless you know the location of each particle.
Life is easier if you want to determine the packing density (fraction of space occupied by the solid particles) of a real system, such as steel ball bearings of various sizes mixed together.
1) Get the (tare) mass of an empty graduated cylinder whose diameter is five times the size of the largest sphere.
2) Make up a mix with enough of the sphere mix that the final height in the cylinder will be five times the diameter of the cylinder
3) Measure the weight of the sphere mix.
4) Shake the spheres in a large container and pour the mix rapidly (to reduce de-mixing) into a graduated cylinder.
5) Jog the cylinder to allow the spheres to bounce up and then drop back to achieve good local packing
6) Record the volume of the packed bed (at the top of the packed spheres).
7) Compute the mass of solid steel for that volume as volume x density of steel
8) The packing fraction is the weight of the sphere mix (from 3) divided by the mass of pure steel (from 7)
9 Repeat 4-8 several times to check for consistent results.