https://www.sciencedirect.com/science/article/abs/pii/S0378779620301139?via%3DihubWith the growing concerns on the energy depletion and the reduction of CO2 emission, electric vehicles (EVs) have gained popularity in transport sector due to clean and reliable energy source. However, the charging of EVs has imposed significant load in the electrical distribution system. The stability of power network is disturbed with uncoordinated charging. This work aims to investigate the optimal EV coordination with vehicle to grid (V2G) technology for the cost-benefit analysis. However, the cost of EV battery replacement due to degradation is of paramount concern for the EV users, which constitute the most important ingredient to ensure active participation in V2G energy exchanges. Therefore, battery degradation cost is formulated for real time analysis taking depth of discharge at each time interval. The firefly algorithm has been used to optimize the system cost. The performance of the proposed system is tested on modified 33 bus distribution system in the presence of renewable energy sources (RES). The impact of system cost and energy losses are analysed for different RES penetration, EV capacities and travelling distances. The simulation results show significant reduction in operating cost when RESs are integrated into distribution network. Moreover, V2G technology is beneficial for EV consumers with high penetration of RES.