Climate change is one of the greatest challenges in the 21st century and the agriculture sector is very vulnerable to this phenomenon. Since wheat is the most important cereal crop in Iran, we aim to analyze the potential impact of climatic variables (temperature and precipitation) on rainfed wheat productivity in Hamedan Province, Iran. For this purpose, generalized additive models have been used to model yields of rainfed wheat based on climatic variables during 2004–2012. Then, based on sensitivity of rainfed wheat to temperature and precipitation in this period, we predict the potential effects of climate change on rainfed wheat yield under the IPCC SRES A1FI and B1 climate change scenarios. Results suggest that yields of rainfed wheat would decrease in all Hamedan's counties primarily because of decreasing October to June precipitation and higher temperature. As a result, it is predicted that the yield of rainfed wheat in Hamedan under the A1F1 and B1 scenarios will fall by 41.3% and 20.6%, respectively, in the 2080s. In other words, according to the A1F1 scenario, in the 2080s, Hamedan Province's rainfed wheat production will decline from 1090 kg/ha to 639 kg/ha and under the B1 scenario to 865 kg/ha.