Abstract Corrosion inhibitive performance of 2-aminopyrimidine (APr), 2,4-diaminopyrimidine (dAPr), 2,4-diamino-6-hydroxy-pyrimidine (dAHPr) and 2,4,6-triaminopyrimidine (tAPr) during the acidic corrosion of steel surface was investigated using three methods, MP2, ab initio Hartree–Fock and density functional theory (DFT). Quantum chemical parameters such as the highest occupied molecular orbital energy ( E HOMO ), the lowest unoccupied molecular orbital energy ( E LUMO ), energy gap (Δ E ), dipole moment ( μ ), sum of the total negative charge (TNC), molecular volume (MV), electronegativity ( χ ), chemical potential (Pi), global hardness ( η ), softness ( σ ) and the fraction of electrons transferred (Δ N ), were calculated. Furthermore, the interaction energies of the inhibitors with the iron surface were studied. A good correlation was found between the theoretical data and the experimental results.