The role of self-trapping and defect trapping of hydrogen and helium implanted into tungsten has been investigated using density functional theory (DFT) calculations, molecular dynamics simulations, and kinetic Monte Carlo simulations (KMCSs). The potential energy curves of hydrogen or helium pairs were obtained by molecular dynamics, and the energy of the most essential states was checked with DFT. Under assumptions of bubble formation due to trapping by similiar impurity atoms (self-trapping) or defects, KMCSs were carried out using parameters from implantation experiments. The results indicate that self-trapping plays no (or a very small) role in hydrogen bubble formation, whereas helium bubbles form due to strong self-trapping.