The calculated distance (air line) between Rāmpur and Agra is approximately 184 miles respectively 297 kilometers.
By car or train, the actual journey to Agra is certainly longer, as only the direct route (as the crow flies) between Rāmpur and Agra has been calculated here.