To calculate the kQmsr,Q0fmsr,fref factors for nine common ionization chamber types following the small fields dosimetry formalism for the calibration of the Leksell Gamma Knife® (LGK) PerfexionTM using Monte Carlo simulation. This study also provides the first independent comparison of EGSnrc and PENELOPE for the calculation of kQmsr,Q0fmsr,fref correction factors and proposes a practical method to predict these factors based on chamber type, chamber orientation and phantom electron density. The ionization chambers are modeled using the EGSnrc and PENELOPE Monte Carlo codes based on the blueprints provided by the manufacturers. The chambers are placed in a half-sphere water phantom and five spherical phantoms made of liquid water, solid water, ABS, polystyrene, and PMMA, respectively. Dose averaged over the air cavity of the chambers and a small water volume are calculated using EGSnrc and PENELOPE Monte Carlo codes for both conventional and machine specific reference (msr) setups. Using the calculated dose ratio, the kQmsr,Q0fmsr,fref factor is determined for all phantom materials and two possible orientations of chamber. The calculated kQmsr,Q0fmsr,fref factors are compared to a previous Monte Carlo study. A relationship between the kQmsr,Q0fmsr,fref factor and the electron density of the phantom material is derived to predict the kQmsr,Q0fmsr,fref factor for any phantom material type. Applying the calculated kQmsr,Q0fmsr,fref factors to the measured dose rate of a recent round robin study improves consistency of reference dosimetry of the Leksell Gamma Knife® (LGK) PerfexionTM . Agreement within uncertainty is observed between kQmsr,Q0fmsr,fref values determined in this study and the previous PEGASOS/PENELOPE study in a liquid water phantom. The difference between kQmsr,Q0fmsr,fref values in parallel and perpendicular detector orientations is most significant for the PTW 31010 (1.8%) chamber. The percentage root-mean-square (%RMS) deviation between EGSnrc and PENELOPE calculated kQmsr,Q0fmsr,fref values for Exradin-A1SL, A14 and A14SL chambers studies in this work was found to be 0.4%. The kQmsr,Q0fmsr,fref values increase linearly with electron density of the phantom material for all chamber types mainly due to the linear dependency of photon energy fluence ratios on electron density. The average percentage difference between the calculated and predicted kQmsr,Q0fmsr,fref values using two methods is found to be 0.15% and 0.16%. Previously measured dose rates corrected with the kQmsr,Q0fmsr,fref values determined in this work leads to absorbed dose values consistent to within 0.8%. The calculated kQmsr,Q0fmsr,fref values in this work will enable users to apply the appropriate correction for their own specific phantom material only knowing the electron density of the phantom material.