Consider the following house shaped box with the indicated measures:
I need to get the best possible approximation of how many balls of 3 inches of diameter can fit in this box without exceeding the actual number of balls.
I computed the volume of the box, which is:
$$80 \times 70 \times 31 + \frac{70 \times 19}{2} \times 80 = 226800.$$ Then I computed the volume of a ball: $$\frac{4}{3} \pi \times (1.5)^3 \approx 14.14$$ Then I divided these two numbers: $$\frac{226800}{14.14} \approx 16039.$$ And I got that 16039 balls can fit in the box. However, I know there are spaces between the balls, so I think I'm exceeding the actual number of balls that can fit in the box. I think I should use a more ingenious method to solve this problem. Any suggestions?

The densest packing of spheres is achieved by a hexagonal close packing (or some rotation of that such as FCC). This has density $\approx 74\%$. So a better estimate would be if we take $74\%$ of the volume of the house and divide that by the volume of the spheres. And considering the relative magnitudes of the size of the house and spheres, this will be a pretty good approximate. This gives us $$74\%\cdot 16039\approx 11869$$