Tabellab

Supply & Demand: Equilibrium, Price Ceilings and a Tax

Lesson 1 of 20Lab

All lessons
  1. Supply & Demand: Equilibrium, Price Ceilings and a TaxLabFree
  2. Price Elasticity of Demand: Midpoint Method & RevenueLab Locked
  3. Cost Curves & the Profit-Maximising Output (MC = MR)Lab Locked
  4. Market Structures: Monopoly vs Competition from a Demand TableLab Locked
  5. Inflation & Real vs Nominal: Using a CPILab Locked
  6. Interest Rates, Inflation & the Fisher EquationLab Locked
  7. GDP Basics: Nominal vs Real, the Deflator and GrowthLab Locked
  8. Exchange Rates, Purchasing Power & Your MarginLab Locked
  9. Welfare Analysis: Consumer & Producer Surplus, Tax Revenue and Deadweight LossLab Locked
  10. Price Floors & Subsidies: Surpluses, Government Cost and Who GainsLab Locked
  11. Elasticity Along a Demand Curve: Point Elasticity and the Revenue-Maximising PriceLab Locked
  12. Cross-Price & Income Elasticity: Substitutes, Complements and Normal GoodsLab Locked
  13. Short-Run Decisions: Shutdown Price, Break-Even Price and Losses Worth TakingLab Locked
  14. Economies of Scale: Long-Run Average Cost and Choosing a Plant SizeLab Locked
  15. Price Discrimination: Separate Prices for Two Customer SegmentsLab Locked
  16. Market Concentration: Market Shares, CR4 and the HHI Before and After a MergerLab Locked
  17. Index-Linked Contracts: Splicing Two Index Series and Escalating a PriceLab Locked
  18. Inflation & Investment Appraisal: Real vs Nominal Cash Flows in an NPVLab Locked
  19. Currency Risk: Forward Rates, Interest Parity and the Break-Even Exchange RateLab Locked
  20. Final Project: A Market & Pricing Dashboard for a New ProductLab Locked

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Loading the spreadsheet…

Why a business owner should care about supply and demand

Every price you see in a shop is the result of a tug of war. On one side are buyers, who want more of a product when it is cheap and less when it is expensive. On the other side are sellers, who are happy to produce more when the price is high and cut back when it is low. Somewhere between the two there is a price at which the amount people want to buy is exactly the amount producers want to sell. Economists call it the equilibrium. If you run a business, buy stock for a retailer, set prices for a product line or simply want to understand why your supplier just raised prices, this one idea explains a surprising amount of what happens to you every week.

This free lesson is written for people who use economics rather than study it for its own sake: small-business owners, junior analysts, buyers and category managers, finance and business students, and anyone who has seen a supply-and-demand diagram in a textbook and wondered how to get actual numbers out of it. You do not need calculus. You need two straight-line equations, a little algebra and a spreadsheet. By the end you will be able to solve a market for its equilibrium price and quantity, measure the shortage a price cap creates, and work out who really carries the burden of a per-unit tax. That last question matters every time a government changes an excise duty, a fee or a levy on your industry.

Throughout the lesson we use the same fictional market as the lab above: the weekly regional market for organic eggs. Quantities are measured in thousand dozen and prices in dollars per dozen. The numbers are invented for teaching, so treat them as an example rather than a description of any real egg market. The method, however, is exactly the one analysts use for real products.

The core concept: two lines and the point where they cross

The simplest useful model of a market uses two linear equations. The demand curve says how many units buyers want at each price. Because higher prices discourage buying, the quantity demanded falls as price rises:

Qd = a − b × P

Here a is the intercept, the quantity people would want if the price were zero, and b is the slope, the number of units buyers drop for every extra dollar. In the egg market, a = 180 and b = 20, so at $6 per dozen buyers want 180 − 20 × 6 = 60 thousand dozen a week.

The supply curve says how many units producers offer at each price. Higher prices make production more attractive, so the quantity supplied rises with price:

Qs = c + d × P

In the lab, c = −36 and d = 16. The negative intercept simply means that below a certain price ($2.25 here) no farm would bother to supply anything. At $6, farms offer −36 + 16 × 6 = 60 thousand dozen. That is the same number as demand, which is not a coincidence: $6 is the equilibrium price.

To find the equilibrium in general, set the two quantities equal and solve for the price. From a − b × P = c + d × P you get a − c = (b + d) × P, and therefore:

P* = (a − c) ÷ (b + d), and then Q* = a − b × P* (or, equivalently, c + d × P*).

Always check Q* in both equations. If demand and supply give different quantities at your P*, there is a sign error in your formula. In the lab, both curves must give 60 at $6.00.

Why does the market move towards this point? Suppose the price were $7. Buyers would want only 40 thousand dozen, but farms would offer 76 thousand. Eggs pile up unsold, stores start discounting and the price drifts down. At $5 the opposite happens: buyers want 80 thousand dozen, farms offer only 44 thousand, shelves empty and sellers realise they can charge more. Only at $6 is there no pressure to move. Real markets are messier, with contracts, delays and stickiness, but this pull towards the crossing point is the reason the model is useful.

Worked example: the organic egg market in numbers

The lab sheet lists both curves for prices from $4 to $8 in steps of 50 cents. Each quantity is calculated with an absolute reference to the parameters, so the whole schedule updates when you change a, b, c or d. This is the exact data the lab asks you to chart:

Demand and supply schedule for organic eggs (thousand dozen per week, fictional example)
Price ($)Qd = 180 − 20PQs = −36 + 16PQd − QsMarket situation
4.001002872Large shortage
4.50903654Shortage
5.00804436Shortage
5.50705218Small shortage
6.0060600Equilibrium
6.505068−18Small surplus
7.004076−36Surplus
7.503084−54Surplus
8.002092−72Large surplus

The formulas behind the table are short. In the lab, the demand column E uses =$B$4-$B$5*D2 and the supply column F uses =$B$7+$B$8*D2, copied down to row 10. The dollar signs lock the parameter cells, so only the price reference D2 changes as you fill down.

Now the four results the lab asks for, with the exact formulas:

Results for the fictional egg market
ResultCellExcel formulaValue
Equilibrium price P*B10=(B4-B7)/(B5+B8)$6.00
Equilibrium quantity Q*B11=B4-B5*B1060 thousand dozen
Shortage at the $5.25 ceilingB14=(B4-B5*B13)-(B7+B8*B13)27 thousand dozen
Price buyers pay after a $0.90 taxB17=(B4-B7+B8*B16)/(B5+B8)$6.40
Price sellers keep after the taxB18=B17-B16$5.50

Let us check each one by hand. The equilibrium price is (180 − (−36)) ÷ (20 + 16) = 216 ÷ 36 = $6.00. Note the double negative: subtracting a negative intercept adds it. This is the single most common slip in the lab, so watch it. The equilibrium quantity is 180 − 20 × 6 = 60, and the supply check −36 + 16 × 6 = 60 agrees.

Price ceilings: when a cap creates a shortage

Suppose a regulator decides that $6 a dozen is too expensive and caps the price at $5.25. A ceiling only matters if it is below the equilibrium; a cap at $7 would change nothing because the market price is already lower. At $5.25 buyers want 180 − 20 × 5.25 = 75 thousand dozen, but farms are willing to supply only −36 + 16 × 5.25 = 48 thousand. The gap of 27 thousand dozen a week is the shortage. In real life it shows up as empty shelves, waiting lists, rationing by queue, informal side payments or a drop in quality as sellers cut corners. Note that the quantity actually sold is the smaller of the two numbers, 48 thousand, which is less than the 60 thousand sold without the cap. A ceiling meant to help buyers can leave many of them with fewer eggs.

$4$5$6$7$8Price ($ per dozen) 020406080100 Quantity (thousand dozen) Ceiling $5.25 Shortage 27 Equilibrium: $6.00, 60 Demand Qd Supply Qs
Figure 1. The lab's demand and supply lines with price on the horizontal axis, as in the lab chart. They cross at $6.00 and 60 thousand dozen. At the $5.25 ceiling (dashed), demand is 75 and supply only 48: a shortage of 27.

Who pays a tax? Tax incidence in one formula

Now drop the ceiling and suppose the government charges sellers $0.90 for every dozen sold. Legally, farms pay the tax. Economically, the burden is shared, because the tax changes the price at which the market clears. A tax of t on sellers means a farm that receives price P from a buyer keeps only P − t, so the supply curve becomes Qs = c + d × (P − t). Setting this equal to demand gives the new price buyers pay:

P buyers = (a − c + d × t) ÷ (b + d)

With the lab numbers: (180 + 36 + 16 × 0.90) ÷ 36 = 230.4 ÷ 36 = $6.40. Sellers keep $6.40 − $0.90 = $5.50. Compared with the old price of $6.00, buyers pay 40 cents more and sellers receive 50 cents less. The share carried by buyers is d ÷ (b + d) = 16 ÷ 36 ≈ 44%, and sellers carry b ÷ (b + d) = 20 ÷ 36 ≈ 56%. The rule behind the formula is simple and worth remembering: the side of the market that is less sensitive to price carries more of the tax. Here demand is a little more price-sensitive than supply (a slope of 20 against 16), so sellers carry slightly more. It does not matter which side the law names as the payer; the split comes from the slopes.

The tax also shrinks the market. At the new buyer price of $6.40, demand is 180 − 20 × 6.40 = 52 thousand dozen, down from 60. The government collects $0.90 × 52 = $46.8 thousand per week. The 8 thousand dozen that are no longer traded represent deals that would have benefited both a buyer and a farm, and economists call the value lost on them the deadweight loss. With straight lines it is a triangle: ½ × 0.90 × (60 − 52) = $3.6 thousand per week in this example.

A $0.90 tax per dozen: who really pays? $5.00$5.50$6.00$6.50$7.00 Sellers $0.50 Buyers $0.40 Sellers keep $5.50 Buyers pay $6.40 Weekly quantity (thousand dozen) 60 before 52 after the tax Tax revenue: $0.90 x 52 = $46.8 thousand per week
Figure 2. Tax incidence in the egg market: of the $0.90 tax, buyers carry $0.40 through a higher price and sellers $0.50 through a lower net price, and the weekly quantity falls from 60 to 52 thousand dozen.

How to do it in Excel, step by step

  1. Type the parameters in a block of input cells: a in B4, b in B5, c in B7 and d in B8. Format them so they look like inputs (for example a light fill colour) and never type the numbers directly into formulas.
  2. Build the schedule. Put prices in D2:D10 (type 4 and 4.5, select both cells and drag the fill handle down to 8). In E2 type =$B$4-$B$5*D2, in F2 type =$B$7+$B$8*D2. Press F4 while the cursor is on a reference to cycle through $B$4, B$4, $B4 and B4.
  3. Select E2:F10 and press Ctrl+D to fill both formulas down (on a Mac, Cmd+D also works in recent versions).
  4. In B10 enter =(B4-B7)/(B5+B8) for the equilibrium price and in B11 enter =B4-B5*B10. Next to it, type =B7+B8*B10 as a check and confirm both give 60.
  5. In B14 enter =(B4-B5*B13)-(B7+B8*B13) for the shortage at the ceiling in B13. If the result is negative, the ceiling is above the equilibrium and is not binding. You can make that explicit with =MAX(0,(B4-B5*B13)-(B7+B8*B13)).
  6. In B17 enter =(B4-B7+B8*B16)/(B5+B8) for the price buyers pay after the tax in B16. B18 already holds =B17-B16, the price sellers keep.
  7. Chart it. Select D1:F10 and go to Insert › Charts › Insert Scatter (X, Y) or Bubble Chart › Scatter with Straight Lines. A scatter chart uses the first column (Price) as the X values; a line chart would treat Price as a third series, which is the classic mistake.
  8. Add titles: click the chart, then the Chart Elements button (the plus sign next to the chart, or Chart Design › Add Chart Element) and tick Chart Title and Axis Titles. Type Demand and supply for organic eggs, Price ($) and Quantity (thousand dozen). Place the legend at the bottom.
  9. Optional check with Goal Seek: in a spare cell compute =($B$4-$B$5*H1)-($B$7+$B$8*H1) for a trial price in H1, then use Data › What-If Analysis › Goal Seek to set that cell to 0 by changing H1. Goal Seek should land on 6.00, which confirms your algebra.
In the lab above, the Coach grades B10, B11, B14 and B17 and checks that your chart is a scatter chart with a title, two axis titles and a legend. Use the hints if you get stuck, but try the algebra first.

Economics for Business in Excel course illustration
The Economics for Business course turns textbook diagrams into spreadsheets you can change and test.

Common mistakes and how to spot them

  • Dropping the double negative. Writing =(B4+B7)/(B5+B8) gives 144 ÷ 36 = $4.00 instead of $6.00. Spot it by plugging P* into both curves: they will not give the same quantity.
  • Mixing up slopes and intercepts. If your equilibrium price is negative or absurdly large, check that a and c are the intercepts and b and d the slopes, and that b is entered as a positive number (the minus sign is already in the formula).
  • Treating a non-binding ceiling as a shortage. A cap above P* does nothing. A negative "shortage" is a sign that the ceiling is above the equilibrium.
  • Subtracting the tax from the wrong price. The buyer price rises by only part of the tax. If your buyer price is exactly $6.00 + $0.90 = $6.90, you have assumed that buyers pay everything, which is only true if supply is perfectly elastic.
  • Using a line chart. Excel's line chart puts categories, not numbers, on the horizontal axis and turns the Price column into a third line. Use an XY scatter chart.
  • Mixing units. Quantities here are in thousand dozen per week. If you compare with monthly data or single eggs, convert first, or the slopes will be wrong by a factor of 4 or 12.

Quick reference: formulas and shortcuts used

Keep this table next to you when you build your own market model. The letters a, b, c and d are the demand and supply parameters, Pc is the ceiling price and t the tax per unit.

Formulas and shortcuts from this lesson
WhatExcel formula or shortcutNotes
Equilibrium price=(a-c)/(b+d)In the lab: =(B4-B7)/(B5+B8)
Equilibrium quantity=a-b*P*Check with =c+d*P*
Shortage at ceiling=(a-b*Pc)-(c+d*Pc)Wrap in MAX(0, …) to ignore non-binding caps
Buyer price after tax t=(a-c+d*t)/(b+d)Seller price = buyer price − t
Buyer share of tax=d/(b+d)Seller share = =b/(b+d)
Lock a referenceF4Cycles $A$1 › A$1 › $A1 › A1
Fill downCtrl+DCopies the top cell of the selection down
Goal SeekData › What-If Analysis › Goal SeekSolve Qd − Qs = 0 numerically
Scatter chartInsert › Charts › ScatterFirst column becomes X

Real-world uses

  • Supplier price increases. When a drought or a feed-cost spike shifts supply to the left (lower c), you can re-solve the model to estimate how far the market price may rise and how much volume may fall, before you renegotiate contracts.
  • Excise duties and levies. If a new fee per unit is announced for your industry, the incidence formula gives a first estimate of how much you can pass on to customers and how much will come out of your margin. Real slopes are uncertain, so run a range of values.
  • Price caps and promotions. Rent caps, regulated tariffs or your own "never above $X" promise behave like ceilings. The shortage formula tells you how much unmet demand to expect, which is useful for stock planning.
  • Market sizing for a new product. If you can estimate how demand responds to price (from surveys or tests) and how many units you and competitors could offer at each price, the crossing point is a rough guide to a sustainable price and volume.
  • Explaining decisions to others. A one-sheet model with a scatter chart is often the clearest way to show a manager or a bank why a price change or a tax will hit volume, not just margin.

What you will build in the rest of this course

This first lesson is free. The remaining 19 labs are part of the paid course (a one-time $9.90), and each one adds a tool you can use on real business numbers.

Price Elasticity of Demand: Midpoint Method & Revenue. You move from slopes to elasticity, the percentage measure that tells you whether a price rise will raise or lower your revenue, and you calculate it the robust midpoint way.

Cost Curves & the Profit-Maximising Output (MC = MR). You build fixed, variable, average and marginal cost from a production table and find the output where one more unit stops adding profit.

Market Structures: Monopoly vs Competition from a Demand Table. Using a single demand table you compare the price and output a monopolist would choose with the competitive outcome, and measure what consumers lose.

Inflation & Real vs Nominal: Using a CPI. You rebase a price index, convert nominal wages and sales into real terms and see whether your growth is growth at all once prices are taken out.

Interest Rates, Inflation & the Fisher Equation. You separate real from nominal interest rates, exactly and approximately, and apply it to loans and savings decisions.

GDP Basics: Nominal vs Real, the Deflator and Growth. You compute nominal and real GDP from a basket of goods, derive the GDP deflator and calculate growth rates the way statistical offices describe them.

Exchange Rates, Purchasing Power & Your Margin. You translate foreign-currency prices and costs, check purchasing power parity and see how a currency move squeezes or widens the margin of an importer or exporter.

Summary

A market can be modelled with two straight lines: demand Qd = a − b × P and supply Qs = c + d × P. The equilibrium price is (a − c) ÷ (b + d), and the equilibrium quantity follows from either curve. A price ceiling below the equilibrium creates a shortage equal to Qd − Qs at the ceiling. A per-unit tax raises the buyer price by the share d ÷ (b + d) of the tax, lowers the seller price by the rest and shrinks the quantity traded. In the fictional egg market this means $6.00 and 60 thousand dozen without intervention, a shortage of 27 thousand dozen at a $5.25 cap, and $6.40 for buyers and $5.50 for sellers under a $0.90 tax.

Now scroll up and try the lab. Enter the four formulas, build the scatter chart and then play with the inputs: make demand steeper, raise the tax or move the ceiling above $6 and watch what changes. Ten minutes of experimenting will teach you more about markets than a chapter of reading.

Frequently asked questions

How do you calculate equilibrium price in Excel?

Write demand as Qd = a − bP and supply as Qs = c + dP, put a, b, c and d in cells and use =(a−c)/(b+d), for example =(B4-B7)/(B5+B8). Plug the result into either curve to get the equilibrium quantity.

How do I plot supply and demand curves in Excel?

Make a table with price in the first column and quantity demanded and supplied in the next two, select it and insert an XY scatter chart with straight lines. The scatter chart uses price as the X values, so the two lines cross at the equilibrium.

What is the shortage caused by a price ceiling?

If the ceiling is below the equilibrium price, the shortage is the quantity demanded minus the quantity supplied at the ceiling price. If the ceiling is above the equilibrium, it is not binding and there is no shortage.

Who pays a tax, buyers or sellers?

Both, depending on how price-sensitive each side is. With linear curves the buyers' share is d/(b+d) and the sellers' share is b/(b+d), regardless of who legally pays the tax.

Why should I use a scatter chart instead of a line chart for supply and demand?

A line chart treats the first column as text categories and may plot price as a separate line. A scatter chart treats price as a number on the X axis, which is what a supply and demand diagram needs.

Can I solve for equilibrium without algebra in Excel?

Yes. Calculate Qd − Qs for a trial price in one cell and use Data, What-If Analysis, Goal Seek to set that cell to zero by changing the price. Goal Seek finds the same equilibrium as the formula.

Keep going: Economics for Business in Excel

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. Price Elasticity of Demand: Midpoint Method & Revenue
  2. Cost Curves & the Profit-Maximising Output (MC = MR)
  3. Market Structures: Monopoly vs Competition from a Demand Table
  4. Inflation & Real vs Nominal: Using a CPI
  5. Interest Rates, Inflation & the Fisher Equation
  6. GDP Basics: Nominal vs Real, the Deflator and Growth
  7. Exchange Rates, Purchasing Power & Your Margin
  8. Welfare Analysis: Consumer & Producer Surplus, Tax Revenue and Deadweight Loss
  9. Price Floors & Subsidies: Surpluses, Government Cost and Who Gains
  10. Elasticity Along a Demand Curve: Point Elasticity and the Revenue-Maximising Price
  11. Cross-Price & Income Elasticity: Substitutes, Complements and Normal Goods
  12. Short-Run Decisions: Shutdown Price, Break-Even Price and Losses Worth Taking
  13. Economies of Scale: Long-Run Average Cost and Choosing a Plant Size
  14. Price Discrimination: Separate Prices for Two Customer Segments
  15. Market Concentration: Market Shares, CR4 and the HHI Before and After a Merger
  16. Index-Linked Contracts: Splicing Two Index Series and Escalating a Price
  17. Inflation & Investment Appraisal: Real vs Nominal Cash Flows in an NPV
  18. Currency Risk: Forward Rates, Interest Parity and the Break-Even Exchange Rate
  19. Final Project: A Market & Pricing Dashboard for a New Product

Buy course — $9.90 See the full course