Ab initio band-structure calculations were performed for bulk, single slab, and thin films of TiX 2 ͑XϭS, Se͒ using the localized spherical wave method. According to these calculations, bulk TiS 2 and TiSe 2 are semimetallic. The calculations show that TiS 2 thin films are semiconductors, but thin films of TiSe 2 are semimetallic. The indirect gap for single slab TiS 2 is about 1.0 eV, and the gap becomes smaller with increasing number of layers. When the number of layers increases to 11, the TiS 2 thin films are semimetallic. All but the surface layers are found to be electrically neutral. The density of states as a function of the energy for the surface layer is different from that of the bulk. The Madelung energy of the Ti atoms on the surface is about 0.35 eV lower than that for the Ti atoms in the bulk. The calculations are compared with photoemission spectra, reported in the literature. ͓S0163-1829͑97͒05532-X͔