Principles of microeconomics · Lesson 7 of 16
A tax on a market
Put a tax on every cup of coffee sold. The price goes up, but not by the full tax. This lesson shows who really pays, how much the government collects, and what is lost on the way.
An example lesson built by Chalkwork Labs from public sources, to show the shapes. Your course is drafted from your material and checked by you.
The market is a toy: takeaway coffee in one town, with straight-line curves. The numbers are invented to be easy to check by hand. The ideas are the standard ones from an introductory microeconomics course.
1. A market for takeaway coffee
A market is all the buyers and all the sellers of one thing. Here the thing is a cup of takeaway coffee. Three words describe the market.
- Demand is how many cups a day buyers want at each price. Raise the price and fewer people buy. So the demand line slopes down.
- Supply is how many cups a day sellers offer at each price. Raise the price and more cafes find it worth selling. So the supply line slopes up.
- The equilibrium is the price where the two lines cross. Buyers want exactly as many cups as sellers offer.
If the price were £4.00, cafes would offer more cups than people want. Unsold coffee pushes the price down. At £2.00 the queues would be long and cups would run out. That pulls the price up. The crossing point is where neither push happens.
Everything in this lesson compares a taxed market with this crossing point: a cup, cups a day.
2. How strongly does each side react?
Two markets can cross at the same point and still behave very differently when a tax arrives. What matters is how steep each line is. Economists measure steepness with price elasticity: the percentage change in quantity for a one percent change in price.
- Elasticity below 1 is called inelastic. Quantity barely moves when the price moves. Coffee drinkers who need their morning cup are inelastic.
- Elasticity above 1 is called elastic. Quantity moves a lot. Buyers who happily switch to tea are elastic.
Demand has an elasticity and supply has one too. In this lesson both are measured at the crossing point. When you move an elasticity slider, the line pivots around that point. The no-tax price and quantity stay the same. Only the reaction to a tax changes.
We start with a demand elasticity of and a supply elasticity of . Buyers are the less flexible side. Keep that in mind for section 4.
3. The tax opens a wedge
Now the government adds a per-unit tax: a fixed sum on every cup sold. The starting value is a cup. The cafe collects it and passes it on. But the cafe does not simply add it to the price.
With the tax there are two prices. Buyers pay one price. Sellers keep a lower one. The gap between them is the tax. On the chart it is a vertical bar: the tax wedge. The market trades at the quantity where that bar fits exactly between the demand line and the supply line.
Try three things. Set the tax to zero and watch the wedge vanish. Put the tax back and make demand very elastic. Then make supply very elastic instead. The size of the tax never changes who sends the money. It changes who loses it.
4. Who really pays?
The law says the cafe pays the tax. The market says otherwise. Buyers pay more than before. Sellers keep less than before. The two losses add up to the tax. How the loss splits is the tax incidence.
At the starting values, buyers pay , up from . Sellers keep , down . Of a tax, buyers bear and sellers bear .
The less flexible side pays more. Buyers' share of the tax = supply elasticity ÷ (demand elasticity + supply elasticity). With demand at and supply at , that is ÷ = .
Why? An inelastic buyer keeps buying even when the price rises, so the cafe can pass most of the tax on. An elastic buyer walks away, so the cafe must swallow most of the tax to keep the sale. The same logic applies to sellers.
1. New numbers, not the figure's and . Demand elasticity is and supply elasticity is . The tax is a cup. Who bears most of it?
5. What is lost: deadweight loss
Every trade creates a gain. A buyer who would pay £4 but pays £3 gains £1. A cafe that would accept £2 but gets £3 gains £1. That gain is called surplus. The market's job is to create as much of it as possible.
The tax moves some surplus to the government. That is not a loss to society: the money still exists. But the tax also stops some trades. At the starting values, cups a day are no longer sold. Each of those cups was worth more to its buyer than it cost its seller. Nobody gets that value now, not even the government. It is the deadweight loss.
On the chart it is the pink triangle. Its height is the tax. Its base is the lost quantity. So the loss is half the tax times the lost cups: 0.5 × × = a day.
Doubling the tax does not double the loss. Both the height and the base of the triangle double, so the loss goes up four times. Try it on the chart: loses a day, loses .
2. The tax goes from to a cup. What happens to the deadweight loss?
6. Revenue rises, then falls
Tax revenue is the tax per cup times the cups still sold. On the first chart it is the blue block plus the orange block. A bigger tax takes more per cup but shrinks the market. So revenue climbs at first and then falls. Past some point, a higher tax collects less money.
At the starting elasticities, revenue peaks at a tax of a cup, collecting a day. Make both sides more elastic and the peak moves left: the market dies sooner. The dashed line shows the deadweight loss. It keeps growing when revenue has already turned down.
3. The tax is already past the peak of the revenue curve. The government raises it again. What happens?
7. Worked example
The starting values, worked by hand. Demand is cups = − × price. Supply is cups = × price. The tax is a cup.
- No tax. Set demand equal to supply: − p = p. So p = ÷ = , and cups = × = .
- Add the tax. Buyers pay pb, sellers keep ps = pb − . Demand at the buyer's price must equal supply at the seller's price: − (ps + ) = ps.
- Solve. − = ps, so ps = and pb = .
- Quantity. cups = × = a day. fewer than before.
- Incidence. Buyers: − = . Sellers: − = . Buyers bear .
- Revenue. × = a day.
- Deadweight loss. 0.5 × × = a day.
Check these against the readouts in section 3 at the starting slider values. They should match exactly.
8. Read the code
Show the working in code
Optional. The same calculation as Python you can step through.
Each block holds real Python that runs in this page. You will not write or edit any of it. Read the steps, press Run, then answer the question under it. Lines starting with # are notes. Python ignores them.
Three bits of Python you will see:
def demand(p):names a small rule. Later lines call it withdemand(3.0).x = ...stores a result under the namex, so later lines can use it.print(...)shows a result in the output box."%.2f"means "show two decimals".
Block 1: Find the no-tax equilibrium
The computer does not solve the equation. It tries every price in 1p steps and keeps the one where demand and supply are closest. Press Run and compare with section 1.
- Demand as a rule: cups a day at price p.
- Supply as a rule: cups a day at price p.
- Try every price from £0 to £6. For each, measure the gap between demand and supply.
- Keep the price with the smallest gap. Print it and the cups sold there.
The block printed a price of £3.00. What makes that price special?
Block 2: Add the tax, one step at a time
Press Next step three times. Watch the two prices appear, then the quantity, then the money.
- Set the tax per cup.
- Find the seller's price where demand at the buyer's price equals supply. Then the buyer's price and the quantity.
- Revenue is tax × cups sold. The lost cups give the deadweight loss.
Block 3: Try values
The sliders set the tax and the two elasticities. The code rebuilds the lines from the elasticities, the same way the charts do. Double the tax to £1.20 and watch the deadweight loss.
Set the tax back to 60p and move demand elasticity from 0.5 to 2.0. The buyer share drops from 67% to 33%. Why?
Spot the mistake
Someone estimated the revenue from the 60p tax like this. It runs, and the number is too high. Click the line whose idea is wrong.
- The tax is 60p, as in the lesson. Nothing wrong here.
- This is the same seller's price as Block 2, £2.80. Fine.
- This correctly works out the cups sold with the tax, 1,120. The bug is that the next line ignores it.
- Right. demand(p0) is the no-tax quantity, 1,200 cups. The tax shrinks the market to 1,120, so the true revenue is £672, not £720. The comment says "cups sold" but the code uses the wrong cups.
- Printing is fine. The number is wrong because of line 4.
What to remember
- A per-unit tax opens a wedge between the price buyers pay and the price sellers keep. The wedge is the tax.
- The tax is split by elasticity, not by law. Buyers' share = supply elasticity ÷ (demand elasticity + supply elasticity).
- The less flexible side pays more. Inelastic buyers bear most of a tax; elastic buyers bear little.
- Revenue = tax × cups still sold. Never tax × the old quantity.
- Deadweight loss is the value of the trades the tax stops. It is a triangle: half the tax times the lost quantity.
- Double the tax and the deadweight loss goes up four times.
- Revenue rises with the tax, then falls. Past the peak, a bigger tax collects less.
Sources
- OpenStax, Principles of Microeconomics 2e, section 5.3 Elasticity and Pricing (elasticity and tax incidence) and section 3.5 Demand, Supply, and Efficiency (surplus and deadweight loss). Licensed under CC BY 4.0. The ideas and definitions follow these chapters; the coffee market, the numbers and the interactive charts are new to this page.
- Note: the newer Principles of Microeconomics 3e carries a CC BY-NC-SA 4.0 licence, so this page cites the 2e edition.