Using time-dependent density functional theory, we study the optical excitations in finite length carbon nanotubes. Evidence of spin-charge separation is given in the spacetime domain. We demonstrate that the charge density wave is due to collective excitations of electron singlets, while the accompanying spin density wave is due to those of electron triplets. The Tomonaga–Luttinger liquid parameter and density–density interaction are extrapolated from the first-principles excitation energies. We show that the density–density interaction increases with the length of the nanotube. The singlet and triplet excitation energies, on the other hand, decrease for increasing length of the nanotube. Their ratio is used to establish a first-principles approach for deriving the Tomonaga–Luttinger parameter (in excellent agreement with experimental data). Time evolution analysis of the charge and spin line densities evidences that the charge and spin density waves are elementary excitations of metallic carbon nanotubes. Their dynamics show no dependence on each other.