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