We propose a direct approach for calculating the individual energy of step edges on polar semiconductor surfaces using ab initio calculations. The approach is applied to the single-bilayer step edges on AlN(0001) and GaN(0001) surfaces and clarifies characteristic features of the stability of step edges depending on the atomic configurations. It is found that the stable steps have either threefold-coordinated atoms or hydrogen-terminated edge atoms on the upper terrace. The calculated results suggest that the phenomena related to the stability of step edges on various polar group-III nitride surfaces would benefit from the evaluations of step formation energies.