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