Rule for calculating the cost of electricity

Yes. Example