The purpose of this article is to determine the size and place of different components in microgrids (MGs) including renewable energy resources (RERs). Various factors like reliability, the uncertainty of wind speed, solar irradiance, load, and load growth are considered. The Ekbatan residential complex is studied as the pilot case study placed in Tehran, Iran. Ekbatan complex has three separate sets of buildings called phase 1, 2, and 3 considered as smart MGs. The multi‐objective optimisation problem is solved considering RERs uncertainties, improving reliability and power quality and minimizing power loss by particle swarm optimisation algorithm. Different constraints in terms of voltage, frequency, resources, and energy storage systems (ESSs) capacity are taken into consideration. The effect of load growth, photovoltaic (PV) and ESSs placement, changing the capital cost of RERs, and demand response of controllable loads are studied on optimal sizing and siting. The proposed method is tested on a wind turbine/PV/fuel cell (FC)/hydrogen tank MGs system and the optimal sizing and siting of mentioned sources could decelerate the rate of increase in the total cost of MG considering the load growth.