We have extended the frozen-density embedding (FDE) scheme within density-functional theory [T. A. Wesolowski and A. Warshel, J. Phys. Chem. 97, 8050 (1993)] to include external magnetic fields and applied this extension to the nonrelativistic calculation of nuclear magnetic resonance (NMR) shieldings. This leads to a formulation in which the electron density and the induced current are calculated separately for the individual subsystems. If the current dependence of the exchange-correlation functional and of the nonadditive kinetic-energy functional are neglected, the induced currents in the subsystems are not coupled and each of them can be determined without knowledge of the induced current in the other subsystem. This allows the calculation of the NMR shielding as a sum of contributions of the individual subsystems. As a test application, we have calculated the solvent shifts of the nitrogen shielding of acetonitrile for different solvents using small geometry-optimized clusters consisting of acetonitrile and one solvent molecule. By comparing to the solvent shifts obtained from supermolecular calculations we assess the accuracy of the solvent shifts obtained from FDE calculations. We find a good agreement between supermolecular and FDE calculations for different solvents. In most cases it is possible to neglect the contribution of the induced current in the solvent subsystem to the NMR shielding, but it has to be considered for aromatic solvents. We demonstrate that FDE can describe the effect of induced currents in the environment accurately. © 2006 American Institute of Physics.