The structure of potassium dinitramide (KDN), KN3O4, has been refined in the temperature range 85–298 K from single-crystal X-ray diffraction data. The unit-cell axial lengths and the cell volume decrease linearly on cooling with the b axis being the most sensitive to the change of temperature. The β cell angle increases with decreasing temperature. The thermal expansion of KDN is significantly anisotropic, expanding along the b axis [010] more than three times the amount parallel to any other crystallographic direction. Other eigenvectors of the thermal expansion tensor lie approximately parallel to the diagonals of the ac plane. A rigid-body analysis of the dinitramide ion using the TLS formalism was performed and shows that the thermal motion of the anion is well represented by the rigid-body model. The eigenvalues of the libration tensor show significant anisotropy, whereas the translation tensor is close to isotropic. The variation of all descriptions of the thermal motion with respect to temperature indicates an anharmonic contribution to the mean field potential. The direction of greatest unit-cell expansion coincides with the largest components of the displacement tensor of the potassium ions and the direction of the largest atomic amplitudes due to the libration of the dinitramide anions.