North Dakota and Minnesota are colder than Montana (at lower elevations too). Take a look at the climate data for Fargo, ND for instance, significantly colder than Calgary. It's colder because it's more continental, and you often see a big bubble of arctic air dipping down on the weather map.