This paper deals with the problem of determining the optimal size of a residential grid-connected photovoltaic system to meet a certain CO2 reduction target at a minimum cost. Ren et al. proposed a novel approach using a simple linear programming that minimizes the total energy costs for residential buildings in Japan. However, their approach is based on a specific net tariff system that was used in Japan until October 2009, and it is not applicable to the current Japanese net tariff system. We propose a modified approach for the current Japanese tariff system. The mathematical formulation is general in the sense that it includes formulations for other tariff systems as special cases. Therefore, the approach is applicable not only to the Japanese system but also to other tariff systems (e.g., gross feed-in tariff system). We further extend this approach by using a robust optimization technique to cope with the uncertainty in photovoltaic power generation caused by weather variability. Numerical experiments show the minimum size requirements of solar photovoltaic systems for meeting CO2 reduction targets and its economic costs in nominal and robust cases.