The calculated distance (air line) between Puntarenas and San Pedro is approximately 54 miles respectively 86 kilometers.
By car or train, the actual journey to San Pedro is certainly longer, as only the direct route (as the crow flies) between Puntarenas and San Pedro has been calculated here.
Air line (approximately)
86 kilometers
47 nautical miles