A general method for determining the global maximum of the linear electro-optic effect in crystalline materials based on the construction and analysis of extreme surfaces obtained as a result of the optimization procedure is proposed. The electrically induced optical path length changes for ordinary and extraordinary waves as well as the optical path difference for orthogonally polarized waves were used as the objective functions in the optimization. The objective functions were determined for units of the electric field and crystal thickness in the light pass direction. In the example of LiNbO:MgO, it is shown that the maximal achievable given values of the optical path length change (global maxima) for ordinary and extraordinary waves are 119 pm/V and 277 pm/V, respectively. The global maximum of the optical path difference for orthogonally polarized waves is 269 pm/V (for 632.8 nm wavelength and at room temperature). These global maxima are exceeded by ∼1.5, 1.7, and 2.3 times the respective maximum values on direct cut crystals of LiNbO:MgO and are ∼5%, 9%, or 11% larger than the global maxima for undoped LiNbO crystal. This ensures a possibility to increase the energy efficiency by ∼2.9 or 5.3 times in the case of using of LiNbO:MgO crystals with optimal cuts as sensitive elements of electro-optic devices.