We have studied the effect of a multipass Fabry-Perot interferometer (FP) on a scattering line. Here we describe a method that we applied to derive a closed-form expression for a line shape obtained with an ideal, multipass FP. The method reduces the convolution problem between the multipass function and the scattering line to the corresponding single-pass problem. We illustrate the method with a Lorentzian and a damped-harmonic-oscillator line passed through a single-, triple-, and quintuple-pass FP. Furthermore we have applied the method to a study of the effect of the collecting pinhole on a sharp line obtained by multipassing. We show how we used these functions to fit the complete spectra obtained with a single- and triple-pass FP.