When investigating gilded artifacts or works of art, the determination of the gilding thickness plays a significant role in establishing restoration protocols or conservation strategies. Unfortunately, this is done by cross-sectioning the object, a destructive approach not always feasible. A non-destructive alternative, based on the differential attenuation of fluorescence radiation from the sample, has been developed in the past years, but due to the intrinsic random nature of X-rays, the study of single or few spots of an objects surface may yield biased information. Furthermore, considering the effects of both porosity and sample inhomogeneities is a practice commonly overlooked, which may introduce systematic errors. In order to overcome these matters, here we propose the extrapolation of the differential-attenuation method from single-spot X-ray fluorescence (XRF) measurements to macro-XRF (MA-XRF) scanning. In this work, an innovative algorithm was developed for evaluating the large amount of data coming from MA-XRF datasets and evaluate the thickness of a given overlapping layer over an area. This approach was adopted to study a gilded copper-based buckle from the sixteenth to seventeenth century found in Rome. The gilded object under investigation was also studied by other analytical techniques including scanning electron microscopy coupled with energy dispersive spectroscopy (SEM-EDS). Previous results obtained from SEM-EDS were used to confront the data obtained with the proposed methodology and validate it. MA-XRF elemental distribution maps were fundamental in identifying and choosing sampling areas to calculate the thickness of the gilding layer, avoiding lead islands present in the sample that could negatively influence the results. Albeit the large relative standard deviation, the mean thickness values fell within those found in literature and those obtained from previous studies with SEM-EDS. Surface fissure has been found to deeply affect the results obtained, an aspect that is often disregarded.