SARS-CoV-2 surveillance by wastewater-based epidemiology is poised to provide a complementary approach to sequencing individual cases. However, robust quantification of variants and de novo detection of emerging variants remains challenging for existing strategies. We deep sequenced 3,413 wastewater samples representing 94 municipal catchments, covering >59% of the population of Austria, from December 2020 to February 2022. Our system of variant quantification in sewage pipeline designed for robustness (termed VaQuERo) enabled us to deduce the spatiotemporal abundance of predefined variants from complex wastewater samples. These results were validated against epidemiological records of >311,000 individual cases. Furthermore, we describe elevated viral genetic diversity during the Delta variant period, provide a framework to predict emerging variants and measure the reproductive advantage of variants of concern by calculating variant-specific reproduction numbers from wastewater. Together, this study demonstrates the power of national-scale WBE to support public health and promises particular value for countries without extensive individual monitoring.