Carbon dioxide emissions from electricity generation are a major cause of anthropogenic climate change. The deployment of wind and solar power reduces these emissions, but is subject to the variability of the weather. In the present study, we calculate the cost-optimized configuration of variable electrical power generators using weather data with high spatial (13-km) and temporal (60-min) resolution over the contiguous US. Our results show that when using future anticipated costs for wind and solar, carbon dioxide emissions from the US electricity sector can be reduced by up to 80% relative to 1990 levels, without an increase in the levelized cost of electricity. The reductions are possible with current technologies and without electrical storage. Wind and solar power increase their share of electricity production as the system grows to encompass large-scale weather patterns. This reduction in carbon emissions is achieved by moving away from a regionally divided electricity sector to a national system enabled by high-voltage direct-current transmission.