The electronic and optical properties of polythiophene (PT) for polymer light-emitting diodes (PLEDs) were calculated using density functional theory (DFT) and time-dependent DFT. We calculated the electronic and optical properties of thiophene and PT polymers with degrees of polymerization (DP) from 2 to 30 monomers (T1–T30) and their derivatives. The associated highest occupied molecular orbital (HOMO) energy, lowest unoccupied molecular orbital (LUMO) energy, band gaps, electron orbitals, and molecular structures were determined. As the DP increased, the LUMO energy gradually decreased, and the HOMO energy gradually increased. The band gap of PT approached 2 eV as the DP of the PT polymer increased from 1 to 30. The calculations and exchange–correlation functional were verified against values in the literature and experimental data from cyclic voltammetry (redox potential) and ultraviolet-visible, photoluminescence, and ultraviolet photoelectron spectra. The color of PT PLEDs can be adjusted by controlling the DP of the polymer and the substituents.