The different fragmentation channels of cytosine, adenine and guanine have been studied through DFT calculations. The electronic structure of bases, their cations, and the fragments obtained by breaking bonds provides a good understanding of the fragmentation process that can complete the experimental approach. The calculations allow assigning various fragments to the given peaks. The comparison between the energy required for the formation of fragments and the peak intensity in the mass spectrum is used. For cytosine and guanine the elimination of the HNCO molecule is a major route of dissociation, while for adenine multiple loss of HCN or HNC can be followed up to small fragments. For cytosine, this corresponds to the initial bond cleavage of N3-C4/N1-C2, which represents the main dissociation route. For guanine the release of HNCO is obtained through the N1-C2/C5-C6 bond cleavage (reverse order also possible) leading to the largest peak of the spectrum. The corresponding energies of 3.5 and 3.9 eV are typically in the range available in the experiments. The loss of NH3 or HCN is also possible but requires more energy. For adenine, fragmentation consists of multiple loss of the HCN molecule and the main route corresponding to HC8N9 loss is followed by the release of HC2N1.