The interplay between interaction and inhomogeneity for electrons in solids generates many interesting phenomena, including insulating and metallic behaviour, magnetism, superconductivity, quantum criticality and more exotic phases 1 . Many of the same phenomena appear in ultracold fermionic atoms in optical lattices 2 , which provide clean, controlled and tunable 'quantum simulators' to explore the intriguing physics of fermionic systems. Although density functional theory 3-5 (DFT) is widely used to calculate material properties 6 , it has not yet been applied to cold atomic gases in optical lattices. Here we present a new density functional for short-range interactions (as opposed to Coulomb interactions of electrons), which renders DFT suitable for atomic Fermi gases. This grants us access to an extensive toolset, previously developed for materials simulations, to calculate the static and dynamic properties of atomic Fermi gases in optical lattices and external potentials. Ultracold atom quantum simulators can in turn be used to explore limitations of DFT functionals, and to further improve hybrid functionals, thus forming a bridge between materials simulations and atomic physics.Ultracold atomic gases have several advantages over materials for systematically exploring fermionic quantum systems. In materials, strong interactions go hand in hand with increasing localization of electrons as one moves from weakly correlated materials with s and p electrons to transition metal compounds with d electrons, and lanthanides and actinides with even more localized f orbitals. In contrast, all relevant parameters can be almost arbitrarily changed for fermionic gases in optical lattices: increasing the intensity of the optical lattice tunes continuously from shallow lattices with extended wave functions to deep lattices with almost localized Wannier functions, and the band structure can be further modified by changing the laser wave form. The strength of the inter-atomic interactions can independently be varied by tuning an external magnetic field across Feshbach resonances 7 . This facilitates a controlled realization of intriguing quantum phenomena in fermionic systems, and the systematic exploration of interaction and localization effects. The simplicity of atomic gases, the absence of core electrons and the ability to realize strongly interacting systems already in the lowest band makes optical lattice systems also much easier to treat from a theoretical point of view, avoiding the need for expensive all-electron calculations including the core electrons or the use of less reliable pseudopotentials incorporating their effects.So far, the experimental and theoretical focus has been on deep optical lattices, which are described well by single-band Hubbard models and where exciting progress has been achieved. In experiments, a Mott insulating phase has been realized 8,9 , and the detection of a Néel state seems feasible in the not too distant future. Progress in simulation methods 10,11 13 .Even more intriguing physics...