A borehole correction model, based on more than 1,000 laboratory measurements, has been developed for logging tools that measure gamma ray energy spectra induced by the capture of thermal-energy neutrons. The measurements was made with a field-worthy tool incorporating a pulsed source of 14-MeV neutrons and a NaI(Tl) gamma ray detector. In addition to the obvious geometric dependencies on borehole and casing sizes, the sensitivity of the measurement to elements within the borehole was found to depend just as strongly on the porosity and salinity of the borehole and formation fluids. The model decouples the geometric effects from most of the nuclear physics effects by explicitly including the time decay of the neutron flux in each homogeneous region.