This dataset contains the computational data and analysis for the paper "Reversible Magnesium and Aluminium-Ions Insertion in Cation-Deficient Anatase TiO2" (https://doi.org/10.1038/nmat4976). The repository contains: 1. Input and output files for the DFT calculations, performed using VASP. This is detailed below in the Data section. 2. A `vasp_summary` script, that collects the relevant VASP data into a file `F-TiO2_intercalation_data.yaml`. 3. A Jupyter notebook, `F-TiO2 intercalation energies.ipynb`, containing the data analysis, and code for plotting intercalation energies. 2 and 3 both depend on the vasppy Python module (https://github.com/bjmorgan/vasppy, https://doi.org/10.5281/zenodo.801663), available under the MIT licence.