A lot of it is tax based, but there are some other factors. CA has high fuel taxes, but they also have higher standards to ensure cleaner burning. AZ is a good place to see how much difference the cleaner burning fuel costs because Maricopa county (Phoenix area) requires gas stations to use CA standard fuel, but not the rest of the state. So compare gas in Phoenix to gas in Tucson.
There are a lot of other factors such as transportation costs, and infrastructure that keeps gas cheaper in the southern states where there are more refineries. Or coastal states where crude oil is more easily shipped to.
A lot of it is tax based, but there are some other factors. CA has high fuel taxes, but they also have higher standards to ensure cleaner burning. AZ is a good place to see how much difference the cleaner burning fuel costs because Maricopa county (Phoenix area) requires gas stations to use CA standard fuel, but not the rest of the state. So compare gas in Phoenix to gas in Tucson.
There are a lot of other factors such as transportation costs, and infrastructure that keeps gas cheaper in the southern states where there are more refineries. Or coastal states where crude oil is more easily shipped to.