Flying time from San Francisco, CA to Shanghai, China. The total flight duration from San Francisco, CA to Shanghai, China is 12 hours, 50 minutes. This assumes an average flight speed for a commercial airliner of 500 mph, which is equivalent to 805 km/h or 434 knots.It also adds an extra 30 minutes for take-off and landing.t ends in Shanghai, China. Your flight direction from San Francisco, CA to Shanghai, China is Northwest (-50 degrees from North). The flight time calculator measures the average flight duration between points. It uses the great circle formula to compute the travel mileage.