Olney, a census-designated place and an unincorporated area of Montgomery County, Maryland, U.S., is located in the north central part of the county, twenty miles (32 km) north of Washington, D.C. It was largely agricultural until the 1960s, when growth of the Washington suburbs led to its conversion into a mostly residential area. As generally defined, Olney had a total population of 31,438 in the 2000 U.S. Census. In July 2007, Money magazine ranked Olney as 17 (the highest ranked town in Maryland) out of the top 100 in its "America's Best Places To Live" edition. In August 2013, Olney appeared again as #22 in Money magazine's "Top-earning towns" edition of "America's Best Places to Live."
Originally known as Mechanicsville, the village which became Olney was established in 1800. The area was mostly farmland, but it soon began attracting artisans. Early residents Sarah Brooke and Dr. Charles Farquhar were devotees of the English poet William Cowper, and named their home after the poet's hometown. The area was in turn named for their home, which still stands and is known as the Olney House.
The Brooke family held the largest tracts of land in Olney, whose central village was at the intersection of the Rockville to Baltimore road, and the one which connected Washington with Westminster, Maryland, to the north. The Quaker community in Sandy Spring thrived just to Olney's east. The Sandy Spring Museum is a historical museum featuring educational programs and displays. St. John's Episcopal Church was established in 1842 and survives to this day.
After the siege of Washington by the British in 1814 during the War of 1812, President Madison and his family passed through Olney en route to taking refuge in the neighboring town of Brookeville. Although not as involved in the Civil War as areas of Maryland to the west, Olney residents still experienced the tug-of-war between loyalty to the plantation economy of the South and to the Federal government in Maryland's midst.