Just in time for Independence Day, a new Wallet Hub study recently ranked Montana as the 12th most patriotic state in America.

The study examined several factors related to patriotism, including the percentage of citizens from each state who have served in the Armed Forces, the number of veterans per capita, the percentage of voters in the last presidential election, and the highest volunteer rate.

Montana finished 23rd for the percentage of military enlistees and veterans. Our state ranked 11th in their 'civic engagement' metric, which measures volunteer rates and involvement in local charitable and community groups.

Virginia was the most patriotic state in the study, followed by Washington, Colorado, Idaho and Alaska. New York was ranked as the least patriotic state. New Jersey, Rhode Island, Utah, and West Virginia round out the bottom five.

Click here for the full results of the Wallet Hub study 2015's Most and Least Patriotic States.