Plan your trip to the beach with this snapshot of weather throughout the year in Shanghai: The hottest months are usually August and July, with an average temperature of 26°C, while the coldest months are January and February, with an average of 8°C. The rainiest months in Shanghai are June, July, August and September, with each month seeing an average of 196 mm of rainfall.