In recent years, many studies have proposed the use of energy storage systems (ESSs) for the mitigation of renewable energy source (RES) intermittent power output. However, the correct estimation of the ESS degradation costs is still an open issue, due to the difficult estimation of their aging in the presence of intermittent power inputs. This is particularly true for battery ESSs (BESSs), which have been proven to exhibit complex aging functions. Unfortunately, this collides with considering aging costs when performing ESS planning and management procedures, which are crucial for the exploitation of this technology. In order to overcome this issue, this paper presents the genetic algorithm-based multi-period optimal power flow (GA-MPOPF) procedure, which aims to economically optimize the management of ESSs by taking into account their degradation costs.The proposed methodology has been tested in two different applications: the planning of the correct positioning of a Li-ion BESS in the PG& E 69 bus network in the presence of high RES penetration, and the definition of its management strategy. Simulation results show that GA-MPOPF is able to optimize the ESS usage for time scales of up to one month, even for complex operative costs functions, showing at the same time excellent convergence properties.