The effects of Er defects on the structure and energetics of LiNbO 3 are determined using electronic-structure calculations at the level of density-functional theory combined with thermodynamic calculations. It is found that under both Li 2 O-rich and Nb 2 O 5 -rich conditions, Er 3+ sits on the Li site and is displaced along the uniaxial direction of the hexagonal structure toward the vacant cation site. The charge compensation mechanism is predicted to be lithium vacancies under Nb 2 O 5 -rich conditions, consistent with a previous conjecture; charge compensation is predicted to be by Er 3+ on a Nb site under Li 2 O-rich conditions. It is also found that low concentration of lithium vacancies could significantly affect the defect chemistry: when a Li-poor congruent sample is converted to the stoichiometric, there may be a negligible concentration of Er on Nb sites. The diffusivity and average diffusion distance under annealing of defects are also discussed.