How far is it from US to Costa Rica?

that depends on the starting point (the US is quite a big country so the starting point matters considerably).

let's assume that your starting point is 3 major American cities:

New York to Costa Rica: 2200 miles

Los Angeles to Costa Rica: 2700 miles

Miami to Costa Rica: 2000 miles