Calculation of Electrical Energy