Energy storage will be required over a wide range of discharge durations in future zero-emission grids, from milliseconds to months. No single technology is well suited for the complete range. Using 9 years of UK data, this paper explores how to combine different energy storage technologies to minimize the total cost of electricity (TCoE) in a 100% renewable-based grid. Hydrogen, compressed air energy storage (CAES) and Li-ion batteries are considered short-, medium-, and long-duration energy stores, respectively. This paper analyzes different system configurations to find the one leading to the lowest overall cost. Results suggest that the UK will need a storage capacity of ~66.6 TWh to decarbonize its grid. This figure considers a mix of 85% wind + 15% solar-photovoltaics, and 15% over-generation. The optimum distribution of the storage capacity is: 55.3 TWh in hydrogen, 11.1 TWh in CAES and 168 GWh in Li-ion batteries. More than 60% of all energy emerging from storage comes from medium-duration stores. Based on current costs, the storage capacity required represents an investment of ~£172.6 billion, or approximately 8% of the country’s GDP. With this optimum system configuration, a TCoE of ~75.6 £/MWh is attained.