Westby is a town in Sheridan County, Montana, United States. The population was 168 at the 2010 census. Westby was founded in 1910 as a North Dakota city in what is today Divide County. Danish settlers came up with the name by combining the word west, which noted the town's location in extreme western North Dakota, with the word by, Danish for city. The town remained in North Dakota until 1914, when it was moved slightly across the border so as to be next to a newly-built branch line of the Soo Line Railroad and in a state that permitted the sale of alcohol.
Westby is located at 48°52′11″N 104°3′7″W / 48.86972°N 104.05194°W / 48.86972; -104.05194 (48.869847, -104.051950).
According to the United States Census Bureau, the town has a total area of 0.5 square miles (1.4 km²), all of it land.