Heating bills in the winter and cooling bills in the summer can really affect the overall costs of energy on a state by state basis across the U.S.

The folks at personal finance website WalletHub released their findings of 2018's Most & Least Energy-Expensive States. New York is ranked in the top 10 in some sub-categories and in the bottom 10 in others. The overall ranking of the Empire State in Cost of Energy is an impressive 41st when all factors are considered.

In comparing the energy consumption of the 50 states, plus the District of Columbia, WalletHub used "a special formula that accounts for the following residential energy types: electricity, natural gas, motor fuel and home heating oil." Some of the key findings may surprise you.

First, here's the equation WalletHub utilized:

(Average Monthly Consumption of Electricity * Average Retail Price of Electricity) + (Average Monthly Consumption of Natural Gas * Average Residential Price of Natural Gas) + (Average Monthly Consumption of Home Heating Oil * Average Residential Price of Home Heating Oil) + (Average Motor-Fuel Price * (Miles Traveled/Average Motor-Fuel Consumption/Number of Drivers in the State)) = Average Monthly Energy Bill in the State

On the good side, New York produced top 10 ranks in low costs of both Electricity and Motor Fuel. Conversely, New York hit the bottom 10 in costs for both Natural Gas and Home Heating Oil.