The quantitative analysis of electron-optical phase images recorded using off-axis electron holography often relies on the use of computer simulations of electron propagation through a sample. However, simulations that make use of the independent atom approximation are known to overestimate experimental phase shifts by approximately 10%, as they neglect bonding effects. Here, we compare experimental and simulated phase images for few-layer WSe2. We show that a combination of pseudopotentials and all-electron density functional theory calculations can be used to obtain accurate mean electron phases, as well as improved atomic-resolution spatial distribution of the electron phase. The comparison demonstrates a perfect contrast match between experimental and simulated atomic-resolution phase images for a sample of precisely know thickness. The low computational cost of this approach makes it suitable for the analysis of large electronic systems, including defects, substitutional atoms and material interfaces.The complex wavefunction of electrons that have passed through a sample in the transmission electron microscope (TEM) can be reconstructed using the technique of off-axis electron holography. For a non-magnetic sample, the phase of the electron wavefunction is related to the three-dimensional electrostatic potential in the specimen and, in the absence of dynamical scattering, is proportional to the integral of the electrostatic potential in the electron beam direction [1]. As a result of the high spatial resolution of TEM, off-axis electron holography is therefore a powerful technique for the characterisation of local variations in electrostatic potential in functional materials at the nanoscale [2].In general, the conversion of a recorded phase image into a potential is non-trivial and often has to be supported by atomistic computer simulations [3]. An approach that is used frequently makes use of the independent atom approximation (IAA) and involves representing the crystal potential as a superposition of electrostatic potentials of individual isolated atoms [4]. As the effects of bonding are neglected, the results of simulations based on this approximation overestimate the mean phase of the electron wavefunction when compared to experimental measurements [5]. The accuracy of calculated mean electron phases has been shown to improve when using density functional theory (DFT) for the calculation of electrostatic potentials to take bonding effects into account [6,7]. However, to the best of our knowledge, no comparison between the DFTcalculated atomic-resolution spatial distribution of the electron phase and high-resolution electron holography experiments has been performed. The importance of developing a technique suitable for such comparisons is growing, as the operation of electronic and optoelectronic devices relies more frequently on or is affected by individual atoms and local structure variations. For example, the electrical properties of modern transistors are often determined by single dopant atoms in ...