The theoretical pKa values of the derivatives of anilinium and pyridinium ions in 7 solvents are presented. For this purpose, the usage of isodesmic reaction scheme using the DFT/B3LYP approach with IEFPCM solvation was evaluated. We have shown that the suitable selection of reference species has the primary influence on the resulting data. For the studied anilinium ion derivatives the nonsubstituted anilinium ion seems to be a satisfactory reference system. The calculated values are in good accordance with the available experimental data with the RMS error of 1.00 and 0.99 pKa units in water and THF, respectively. The highest error in predicted pKa value is less than 2.0 pKa units in all cases. The chemical accuracy of the applied treatment is limited in the case of nitroaniline ions and the maximal therotetical uncertainty for derivatives of the pyridinium ion is within 2.1 pKa units. Our theoretical results enable us to predict the values of pKa for the solvents, where the experimental data are not completely available. Also the influence of the chemical structure on the accuracy of the applied method was discussed.