Computation of the observables of a Mössbauer spectrum, primarily the isomer shift, from a first-principles approach is described. The framework used is density functional theory using the projector augmented wave formalism (DFT PAW), which enables efficient computation even of many-electron solids such as SnCl(2). The proper PAW version of the isomer shift is derived and shown to be correct through comparison of computed shifts and experiment in a variety of compounds based on tin, germanium and zinc. The effects of pressure are considered as well as motional effects including the Lamb-Mössbauer factor and the second-order Doppler shift.