Skip to content
Hands-on Mentor
ENTR
Back to blog

Supply and demand explained simply, with a lemonade example

Demand is how much buyers want at each price. Supply is how much sellers offer. Where they meet is the equilibrium price. See a campus example and the math.

5 min read

Supply and demand explains how prices form. Demand is the amount of a good that buyers want at each price. Supply is the amount that sellers want to sell at each price. When the price rises, buyers usually want less and sellers want to sell more. The market price settles where the two amounts are equal, and that price is called the equilibrium price.

What is a simple supply and demand example?

Picture a university campus where a Friday market has a few stands that sell lemonade. The numbers below are made up to show the logic.

Suppose you ask students, "How many cups would you buy at each price?" and you ask the stand owners, "How many cups would you prepare at each price?" You collect the answers into a table:

Price per cupDemand (cups)Supply (cups)Result
$2.0030050250 cups short
$2.50250125125 cups short
$3.00200200Equilibrium
$3.50150275125 cups extra
$4.00100350250 cups extra

Read it row by row:

  • At $2.00, students want 300 cups, but the stands prepare only 50. The lemonade sells out early, and 250 cups of wanted lemonade are missing. This is a shortage.
  • At $4.00, the stands prepare 350 cups, but students want only 100. 250 cups are left over. This is a surplus.
  • At $3.00, the amount buyers want equals the amount sellers offer: 200 cups. Nobody leaves without a cup, and nobody has lemonade left.

How does the price move toward equilibrium?

Nobody calculates the equilibrium and announces it. The behavior of buyers and sellers pushes the price there.

If a stand sells out at $2.00 by 1 p.m., the owner sees that a higher price is possible and that preparing more would pay off. As the price goes up, some students decide not to buy, and the line gets shorter.

If a stand has full pitchers at the end of the day at $4.00, the owner lowers the price and prepares fewer cups next week. As the price goes down, more students start to buy.

In both cases the price moves toward $3.00. In real markets this adjustment can take hours or months, and in some markets rules or contracts make prices change slowly.

How do you calculate the equilibrium price?

The table above comes from two simple lines: demand = 500 - 100 × price, and supply = 150 × price - 250. You can build the table and find the equilibrium in Python:

def demand(price):
    return 500 - 100 * price

def supply(price):
    return 150 * price - 250

for price in [2.0, 2.5, 3.0, 3.5, 4.0]:
    gap = supply(price) - demand(price)
    if gap < 0:
        result = f"{-gap:.0f} cups short"
    elif gap > 0:
        result = f"{gap:.0f} cups extra"
    else:
        result = "equilibrium"
    print(f"${price:.2f}", f"{demand(price):.0f}", f"{supply(price):.0f}", result)

The output:

$2.00 300 50 250 cups short
$2.50 250 125 125 cups short
$3.00 200 200 equilibrium
$3.50 150 275 125 cups extra
$4.00 100 350 250 cups extra

You can also solve it on paper. Set the two expressions equal: 500 - 100 × price = 150 × price - 250. This gives 750 = 250 × price, so the price is $3.00. Put that price in the demand expression and the quantity is 500 - 300 = 200 cups.

What shifts the demand curve?

Until now only the price changed. When something other than the price changes, the whole table moves. This is a shift.

Demand increases. Imagine a very hot Friday. Students want 100 more cups at every price, so demand becomes 600 - 100 × price. With the same supply, the new equilibrium is $3.40 and 260 cups. Both the price and the quantity go up.

Supply decreases. Imagine lemons become more expensive, and the stands prepare 100 fewer cups at every price. Supply becomes 150 × price - 350. With the original demand, the new equilibrium is also $3.40, but with 160 cups. The price goes up and the quantity goes down.

Here is a function that checks both cases:

def equilibrium(demand_a, demand_b, supply_c, supply_d):
    price = (demand_a + supply_c) / (demand_b + supply_d)
    return price, demand_a - demand_b * price

print(equilibrium(500, 100, 250, 150))
print(equilibrium(600, 100, 250, 150))
print(equilibrium(500, 100, 350, 150))

The results are (3.0, 200.0), (3.4, 260.0) and (3.4, 160.0).

What changedEquilibrium priceEquilibrium quantity
Start$3.00200 cups
Demand increases$3.40260 cups
Supply decreases$3.40160 cups

The price rose to $3.40 in both cases, but for different reasons and with different results. To explain a price increase, look at the quantity too.

What else shifts demand and supply?

Main reasons demand shifts:

  • Buyers' income
  • Tastes and habits
  • The price of substitutes (if iced tea gets cheaper, lemonade demand may fall)
  • The price of goods used together
  • The number of buyers and what they expect in the future

Main reasons supply shifts:

  • The cost of inputs (lemons, sugar, cups, rent)
  • Production methods and technology
  • The number of sellers
  • Taxes, subsidies and rules
  • Outside events such as weather

What mistakes should you avoid?

  • Mixing up "demand" and "quantity demanded." If the price falls and people buy more, demand did not rise. You moved to a different row of the same table. Demand rises when people want more at every price.
  • Giving one reason for a price rise. Higher demand and lower supply can both raise a price. You need the quantity to tell them apart.
  • Thinking equilibrium is a "fair" price. It is only the price where wanted and offered amounts are equal. It does not mean everyone can afford it.
  • Applying the model to every market. This simple model fits markets with many buyers and sellers. With a single seller, or a price set by a rule, the result is different.

What to read next

The Economics and Finance course covers this topic in the lesson [Supply and demand](/learn/economics-finance/supply-and-demand), and the [course page](/courses/economics-finance) lists the rest. If you want to write small calculations like the ones above, read [Python functions](/blog/python-functions) to get started.

*This article is not investment advice.*

  • #economics
  • #supply and demand
  • #equilibrium price
  • #prices
All posts