Neutron diffraction results on Nd2Fe16.5X0.5 (X = Al, Ti, Nb, W) show that Al preferentially substitutes for Fe in the 18h site while Ti, Nb and W preferentially substitute for Fe in the 6c site. This substitution can be explained by considering the enthalpy of mixing using Miedema's model. We find that the enthalpy of mixing for Al-Nd is much lar er and more negative than for Al-Fe. On the other hand, Ti, Nb and W have positive enthalpies of mixing with Nd while their enthalpy of mixing is negative or zero with Fe. This drives the Al atoms to substitute for Fe in sites with the largest number, 3, of Nd nearest neighbours (i.e. the 18h site) and Ti, Nb and W to substitute for Fe in sites with the smallest number, 1, of Nd nearest neighbours (i.e. the 6c site). From the size similarity of the X elements, we conclude that the volume of the Fe sites does not play a role in the substitution mechanism.