The development of modern materials science has led to a growing need to understand the phenomena determining the properties of materials and processes on an atomistic level. The interactions between atoms and electrons are governed by the laws of quantum mechanics; hence, accurate and efficient techniques for solving the basic quantum-mechanical equations for complex many-atom, many-electron systems must be developed. Density functional theory (DFT) marks a decisive breakthrough in these efforts, and in the past decade DFT has had a rapidly growing impact not only on fundamental but also industrial research. This article discusses the fundamental principles of DFT and the highly efficient computational tools that have been developed for its application to complex problems in materials science. Also highlighted are state-of-the-art applications in many areas of materials research, such as structural materials, catalysis and surface science, nanomaterials, and biomaterials and geophysics.