The effect of energy resolution of two detection systems, HPGe and NaI(T1), was determined by Monte Carlo (MC) calculation on mass attenuation coefficients of magnesium (Mg) and tungsten (W). In order to reveal the energy resolution effect, the detectors' collimator diameters were changed from 2 mm to 20 mm while sending collimated photon beams to the absorber material. It was observed that mass attenuation coefficients were increased with increasing collimator diameters. The performances of HPGe and NaI(T1) detectors were quantified. The calculated results were compared with experimental results for Mg at energy of gamma rays 662 keV for different collimator diameters using both HPGe and NaI(T1). It was observed that the MC calculation results were in a good agreement with the experimental data within the relative error from around 4% to 8%.