Whether it is powering a refrigerator to keep food from spoiling or heating water for a shower, many of modern life’s most basic functions require electricity. However, the cost of running a refrigerator for a month could be up to three times more expensive depending on the state.

To highlight how electricity costs vary across the country, 24/7 Wall st. reviewed the average retail price of a kilowatt hour — a measure of electrical energy equivalent to 1,000 watts for 1 hour — of electricity in every state.

20. Ohio
> Average price of electricity: 12.3ยข/kWh
> Average monthly usage: 888 kWh (23rd lowest)
> Average monthly bill: $109 (23rd lowest)
> Largest energy source: Coal

Many factors can impact the price of electricity in a given area. For example, natural resources and weather conditions influence which fuel sources are more likely to be used to produce electricity and how much electricity is needed. In some areas, these factors can reduce the price of energy, while in others they can cause prices to soar.

Natural gas surpassed coal in 2016 as the largest source of electricity in the United States. It is the largest source of electricity in 18 states. Coal remains the largest source in 19 states. Nuclear and hydroelectric provide the most energy in six and five states, respectively.

Residents of states with the highest costs of electricity do not necessarily have the highest electricity bills. Customers compensate for the high prices by dramatically reducing their use, especially in the states where electricity is most expensive. By contrast, households in states where electricity is much cheaper often use more than double the electricity than homes in expensive areas.

Click here to see the states where electricity is the most expensive.
Click here to see the detailed findings and methodology.