A method for measuring a test object by means of X-ray fluorescence, in particular for measuring the thickness of thin layers or for determining an element concentration of a test object , - in which a primary beam is directed from an X-ray source onto the test object , - in which a secondary radiation emitted from the test object is detected by a detector and forwarded to an evaluation device , - in which the primary beam is displaced within a grid surface , said grid surface being divided into grid partial surfaces (1 ... n) and being subdivided into at least one line (Z1 ... Zn) and at least one column (S1 ... Sn) and a primary beam being directed onto each grid partial surface (1 ... n), a measuring spot of the primary beam filling at least the grid partial surface (1 ... n), characterised in that - a lateral expansion of the measurement surface of the test object is detected, - the lateral expansion of the measurement surface of the test object is compared to the size of the measuring spot of the primary beam impinging on the test object , - upon determining a size of the measurement surface of the test object which is smaller than the measuring spot , a size of the grid surface is selected such as to cover at least the measurement surface of the test object , - a scaling factor α is determined from a ratio of the size of the grid surface with respect to the size of the measurement surface of the test object , - the detected spectrum of the secondary radiation is added up from the respective grid partial surfaces (1 ... n) so as to form the grid surface , then averaged, and subsequently multiplied by the scaling factor α and - the spectrum of the secondary radiation from the grid partial surfaces (1 ... n) that is corrected with the scaling factor α is provided as a basis for quantitative evaluation. - in which a primary beam is directed from an X-ray source onto the test object , - in which a secondary radiation emitted from the test object is detected by a detector and forwarded to an evaluation device , - in which the primary beam is displaced within a grid surface , said grid surface being divided into grid partial surfaces (1 ... n) and being subdivided into at least one line (Z1 ... Zn) and at least one column (S1 ... Sn) and a primary beam being directed onto each grid partial surface (1 ... n), a measuring spot of the primary beam filling at least the grid partial surface (1 ... n), - a lateral expansion of the measurement surface of the test object is detected, - the lateral expansion of the measurement surface of the test object is compared to the size of the measuring spot of the primary beam impinging on the test object , - upon determining a size of the measurement surface of the test object which is smaller than the measuring spot , a size of the grid surface is selected such as to cover at least the measurement surface of the test object , - a scaling factor α is determined from a ratio of the size of the grid surface with respect to the size of the measurement surface of the test object , - the detected spectrum of the secondary radiation is added up from the respective grid partial surfaces (1 ... n) so as to form the grid surface , then averaged, and subsequently multiplied by the scaling factor α and - the spectrum of the secondary radiation from the grid partial surfaces (1 ... n) that is corrected with the scaling factor α is provided as a basis for quantitative evaluation. <EOS>