Density functional theory (DFT) and time-dependent DFT (TD-DFT) calculations have been employed to investigate the molecular structures and absorption spectra of two dyes containing diphenylaniline and 4-diphenylamino-diphenylaniline as donor moiety (TPA1 and TPA3). The geometries indicate that the strong conjugation is formed in the dyes. The electronic structures suggest that the intramolecular charge transfer from the donor to the acceptor occurs, and the electron-donating capability of 4-diphenylamino-diphenylaniline is stronger than that of diphenylaniline. The computed highest occupied molecular orbital (HOMO) energy levels are -5.31 and -4.90 eV, while the lowest unoccupied molecular orbital (LUMO) energies are -2.29 and -2.26 eV for TPA1 and TPA3, respectively, revealing that the interfacial charge transfer between the dyes and the semiconductor electrode are electron injection processes from the photonexcited dyes to the semiconductor conduction band. Furthermore, all the experimental absorption bands of TPA1 and TPA3 have been assigned according to the TDDFT calculations.