Materials design increasingly relies on first-principles calculations for screening important candidates and for understanding quantum mechanisms. Density functional theory (DFT) is by far the most popular first-principles approach due to its efficiency and accuracy. However, to accurately predict structures and thermodynamics, DFT must be paired with a van der Waals (vdW) dispersion correction. Therefore, such corrections have been the subject of intense scrutiny in recent years. Despite significant successes in organic molecules, no existing model can adequately cover the full range of common materials, from metals to ionic solids, hampering the applications of DFT for modern problems such as battery design. Here, we introduce a universally optimized vdW-corrected DFT method that demonstrates an unbiased reliability for predicting molecular, layered, ionic, metallic, and hybrid materials without incurring a large computational overhead. We use our method to accurately predict the intercalation potentials of layered electrode materials of a Li-ion battery system, a problem for which the existing state-of-the-art methods fail. Thus, we envisage broad use of our method in the design of chemo-physical processes of new materials.