The calculated distance (air line) between Hatvan and Újpest is approximately 29 miles respectively 46 kilometers.
By car or train, the actual journey to Újpest is certainly longer, as only the direct route (as the crow flies) between Hatvan and Újpest has been calculated here.