Lithium niobate is a material with many important technological applications, and some of these applications are enhanced by doping the material with trivalent transition metal ions. This paper presents a computational analysis of the doping of lithium niobate by Sc, Cr, Fe and In. It is found that the preferred doping mechanism for Sc, Cr and Fe is a self-compensation mechanism (simultaneous substitution of the dopant at the Li and Nb sites), except for In, which shows a slight preference for substitution at the Nb 5+ site with Nb–Li antisite compensation at 0 K. Cr and Fe doping have been studied experimentally, and the experimental findings support the predictions of the calculations regarding optimal doping sites in the material.