President Obama recently proposed to place a $10-per-barrel tax on imported oil in his Fiscal Year 2017 budget. Many believe that oil producers will pass on the costs of this tax to consumers.

Taxes are tricky. You might think that taxing a good means that the people producing it end up paying the tax, but that’s not always the case. Consider, for example, President Obama’s recent proposal in his Fiscal Year 2017 budget to place a $10-per-barrel tax on imported oil. Many economists and commentators anticipate that the tax incidence will fall mostly on consumers—that is, the people who buy the oil will ultimately pay this new tax, instead of those who produce the oil.

Outside of the specific example of the oil tax, though, let’s look at the concept of incidence and what actually determines who pays.

When you boil it all down, the incidence of a tax or a regulation has to do with elasticity. The question is how readily those buying or selling a good will react to the price being pushed up by a tax (or down by a subsidy). The easiest way to think about these elasticities is by looking at the staples of introductory economics: supply and demand curves. The slopes of those lines are just a way of depicting of the elasticity of supply or demand. A very steep demand curve means that demand for a good or service is highly inelastic, as a change in the price wouldn’t mean that large of a decline in the quantity demanded. In the opposite case, a very flat supply curve would mean very elastic supply. A change in the price would mean a relatively large change in the quantity supplied.

So let’s think about the incidence of a tax on oil. Let’s assume the supply of oil is very inelastic. It’s difficult for oil refineries to ramp up or cut oil production in response to short-term changes in prices. In other words, if the price of oil goes up, then producers aren’t going to be able to change the quantity of oil supplied to the market very much. At the same time, the demand for oil may also be fairly inelastic as well, at least in the short term. Oil is pretty important for many consumers. Just think of how many people need gas to fill up their cars to go to work. The price of gas doesn’t seem to affect how much people drive, meaning the demand for gas does not change much.

But when the government places a tax on gasoline, who will bear the incidence of the tax? It’ll be the more inelastic of either supply or demand. If demand is less elastic (which seems likely), producers, who know that consumers will continue to buy gas in the face of higher price, will shift the price onto them. And the rise of shale oil producers, who are more capable of quickly turning production on and off, means that the short-term supply may become more elastic.

So a quick rule of thumb when it comes to incidence is that the less-elastic factor is going to bear more of the incidence. Former Senate Finance Chair Russell Long said that the problem with tax reform is that everyone says “Don’t tax you, don’t tax me, tax that man behind the tree.” When it comes to tax incidence, it helps to think about how quickly that man can run away.