We discuss here the quantification of magnetite and maghemite from x-ray absorption near edge spectroscopy at the Fe K-edge in fluorescence mode. We show that the modification of the spectral shape due to self-absorption effects can lead to erroneous results for certain thicknesses. However, for homogeneous samples containing just magnetite and maghemite without other phases, the quantification of magnetite and maghemite can be obtained from the spectra measured in fluorescence mode without correcting the spectra for the self-absorption effects. We describe the conditions to carry on this analysis that requires measuring the reference compounds exactly under the same conditions as the studied samples and using the appropriate thickness.