Wind and solar power are highly variable, so it is it unclear how large a role they can play in future power systems. This work introduces a new open-source electricity planning model-Switch-that identifies the least-cost strategy for using renewable and conventional generators and transmission in a large power system over a multidecade period. Switch includes an unprecedented amount of spatial and temporal detail, making it possible to address a new type of question about the optimal design and operation of power systems with large amounts of renewable power. A case study of California for 2012-2027 finds that there is no maximum possible penetration of wind and solar power-these resources could potentially be used to reduce emissions 90% or more below 1990 levels without reducing reliability or severely raising the cost of electricity. This work also finds that policies that encourage customers to shift electricity demand to times when renewable power is most abundant (e.g., well-timed charging of electric vehicles) could make it possible to achieve radical emission reductions at moderate costs.