Using spin-unrestricted density functional theory (the VWN Becke-Perdew potential), including broken-symmetry and spin-projection methods, we have obtained the potential-energy curves as a function of the central torsional angle of stilbene in the ground (S0), the first excited triplet (T1), the first excited singlet (S1), and the doubly excited singlet (S2) states. The thermal trans-->cis isomerization of stilbene passes through a diradical broken-symmetry electronic structure around the twisted conformation (90 degrees central torsional angle) in the ground state. Our calculations support the proposed triplet mechanism for sensitized cis [symbol: see text] trans photoisomerization and the nonadiabatic singlet mechanism proposed by Orlandi and Siebrand. On the T1 potential-energy curve, the rotation of the C=C bond for both trans- and cis-stilbene will lead stilbene to the twisted conformation, from which the twisted stilbene will decay to the ground-state surface that is nearly isoenergetic with the T1 surface and has diradical electronic structure in the twisted region. On the S1 potential-energy curve, the energy increases in the direction from trans- to the twisted stilbene, and crosses with the neutral doubly excited S2 potential-energy curve, which has a minimum at the twisted structure and is lower in energy than the zwitterionic doubly excited state. The twisted stilbene around the energy minimum of the neutral doubly excited S2-state will decay onto the ground-state surface from where the rotation of the C=C bond leads the twisted stilbene to either the trans or cis configuration and the isomerization of stilbene is then completed. Similar studies have also been performed on a stilbene derivative with a substituent group, NHCOCH3.