In this study, five new pyrimidine derivatives were synthesized and characterized by characterization methods such as 1 H-NMR, 13 C-NMR, FT--IR and elemental analysis. The corrosion inhibition activity of the synthesized compounds was examined by theoretical calculation using DFT method at the level of B3LYP/6-31G (d,p). According to the calculations, 4-(6-benzoyl-2--benzylidene-3-oxo-7-phenyl-2,3-dihydro-5H-thiazolo[3,2-a]pyrimidin-5-yl)benzoic acid (6) appears to be a good inhibitor for corrosion.