We present a new method for computing NMR chemical shifts and magnetic susc
eptibilities in extended systems through an ab initio density functional pe
rturbation theory approach. The method is applicable to crystalline and amo
rphous insulators under periodic boundary conditions, as well as to isolate
d molecules. The formalism exploits the exponentially decaying nature of lo
calized Wannier orbitals. We have implemented the method in the context of
a plane wave pseudopotential approach. The results are in good agreement wi
th experiment and with calculations that use other theoretical methods.