Abstract The patterns of desorption of oxygen and nitrogen from metal surfaces were examined and applied in the determination of gaseous elements in metal samples. The abundance of gaseous elements on metal surfaces is controlled by thermal desorption and diffusion to or from the surface. A heat treatment suitable for the separation of adsorbed gases from those in the bulk sample is discussed. Preheating of the metal samples at ca. 300° in a vacuum reduces the residual adsorbates to a minimum and retards the diffusion of the gaseous elements from the bulk to the surface.