Optical indices have been determined for thin films of all materials needed to model a typical electrochromic device. Two electrochromic materials, tungsten oxide and lithium nickel oxide, are widely used in electrochromic devices. The optical indices of the underlying transparent conductors as well as a polymer electrolyte were also analyzed. The optical data was obtained using a combination of variable-angle spectroscopic ellipsometry and spectroradiometry. The data was then fit to appropriate models of structure and dispersion in order to extract the optical indices of the materials. First, the optical indices of the transparent conductive substrates were obtained and fixed in the model. The best models correspond well to independent physical measurements of film structure, such as atomic-force microscopy and surface profiling. Surface roughness, gradient composition and other types of inhomogeneity are common in both the transparent conductors and electrochromic, resulting in particularly complex models. The polymer has a homogeneous structure, but obtaining optically smooth surfaces was a problem. Complete sets of data were produced over the entire solar spectrum for a range of colored states of the films. Using the data for each layer, a realistic electrochromic device was simulated.