The structural, mechanical and electronic properties of AX5 (A=Zr, Hf; X=Te, Se) compounds based on the density functional theory (DFT) have been examined in different structures. The spin polarized generalized gradient approximation has been used for modeling exchange-correlation effects. The elastic constants have been calculated using the strain-stress method and the other related quantities (the bulk modulus, Shear modulus, Young modulus, Poisson`s ratio, anisotropy factor, sound velocities and debye temperature) have also been estimated. The calculations were performed to investigate the band structure, partial and total density of states and optical properties.