Please be aware that Tokyo and Shanghai has multiple airports and that these results are for all airports serving the city.
The best day to arrive at Tokyo is Monday and it would be best to avoid Saturday, as prices are on average 236.96% higher than on Monday. (Average prices, based on 233 datapoints.)
The best time to fly is at around 2. (Average prices, based on 277 datapoints.)