In geochemical logging, the standard capture gamma-ray spectra of Al, Mg, and K have no distinct characteristic energy peaks. This feature easily influences the spectral bands of characteristic peaks of other elements and thus affects the accuracy of calculating their concentrations. To study this influence, we constructed a model formation containing Al, Mg, and K, and employed the Monte Carlo N Particle Transport Code (MCNP) program to simulate their capture spectra. The results indicate that the calculated dry weights of Si are almost free from the influences of Mg, K, and Al. The ones of Ca and Fe are influenced, but only to a minor extent. The dry weight of S is concurrently influenced. Specifically, the K concentration causes S concentration to deviate significantly from its real concentration. By correcting for such influences, we can obtain relatively accurate values. Data processing for a real well validates the finding that Mg, Al, and K in the formation influence the precision of calculation of other elements and also testifies to the effectiveness of the correction method.