Kesterite Cu 2ZnSnS 4 (CZTS) and Cu 2ZnSnSe 4 (CZTSe) compounds are candidate low-cost absorber materials for thin-film solar cells, and a light-to-electricity efficiency as high as ∼10% has been achieved in the solar cell based on their alloys, Cu 2ZnSn(S,Se) 4 (CZTSSe). In this paper, we discuss the crystal and electronic structure of CZTSSe alloys with different composition, showing that the mixed-anion alloys keep the kesterite cation ordering, and are highly miscible with a small band gap bowing parameter. The phase stability of CZTS and CZTSe relative to secondary compounds such as ZnS and Cu 2SnS 3 has also been studied, showing that chemical potential control is important for growing high-quality crystals, and the coexistence of these secondary compounds is difficult to be excluded using X-ray diffraction technique. Both CZTS and CZTSe are self-doped to p-type by their intrinsic defects, and the acceptor level of the dominant Cu zn antisite is deeper than Cu vacancy. Relatively speaking, CZTSe has shallower acceptor level and easier n-type doping than CZTS, which gives an explanation to the high efficiency of CZTSSe based solar cells.