This Demonstration treats the quantum-mechanical problems of a particle in a box. We consider both the one-dimensional and three-dimensional cases. For both, we show diagrams that depict the probability density and energy of the particle. These values/graphics depend on the energy level of the particle and the dimensions of the boxes. These variables can be manipulated to show how they influence the behavior of a particle in a box. For the 1D box, the energy levels are given by , where the quantum number has the possible values . For the 3D box, , where , and are the length, width and height of the box, respectively, and , and are the associated quantum numbers.