Santa Margarita is a town and census-designated place located in San Luis Obispo County, California. It was founded in 1889 near Cuesta Peak and San Luis Obispo along State Route 58. The town's name comes from the Mexican Alta California land grant of Rancho Santa Margarita. It is home to the Santa Margarita de Cortona Asistencia site. The population was 1,259 at the 2010 census.
Located in the foothills of the Santa Lucia Mountains, it is one of the most rural communities in San Luis Obispo County. Santa Margarita Lake, a major water source for San Luis Obispo, is located several miles southeast of the town on the headwaters of the Salinas River. It is served by the zip code 93453 and area code 805. According to the United States Census Bureau, the CDP covers an area of 0.5 square miles (1.3 km2), all of it land.
Santa Margarita experiences a cool Mediterranean climate. On average it has 50 days with measurable rain per year – mostly during winter months. Summers are generally warm and sunny, often with morning fog from the Pacific coast. Winters are generally mild, though below freezing lows may be expected four nights per year. Measurable snowfall in San Luis Obispo has not officially been recorded since records began in 1870, although photos show about 0.3 inches (0.76 cm) fell in 1922 and snow flurries were reported in both 1988 and 2006. Temperatures do, however, vary widely at any time of the year, with 80 °F (27 °C) readings in January and February not uncommon. On January 15th, 2021, the weather station at California Polytechnic University (San Luis Obispo) recorded a temperature of 93 degrees Fahrenheit, being the warmest "winter" temperature ever recorded in the city. Although heat extremes in the 110s have been recorded, the maritime moderation is generally strong due to the proximity to the cool ocean waters.