PV being an intermittent source cannot match the instantaneous load profile on its own. Battery energy storage are becoming economically viable and hence are being used for power and energy balance in integrated PV-battery systems. Thus, there is a need to identify and evaluate factors affecting cost-optimal PV-battery sizing for a given load profile and to further design a method to calculate the PV-battery sizes. The most important aspect is to match the generation and load profile. In addition, it is also important to consider the reliability aspect of the grid while performing sizing calculations. In this paper, a cost-optimal PV-battery sizing for a grid-connected system has been investigated considering a user-defined loss of load probability. Sub-hourly PV generation profile, battery charge/discharge rate, and sub-hourly user-defined load curves for both residential and commercial customers have been considered for calculating a cost-optimal solution. Furthermore, the effect of different load curves and PV-Feed in Tariff have been studied under varying duration and time of grid outages.