There are
2,626 mi
from San Marcos, CA to Gaithersburg, MD
That's the driving distance. It would take 1 day 23 hours to go from San Marcos, California to Gaithersburg, Maryland.
The flight distance (direct flight from San Marcos, CA to Gaithersburg, MD) is 2,249.50 mi.
2,626 mi = 4,226.42 kms