The inelastic neutron scattering spectra for formamide (HCONH2) and its N-deuterated isomer (HCOND2) have been measured. The spectra are interpreted on the basis of a vibrational harmonic normal-mode analysis using a variety of models. The models are a single molecule, a formamide dimer, a tetramer resembling the unit cell of crystalline formamide, and a cluster of 36 formamide molecules. Force fields of the first three model systems were computed ab initio using the B3LYP DFT functional and the 6-31G** basis set. The tetramer force field was then applied to the cluster of 36 molecules. Most of the observed vibrational bands could be assigned by comparing the relative INS intensities and frequencies calculated for the theoretical models with the measured spectra. Reasonable agreement between the calculation and the experiment was achieved on this basis. The results confirm the presence of the strong hydrogen bonding in the formamide lattice. However, the previously proposed model for the hydrogen bonding in N-methylacetamide involving a dynamical proton exchange between the amidic (⋯OCNH⋯) and imidolic (⋯HOCN⋯) forms is not consistent with our findings.