The cathodic and anodic stabilities of room-temperature ionic liquids (ILs) are important factors in their applications in electrochemical devices. In this work, we investigated the electron affinities of cations and ionization energies of anions for ionic liquids by density functional theory (DFT) calculations at the B3LYP/6-311+G(2d,p)//B3LYP/6-31+G(d) level. Over 200 unique cations and anions, formed from a set of six base cation structures, three base anion structures, and seven functional groups, were investigated. We find the trends in calculated EAs of alkylated cations and IEs of alkylated anions to be in good agreement with observed experimental trends in relative cathodic and anodic stabilities of various ILs. In addition, we also investigated the effect that functional group substitution at distinct positions in the ions have on the EA of the 1,2,3-trimethylimidazolium cation and the IE of the PF5CF3 anion. The overall impact on the EA or IE can be explained by the known electron-donating and electron-withdrawing inductive and resonance effects of the attached functional group, and the relative strength of the effect depends on the substitution position.