Using first-principles total energy calculations, we have investigated the lattice and elastic constants in GaNxAs1-x alloys as functions of the nitrogen concentration x. Ab initio density functional theory is used to find the relaxed atomic configurations and elastic constants for substitutional nitrogen in supercells containing up to 128 atoms. The effect of N-2 and NAs split interstitial substitutions (ISs) on the mechanical properties has also been calculated in cells up to 64 atoms. Atomic positions and geometries in all supercells have been relaxed, and the elastic constant tensors for simple cubic 8-atom supercells have been computed. Deviation of the lattice constants from Vegard's law due to IS is shown to be substantial. We provide analytical expressions for the concentration dependence of the lattice and elastic constants in GaNxAs1-x alloys, including normal and split-interstitial substitutions, and find the ratio r(b) of the bowing coefficients of the elastic constants C-11 and C-12.