In order to solve that the energy was seriously wasted in cloud computing, an algorithm of Energy Consumption optimization for Cloud computing based on the task Tolerance (ECCT) was proposed. The concept of the task tolerance was put forward in the algorithm. The resource utilization of cloud computing node was maximized through increasing the task tolerance. At the same time, the parallelism degree of tasks were increased so that the task waiting time was reduced, which led to a reduction of energy consumption in cloud computing. Parameters were estimated and experiments on actual cloud computing sets were illustrated.