Rancho Santa Margarita is a city in Orange County, California, United States. One of Orange County's youngest cities, Rancho Santa Margarita is a master planned community. The population was 47,853 at the 2010 census, up from 47,214 at the 2000 census. Although it is named for Rancho Santa Margarita y Las Flores, which was in San Diego County, the city limits fall within the borders of Rancho Mission Viejo. At 20 characters long, it is the longest city name in California.