With an increasing number of naturally ventilated dairy barns (NVDBs), the emission of ammonia and greenhouse gases into the surrounding environment is expected to increase as well. It is very challenging to accurately determine the amount of gases released from a NVDB on-farm. Moreover, control options for the micro-climate to increase animal welfare are limited in an NVDB at present. Both issues are due to the complexity of the NVDB micro-environment, which is subject to temporal (such as wind direction and temperature) and spatial (such as openings and animals acting as airflow obstacles) fluctuations. The air exchange rate (AER) is one of the most valuable evaluation entities, since it is directly related to the gas emission rate and animal welfare. In this context, our study determined the general and local AERs of NVDBs of different shapes under diverse airflow conditions. Previous works identified main influencing parameters for the general AER and mathematically linked them together to predict the AER of the barn as a whole. The present research study is a continuation and extension of previous studies about the determination of AER. It provides new insights into the influence of convection flow regimes. In addition, it goes further in precision by determining the local AERs, depending on the position of the considered volume inside the barn. After running several computational fluid dynamics (CFD) simulations, we used the statistical tool of general linear modeling in order to identify quantitative relationships between the AER and the following five influencing parameters, the length/width ratio of the barn, the side opening configuration, the airflow temperature, magnitude and incoming direction. The work succeeded in taking the temperature into account as a further influencing parameter in the model and, thus, for the first time, in analysing the effect of the different types of flow convection in this context. The resulting equations predict the barn AER with an R2 equals 0.98 and the local AER with a mean R2 equals around 0.87. The results go a step further in the precise determination of the AER of NVDB and, therefore, are of fundamental importance for a better and deeper understanding of the interaction between the driving forces of AER in NVDB.