Density functional theory (DFT) is a quantum-mechanical method used in chemistry and physics to calculate the electronic structure of atoms, molecules, and solids.