According to the U.S. Department of Energy, the optimal temperature when setting a thermostat is 68 degrees Fahrenheit.