The stability, geometry and electronic structure of the title nanoclusters were compared by using density functional theory (DFT) calculations. Their electrical property analysis showed that the relative magnitude of the HOMO-LUMO gaps (eV) that are average values from the calculated results with five different DFT functionals is as follows: B12N12(7:02)>>Al12N12(4.09)>B12P12(3.80)>Al12P12(3.39). Computing the standard enthalpy and the Gibbs free energy of formation, it was found that the B(12)N(12) structure is thermodynamically stable at 298 K and 1 atmosphere of pressure, while the Al(12)N(12) structure may be stable at low temperatures. Due to positive values of change of enthalpy and entropy of formation for both the B(12)P(12) and Al(12)P(12) clusters, it seems that their formation from the consisting atoms is not spontaneous at any temperature.