The objective of this paper is to perform a sensitivity analysis of design variables and an uncertainty analysis of daily potable water demand to evaluate the performance of rainwater harvesting systems in residential buildings. Eight cities in Brazil with different rainfall patterns were analysed. A numeric experiment was performed by means of computer simulation of rainwater harvesting. A sensitivity analysis was performed using variance-based indices for identifying the most important design parameters for rainwater harvesting systems when assessing the potential for potable water savings and underground tank capacity sizing. The uncertainty analysis was, performed for different scenarios of potable water demand with stochastic variations in a normal distribution with different coefficients of variation throughout the simulated period. The results have shown that different design variables, such as potable water demand, number of occupants, rainwater demand, and roof area are important for obtaining the ideal underground tank capacity and estimating the potential for potable water savings. The stochastic variations on the potable water demand caused amplitudes of up to 4.8% on the potential for potable water savings and 9.4% on the ideal underground tank capacity. Average amplitudes were quite low for all cities. However, some combinations of parameters resulted in large amplitude of uncertainty and difference from uniform distribution for tank capacities and potential for potable water savings. Stochastic potable water demand generated low uncertainties in the performance evaluation of rainwater harvesting systems; therefore, uniform distribution could be used in computer simulation. (C) 2016 Elsevier Ltd. All rights reserved.