We first present a method to compute the electrooptic tensor from first principles, explicitly taking into account the electronic, ionic and piezoelectric contributions. We then study the non-linear optic behavior of three paradigmatic ferroelectric oxides. Our calculations reveal the dominant contribution of the soft mode to the electrooptic coefficients in LiNbO3 and BaTiO3 and its minor role in PbTiO3. We identify the coupling between the electric field and the polar atomic displacements along the B-O chains as the origin of the large electrooptic response in perovskite ABO3 compounds. Finding better EO materials is a desirable goal. However, the experimental characterization of optical nonlinearities requires high-quality single crystals that are not always directly accessible nor easy to make. Input from accurate theoretical calculations allowing to predict the non-linear optical behavior of crystalline solids would therefore be particularly useful.For many years, theoretical investigations of non-linear optical phenomena were restricted to semi-empirical approaches such as shell models [6] or bond-charge models [7,8]. In the last decade, significant theoretical advances have been reported concerning first-principles density functional theory (DFT) calculations of the behavior of periodic systems in an external electric field [9,10] and opened the way to direct predictions of various optical phenomena. Recently, particular attention has been paid to the calculation of non-linear optical (NLO) susceptibilities and Raman cross sections [11,12].In this Letter, we go one step further and present a method to predict the linear EO coefficients of periodic solids within DFT. Our method is very general, and can be applied to paradigmatic ferroelectric oxides : LiNbO 3 , BaTiO 3 and PbTiO 3 . We find that first-principles calculations are fully predictive, and provide significant new insights into the microscopic origin of the EO effect. In particular, we highlight the predominent role of the soft mode in the EO coupling of LiNbO 3 and BaTiO 3 , in contrast with its minor role in PbTiO 3 .At linear order, the dependence of the optical dielectric tensor ε ij on the static (or low-frequency) electric field E γ is described by the linear EO tensor r ijγ :Throughout this paper, we follow the convention of using Greek and Roman indexes (resp.) to label static and optical fields (resp.). We write all vector and tensor components in the system of cartesian coodinates defined by the principal axes of the crystal under zero field. We also refer to the atomic displacements τ κα [κ labels an atom and α a cartesian direction] within the basis defined by the zone-center transverse optic (TO) phonon eigendisplacements u m (κα):Let us first consider the clamped (zero strain) EO tensor, r η ijγ , in which all electric-field induced macroscopic strains η are forbidden. This is achieved experimentally by working at a frequency sufficiently high to avoid strain relaxations but low compared to the frequency of the TO modes. Within the ...