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