Calculation of Energy Consumption