In this work, we present a study of the structural, elastic and electronic properties of the cubic antiperovskites XNMg3 (X = P, As, Sb and Bi) using the full-potential augmented plane wave plus local orbital (FP-LAPW + lo) within the generalized gradient approximation based on PBEsol, Perdew 2008 functional. We determined the lattice parameters, the bulk modulus B and their pressure derivative B'. In addition, the elastic properties such as elastic constants (C-11, C-12 and C-44), the shear modulus G, the Young modulus E, the Poisson's ratio v and the B/G ratio are also given. For the band structure, density of states and charge density the exchange and correlation effects were treated by the Tran-Blaha modified Becke-Johnson potential to prevent the shortcoming of the underestimation of the energy gaps in both LDA and GGA approximations. The obtained results are compared to available experimental data and to other theoretical calculations. (C) 2013 Elsevier B.V. All rights reserved.