Abstract Porosity sensitivity is an important index for determining the spacing of the neutron porosity tool, and optimized spacing can improve formation porosity resolution. Based on the neutron flux formula obtained through a double-group approach, we study the variations of fast-neutron slowing-down length and thermal-neutron diffusion length and their derivatives with formation porosities; calculate porosity sensitivity for different porosity values; and derive relationships for how the distance between the source and the near detector or the distance between the two detectors depends on porosity sensitivity. Both the theoretical analysis and the calculations show that the relationship between porosity sensitivity and the short spacing is not monotonic. For a fixed spacing interval, sensitivity increases with increasing spacing in lower porosity formations, whereas the opposite occurs in relatively higher porosity formations. The spacing has little influence on the sensitivity. For a fixed short spacing, the sensitivity is a monotonically increasing function of the spacing interval in the whole range of formation porosity.