Pyrite is a common mineral in sedimentary rocks and is the major host for many chalcophile trace elements utilized as important tracers of the evolution of the ancient hydrosphere. Measurement of trace element composition of pyrite in sedimentary rocks is challenging due to fine-grain size and intergrowth with silicate matrix and other sulfide minerals. In this contribution, we describe a method for calculation of trace element composition of sedimentary pyrite from time-resolved LA-ICP-MS data. The method involves an analysis of both pyrite and pyrite-free sediment matrix, segmentation of LA-ICP-MS spectra, normalization to total, regression analysis of dependencies between the elements, and calculation of normalized composition of the mineral. Sulfur is chosen as an explanatory variable, relative to which all regressions are calculated. The S content value used for calculation of element concentrations from the regressions is calculated from the total, eliminating the need for independent constraints. The algorithm allows efficient measurement of concentrations of multiple chalcophile trace elements in pyrite in a wide range of samples, including quantification of detection limits and uncertainties while excluding operator bias. The data suggest that the main sources of uncertainties in pyrite composition are sample heterogeneity and counting statistics for elements of low abundance. The analysis of regression data of time-resolved LA-ICP-MS measurements could provide new insights into the geochemistry of the sedimentary rocks and minerals. It allows quantification of ratios of elements that do not have reference material available (such as Hg) and provides estimates on the content of non-sulfidic Fe in the silicate matrix. Regression analysis of the mixed LA-ICP-MS signal could be a powerful technique for deconvolution of phase compositions in complex multicomponent samples.