This paper investigates the optimal capacities of solar photovoltaic (PV) and battery energy storage (BES) for grid-connected households in South Australia. The optimisation is based on the net present cost of the electricity in a 20-year lifespan. Real data of load pattern, solar insolation and temperature at hourly interval as well as the electricity rates (retail price and feed-in-tariff) of South Australia are used in this study. Three different configurations with appropriate rule-based home energy management are proposed. Optimal capacities of the PV and BES are found in each configuration based on four different scenarios of PV capacity limited by the availability of roof size. The maximum export power limitations for South Australian households is considered for the optimization. The cost of electricity (¢/kWh) is selected as an index for comparison between the proposed systems. It is found that the proposed optimal system can be more beneficial for the households with lower electricity consumption. The study examines the sensitivity of the results to the average load consumption and costs of PV and battery. Annual load, PV power, battery charging/discharging, dumped energy, state-of- charge of battery as well as the grid export/import power are shown and discussed. The optimal system is compared with a zero net energy home in South Australia. A general guideline is demonstrated for the customers to purchase the optimal capacities of PV and BES.