Stable isotopes of water have many environmental benefits and applications, including water management to determine the origin of water, the age of ground waters, and the main pollution sources. An analysis was conducted on stable isotopes δ18O and δ 2H in rain samples obtained from a single location in Baghdad between 2013 and 2023. A statistical study was employed to determine the factors that affect the spatial and temporal isotopic fluctuations in rainfall. This work aimed to examine the impact of temperature, humidity levels, and precipitation rates on the isotopic composition of precipitation in Baghdad. The results showed that the MWL of Baghdad city, with a d- excess value of 12.69 , was higher than that of the GMWL( δ 2H = 8 δ 18O + 10 ) and less than that of the Mediterranean ( δ 2H = 8 δ 18O + 22 ) . The effect of temperature on precipitation's isotopic composition indicates a positive correlation between temperature and δ18O values (R2= − 0.032), While a negative correlation exists between precipitation and δ18O values (R2= 0.104). It means that the relationship between δ18O and precipitation is not very strong, This could mean that precipitation is not a good indicator of changes in δ8O compared to temperature. The Hybrid single-particle Lagrangian integrated trajectory ( HYSPLIT) backward trajectory model is also used to identify the origins of humidity during precipitation occurrences. Two sources of humidity are the Mediterranean Sea and the Arab Gulf.