Density functional theory (DFT) calculations are performed to study the localizations of the wave functions at donor and acceptor ground states in the P−B codoped silicon (Si) nanostructures. In bulk Si, the wave function extension at the ground state is characterized by the Bohr radius, which is significantly reduced in Si nanostructures due to quantum confinement. I show that, in addition to quantum confinement, the P−B codoping further localizes the electron wave function at the dopant site by the charge transfer between the Pdonor and the B-acceptor. On the other hand, proximity between the P-donor and B-acceptor delocalizes the electron wave function at the dopant ground state. This effect becomes dominant when the P−B separation approaches direct coupling, suggesting the importance of P−B distance in nanoscale P−B codoped Si nanostructures in controlling the optical and electronic properties.