The structural, electronic and elastic properties of TiC x N 1− x , Zr x Nb 1− x C and HfC x N 1− x alloys have been investigated by using the plane-wave pseudopotential method within the density-functional theory. The calculations indicate that the variations of the equilibrium lattice constants and bulk modulus with the composition are found to be linear. The calculated elastic constants C 44 and shear constants as a function of alloy concentration reveal the anisotropic hardness of these compounds. The partial and total density of states (DOS) for the binary and ternary compounds had been obtained, and the metallic behavior of these alloys had been confirmed by the analysis of DOS.