The calculated distance (air line) between San Rafael and Nicoya is approximately 93 miles respectively 149 kilometers.
By car or train, the actual journey to Nicoya is certainly longer, as only the direct route (as the crow flies) between San Rafael and Nicoya has been calculated here.
Air line (approximately)
149 kilometers
81 nautical miles