Inversion domain boundaries (IDBs) are the major planar defect in piezoelectric wurtzite structures such as AlN, AlScN, and GaN. The IDBs are often found in deposited thin films and are known to be closely related to the performance of the films. However, the detailed atomic and electronic structures of IDBs have not been modeled. In the present study, the atomic structures, thermodynamic stabilities, and electronic and mechanical properties of IDBs in AlN, AlScN, and GaN were modeled using firstprinciples calculations. The result shows that IDB formation is favorable when the piezo strain tensor (d 33 ) is high. AlScN is particularly favorable for IDB formation due to its higher piezo strain tensor and lower bulk modulus compared to AlN and GaN. Furthermore, the structural distortion in IDBs is closely related to an electronic structure change reducing the band gap, thereby increasing leakage current in a piezoelectric device.