The calculated distance (air line) between Tainan and Keelung is approximately 177 miles respectively 284 kilometers.
By car or train, the actual journey to Keelung is certainly longer, as only the direct route (as the crow flies) between Tainan and Keelung has been calculated here.