Blue states were better than red states in 2018.

That’s what my trusty spreadsheet tells me when I compiled a selection of state-by-state rankings that serve our national thirst to debate who’s No. 1 and who’s dead last.

My study used 14 state-by-state rankings published last year on various quality-of-life subjects. My “red” states were those who voted for President Donald Trump in the 2016 election; “blue” states were the ones that didn’t go for Trump.

The blue states scored better two ways — higher overall average rankings vs. red states (No. 22 vs. 27th) and better average grades in eight of the 14 separate ranking topics: livability, raising a family, healthcare, education, economy, job growth, personal freedoms and worker rights. Red states graded higher for six subjects: population growth, cost of living, lower taxes, business friendliness, and government solvency.

Here’s a look at the states that scored best and worst in my ranking of rankings …

The top five were New Hampshire, Utah, Washington, Colorado and Minnesota. All but Utah voted “blue” in 2016. The bottom five were Louisiana, Mississippi, West Virginia, Kentucky and Arkansas — all red states.

Now you could argue the relatively poor scores of red states helps explain Trump’s election — voters frustrated with the state of their states chose a political novice to stir up the status quo.

Of course, one could also wonder if two years after Trump’s election such disappointing “red” grades help explain why Democrats fared well in the recent mid-term elections.

I will note that topic by topic, a state’s individual rankings often varied a lot. That suggests many states — and I don’t just mean government — are really good at some stuff and fairly bad at other stuff.

When I applied standard deviation math to the 14 ranking results I found that red state rankings were decidedly more predictable than blue state results.

This geeky volatility measurement found that rankings were most consistent for Pennsylvania, Wisconsin, Montana, Nebraska and Louisiana. This is a decidedly a middle-America “red” grouping.

The most wildly gyrating rankings were found in Hawaii, Vermont, Alaska, Nevada, Connecticut and California. It’s what I’d call a quasi-coastal and decidedly “blue” crowd.

Here’s what states stood out, and who stunk, in the 14 rankings I tracked …

Livability: Gallup’s year-round polling on social and economic issues gave top scores for quality of life to South Dakota, Vermont and Hawaii. Worst? West Virginia, Louisiana and Arkansas.

Raising families: WalletHub’s top states for child-rearing were Massachusetts, Minnesota and New Hampshire. Worst? New Mexico, Mississippi and Alabama.

Being a patient: United Health Foundation’s yardstick found the top spots to be sick — and get quality care — were Hawaii, Massachusetts and Connecticut. Worst? Louisiana, Mississippi and Alabama.

Education: US News & World Report gave best-for-students grades to Massachusetts, then New Jersey and Utah. Worst? New Mexico, Louisiana and South Carolina.

Personal freedom: The Cato Institute’s yardstick for laws friendly to the populace showed the best were in Maine, Nevada and New Mexico. Worst? Texas, Alabama and Hawaii.

New neighbors: Census data as of July showed the fastest population growth on a percentage basis was in Nevada, Idaho and Utah. Least attractive? West Virginia, Illinois and Alaska.

Economic strength: 24/7 Wall Street said the best economies were in Colorado, Utah, and Massachusetts. Worst? West Virginia, Alaska and Louisiana.

Job growth: As of November, the Bureau of Labor Statistics employment figures showed new employment growth, percentage-point-wise, was in Nevada, Arizona and Wyoming. Worst job markets? Vermont, Alaska and West Virginia.

Worker rights: Oxfam said the best employee protections were in Washington, California and Massachusetts. Worst places to work, Oxfam says? Virginia, Mississippi and Alabama.

Business climate: CNBC said most “business-friendly” was Texas then Washington and Utah. Worst? Alaska, Mississippi and West Virginia.

Cost of living: Missouri’s tracking of how expensive life is in each state shows low-cost leaders Mississippi, Oklahoma or Arkansas. Priciest? Hawaii, California then New York.

Taxes: The anti-tax Tax Foundation said taxpayers fared best in Wyoming, Alaska and South Dakota. Worst, New Jersey, California then New York.

Government solvency: George Mason University economists graded Nebraska, South Dakota, and Tennessee with the strongest state finances. Biggest risks were in Illinois, Connecticut, and New Jersey.

Transportation: Best places to get around, by Bankrate’s yardstick, were North Dakota, Iowa and Ohio. Worst? California, Hawaii and Connecticut.

In this map, click on icons for individual state data …