Even renewable energy sources provide several advantages, especially from an environmental point of view, where the world has faced great challenges in the last few decades; several negative issues also exist regarding the integration of renewable resources-based power production units in electric power systems. One of the main problems related to pivotal renewable energy resources such as solar, wind, etc., is their stochastic and uncontrollable nature in terms of power production. Therefore, this stochasticity in the supply side of the power system may pose many challenges for system operators. This issue is also problematic for smaller applications where the stochastic production by a main resource, such as a roof-top photovoltaic system, and load demand may not match perfectly at each time instant and therefore should be compensated by additional resources such as battery-based energy storage systems. Herein, the economic considerations to ensure minimum costs for such a hybrid system design are vital so as to increase the penetration of such systems. Therefore, the optimal sizing and planning of hybrid systems have recently gained increasing importance to enhance power system operation in the context of the smart grid paradigm. From a different perspective, harmonics are one of the most important power quality problems in system operations caused by widespread integration of power electronic loads with non-linear characteristics that should be considered. Thus, a new approach for grid-connected hybrid renewable energy system sizing is provided. In order to determine optimal capacities for photovoltaic (PV) and energy storage system (ESS) units for covering residential consumer demand, a mixed integer linear programming (MILP)-based formulation is presented. The main objective is minimizing total costs of the system consisting of investment, capital and maintenance cost functions. A daily power curve is created accurately with real measurements of non-linear loads considering harmonic contents of smart home appliances in Yildiz Technical University, Istanbul, Turkey. In addition, real radiation and temperature values are used in PV production as well as dynamic pricing schemes for realistic evaluations. Moreover, optimal sizing results are compared for both the harmonic-based power curve and rated power curve in terms of satisfying objective function.