Abstract The electronic structures and magnetic properties of quaternary Heusler alloys CoFeTiZ (Z=Si, Ge, Sn) have been studied using first-principles calculations. It has been found that CoFeTiSi and CoFeTiGe are half-metallic ferrimagnets, while CoFeTiSn is a quasi half-metallic ferrimagnet. The total moment in unit cell for CoFeTiZ (Z=Si, Ge, Sn) alloys follows the Slater–Pauling behavior with the total number of valence electrons minus 24. The origin of the magnetism, band gap, and the effect of atom Z on the band gap and the half-metallicity of the alloys have been discussed in detail. The half-metallic property for CoFeTiSi and CoFeTiGe can be retained when their lattice constants are changed in a large range. CoFeTiSn alloy can transform from a quasi half-metallic to a half-metallic alloy by employing a proper compression stress.