Abstract The stability of group-III nitrides on a N-polar AlN substrate with Al overlayers is theoretically investigated using an ab initio approach that yields the energy for individual polar interfaces. We find that the trends in the interface energy depend on the number of Al overlayers m . The interface energies of Al- (Ga-) polar AlN (GaN) with m = 2 and 4 are lower than those of N-polar AlN (GaN). The calculated results suggest that the formation of stable bonds between the topmost layer of Al overlayers and the bottom layer of group-III nitrides is crucial for the polarity inversion on a N-polar AlN substrate.