This chapter advances UN SDG goals 7 and 13 by discussing the impacts of electric vehicles on energy management in homes and residential microgrids and identifying ways to minimize the daily energy cost by optimal scheduling of resources, electric vehicles, and loads.