A technique for analyzing gamma-ray spectral-logging data has been developed, in which a digital computer is used to calculate the effects of gamma-ray attentuation in a borehole environment. The computer model allows for the calculation of the effects of lithology, porosity, density, and the thickness of a horizontal layer of uniformly distributed radioactive material surrounding a centralized probe in a cylindrical borehole. The computer program also contains parameters for the calculation of the effects of well casing, drilling fluid, probe housing, and losses through the sodium-iodide crystal. Errors associated with the commonly used mathematical assumption of a point detector are eliminated in this model. (USGS)