Energy accounts for a large portion of the cost of reverse osmosis units, so the use of energy recovery technologies in reverse osmosis units reduces the cost of operating and utilizing these units more widely. The energy recovery devices (ERDs) such as turbochargers, Pelton wheels, Francis turbines, and pressure exchangers are among the techniques used to reduce energy consumption in these units. In this paper, a 100 m(3)/d reverse osmosis unit with seawater and brackish water feed is considered, and thermodynamic, energy, exergy, exergoeconomic, exergoenvironmental, and carbon footprint analysis is performed on the reverse osmosis unit along with the energy recovery unit. The results show that the specific energy consumption (SEC) has been decreased by using ERDs and will be equal to 3.1 kWh/m(3) in sea water reverse osmosis (SWRO) with Pelton wheels, 2.74 kWh/m(3) in SWRO with turbocharger, and 2.46 kWh/m(3) in SWRO with pressure exchanger. Because of the lower energy consumption in the brackish feedwater unit, the ERD's are not effective same as seawater type. Economic analysis also shows that the amount of saved cost from connecting a pressure exchanger to a seawater reverse osmosis unit would be $0.27/m(3). This value is the highest profitable rate among all the ERD units studied in this paper.