We study the electronic structure and a mean-field phase analysis based on the pair-pair energies derived from first-principles electronic structure calculations of AuFe and NiMo alloys. We have used the tight-binding linear muffin-tin orbitals-based augmented space recursion (TB-LMTO-ASR) method to do so. We investigate different behaviours of the two alloy systems by mapping the problems onto equivalent Ising models and then discuss the magnetic phase diagrams using the calculated pair energies. All three phases: paramagnetic, random ferromagnetic and spin glass, have been studied. © Indian Academy of Sciences.