Using the first-principles pseudopotential plane-wave methods based on the density functional theory, the elastic constants of B-2-NiAl supercells, with or without Ni vacancy or Ni anti-site defect, compound with P microalloying (x=0 similar to 0.2, at%) were calculated in the framework of Virtual Crystal Approximation (ACA). Several parameters such as elastic constant C-44, Cauchy pressure (C-12-C-44), Young modulus E, the shear modulus G and their ratio G/B-0 have been adopted to characterize and assess the effect of P microalloying concentration on the ductility and hardness of NiAl intermetallic compounds. P addition with 0<x <0.2at% is proved to be inefficient to increase steadily the strength or hardness of NiAl intermetallic compounds either for perfect crystals or for defect crystals. With the steady increase of the P microalloying concentration, the variety of Cauchy pressure (C-12-C-44) and ratio G/B-0 for B-2-NiAl perfect crystals playback the experiment result of improvement of the compress ductility for B-2-NiAl crystals compound with 0.07 at% P, and the variety of Cauchy pressure (C-12-C-44) and ratio G/B-0 for B-2-NiAl defect crystals explain that improvement of the compress ductility for B-2-NiAl crystals compound with 0.03 at% P in experiment may probably be the interaction between Ni anti-site defect and P atom on the Al sublattice.