A procedure is presented for accurately determining the thickness, optical functions and surface-roughness characteristics of LiNbO3 and Nb2O5 from ellipsometry data. For films with minimal surface roughness, the optical functions can be determined over the entire measured spectrum; for rougher films, the analysis of the spectroscopic ellipsometry data yields meaningfull values of the optical functions only in the transparent region. In general, the, films must be transparent in a given range of wavelengths sampled by the ellipsometer so that at least two interference oscillations can be observed. The use of the procedure is illustrated with the determination of the optical functions of LiNbO3 and Nb2O5 thin films. The thin film results are compared with the measured optical functions of the respective bulk materials.