In nature, hydrogen bonding is a common physical occurrence that has a significant impact on the surroundings of anthocyanins. Water molecules will create hydrogen bonds with anthocyanin molecules in various configurations, but the characteristics of these hydrogen bonds will change. Varied hydrogen bonding characteristics have varied impacts on solvent solutions. This research analyzes the differences in hydrogen bonding qualities caused by different methyl structures, as well as the underlying explanations. In this study, the cyanidin and peonidin structures of anthocyanin molecules were calculated in various stable hydrogen bond configurations using the density functional theory B3LYP/6‐31G(d,p), combined with information from the infrared spectroscopy spectrum, atoms in molecules analysis, interaction energy E, and intermolecular hydrogen bond length. The hydrogen bond structure that is the most stable is determined by analyzing it, as well as the effects of replacing the hydroxyl group with a methyl group and any potential underlying causes. Future anthocyanins research can benefit from the precise theoretical reference that this study can offer.