how to calculate the cost of running plant