An X-ray fluorescence spectrometer configured to irradiate a sample with primary X-rays, the sample including one or more base layers containing individual components with known coating amounts or contents and a single thin film formed on the one or more base layers, the single thin film containing individual components with coating amounts to be measured and having a thickness to be measured, to determine quantitative values of the coating amounts of the individual components in the thin film and the thickness of the thin film on the basis of measured intensities of generated secondary X-rays by using the fundamental parameter method, the X-ray fluorescence spectrometer comprising: an exclusion module configured to exclude, from analysis targets, any unquantifiable component among components corresponding to measurement lines which are secondary X-rays having intensities to be measured, as preprocessing for quantitative calculation by the fundamental parameter method, characterized by that the exclusion module is configured: to calculate a coating amount of each component whose measurement element is not contained in the base layers, for each of corresponding measurement lines, on an assumption that that component solely makes up the thin film and to adopt a maximum coating amount as an initial value of the coating amount of that component; and to calculate a coating amount of each component whose measurement element is contained in the base layers, for each of corresponding measurement lines, on the basis of initial values of coating amounts of individual components whose measurement elements are not contained in the base layers, such that if quantitative calculation cannot be continued and is ended with an error indication notifying that determining quantitative values of the coating amount of that component whose measurement element is contained in the base layers and the thickness for all the corresponding measurement lines of that component gives errors, that component is excluded from analysis targets as an unquantifiable component, and in other cases, to adopt a maximum coating amount as an initial value of the coating amount of that component. an exclusion module configured to exclude, from analysis targets, any unquantifiable component among components corresponding to measurement lines which are secondary X-rays having intensities to be measured, as preprocessing for quantitative calculation by the fundamental parameter method, characterized by that the exclusion module is configured: to calculate a coating amount of each component whose measurement element is not contained in the base layers, for each of corresponding measurement lines, on an assumption that that component solely makes up the thin film and to adopt a maximum coating amount as an initial value of the coating amount of that component; and to calculate a coating amount of each component whose measurement element is contained in the base layers, for each of corresponding measurement lines, on the basis of initial values of coating amounts of individual components whose measurement elements are not contained in the base layers, such that if quantitative calculation cannot be continued and is ended with an error indication notifying that determining quantitative values of the coating amount of that component whose measurement element is contained in the base layers and the thickness for all the corresponding measurement lines of that component gives errors, that component is excluded from analysis targets as an unquantifiable component, and in other cases, to adopt a maximum coating amount as an initial value of the coating amount of that component. to calculate a coating amount of each component whose measurement element is not contained in the base layers, for each of corresponding measurement lines, on an assumption that that component solely makes up the thin film and to adopt a maximum coating amount as an initial value of the coating amount of that component; and to calculate a coating amount of each component whose measurement element is contained in the base layers, for each of corresponding measurement lines, on the basis of initial values of coating amounts of individual components whose measurement elements are not contained in the base layers, such that if quantitative calculation cannot be continued and is ended with an error indication notifying that determining quantitative values of the coating amount of that component whose measurement element is contained in the base layers and the thickness for all the corresponding measurement lines of that component gives errors, that component is excluded from analysis targets as an unquantifiable component, and in other cases, to adopt a maximum coating amount as an initial value of the coating amount of that component.