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