An efficient mathematical algorithm for the analysis of surface acoustic waves (SAW) measurements in multilayered thin film stacks has been developed. It allows for a fast and accurate calculation of SAW velocities in stacks composed of an arbitrary number of layers with varying material properties and thicknesses. The inversion algorithm also enables fast determination of multiple stack parameters from SAW dispersion curves. The model is used in a semiconductor metrology tool designed for quality control in the manufacturing of integrated circuits. Surface acoustic waves are described by a special class of solutions of the wave equation satisfying specific boundary conditions at the surface of the media in which they propagate. In the case of a stack composed of thin films, the boundary conditions at the surface of the top layer correspond to a free surface (no stress), at the interface of the individual layers a continuity of both stress and displacement is imposed. In the case of isotropic media, or in certain cases when the wave propagates along planes of symmetry [e.g., (1,0,0) plane of a cubic crystal], the set of boundary conditions results in a system of 4N coupled linear equations for the stress and displacements, where N is the number of layers in the stack. For stacks with a large number of layers, the problem quickly becomes numerically challenging. Requirements imposed by the manufacturing process on the time for data analysis and for processing of the information require fast algorithms. Such an algorithm has been developed and is being implemented in the software to be used in in-line optoacoustic metrology systems. The algorithm is based on the concept of a response function. This function describes the response of an elastic medium to a periodic excitation on its surface. By using the response function the problem of solving a system of 4N linear algebraic equations is reduced to (N−1) matrix multiplications of 4×4 matrices and solving a 2×2 equation. In the application for which this algorithm was developed a laser beam split by a diffraction grating and projected on the surface of the stack produces the excitation of the SAW. The algorithm allows a user to analyze SAW data for a system of an arbitrary large number of layers that can be either elastically isotropic or anisotropic. It significantly accelerates the computation of SAWs, which is of prime importance for industrial applications.