How to calculate the cost of equity capital