Where we start
Most business numbers are averages. Cost per unit, revenue per customer, hours per listing. Averages are fine for describing what happened and nearly useless for deciding what to do next, because nobody ever decides an average. They decide whether to make one more, keep one more, spend one more hour. The cost that matters for that decision is the cost of the next one, and the next one is often nothing like the average. A factory's thousandth unit is cheaper than its first; a support team's hundredth ticket of the day is dearer than its tenth; a software company's millionth copy costs almost nothing. Marginal thinking is the discipline of asking about the next one, and it turns out to be the same discipline that tells you when to walk away.
★ What you walk out with tonight. The question that replaces "is this worth it" with "is one more worth it"; the test that shows why money already spent cannot change a decision; a way to price an hour by its next best use; the two-person, two-task rule that says who should do what even when one person is better at everything; and one sentence that separates a physical unit, a software copy and a prediction by what the next one costs. Plus three worked decisions at Beira Goods, a constructed seller, with every number invented and labelled.
The next unit, not the average
6 min liveA decision at the margin compares two things only: what the next unit will cost and what the next unit will earn. If the second is bigger, make it. If not, stop. Everything else, the money spent last year, the average cost across the whole run, the hours already sunk into the product page, is either the same on both paths or not about the next unit, and a number that is the same on both paths cannot tell you which path is better. That last point is the sunk cost rule, and it is the one people know and still break, because the pile behind them is large and visible and the next unit is small and abstract.
LiveMarginal cost, marginal revenue, and the one comparison that decides4 min▶
Marginal cost is what the next unit costs to make, ship or serve. Not the total divided by the count, which is the average, but the extra: total cost with the unit minus total cost without it. Marginal revenue is what the next unit brings in, which is the price if selling one more does not move the price, and less than the price if it does, because the price cut applies to every unit you were already selling. Foundations session 2 gave you the tool for that second case: on an elastic product the price cut needed to sell one more costs more on the old units than it earns on the new one.
The rule is one comparison. Make the next unit if its marginal revenue is above its marginal cost. Stop at the unit where they meet. Every unit before that point added to profit; every unit after it subtracts. A firm that stops earlier leaves money on the table; a firm that goes further pays for the privilege. Nothing in the rule mentions the average, and that is deliberate: the average cost of a run can be above the price while the next unit is still worth making, and it can be below the price while the next unit is a loss.
Where the average misleads. A product with a large up-front cost and a small per-unit cost has an average that falls with every unit sold. Early on the average is far above the price and a leader reading only averages will call the product a loser. At the margin it was a winner from the first sale, because each sale earned more than it cost to make. The opposite trap is a product whose average is fine but whose next unit is dear, because the team is at capacity and the next order needs overtime, a new courier contract, or a second shift. The average says yes; the margin says the next order is the one that loses money.
Self-studyWhy sunk costs feel like they should count, and the two honest exceptions3 min▶
Money already spent is unrecoverable on every path, which is exactly why it cannot rank the paths. The reason people count it anyway is that it feels like a debt the product owes them, and stopping feels like admitting the debt will never be paid. It will never be paid either way. Keeping the product running does not recover the listing fees or the photographer's invoice; it only adds next month's costs to the pile. The test that clears the fog is to write both paths on one page with only the costs and earnings that lie ahead, as the figure does. If the pile appears on both, it cancels, and what remains is the decision.
Two things that look like sunk costs are not. A recoverable asset is not sunk: stock that can be returned, a licence that can be resold, a deposit that comes back. Its resale value is a real earning on the "stop" path and belongs in the comparison. Information already bought is not sunk in the useful sense: three months of sales data cost money to collect, and that money is gone, but the data itself changes what you expect the next month to earn. Use what the spend taught you; ignore what it cost.
One real Olist product, read at the margin. The most-sold eligible product on the marketplace used throughout these sessions held a price of R$ 75 through 2017 and cut it to R$ 69.90 in January 2018, and its units went from 45 to 121 that month. Multiply price by units and revenue roughly went from 3,400 to 8,500 reais, simple arithmetic on those two months. Was the cut a good decision? Revenue cannot say. Seventy-six extra units had to be bought, packed and shipped, and whether the margin on 121 units at 69.90 beat the margin on 45 at 75 depends on the marginal cost of a unit, which the dataset does not hold. It is the most common gap in a pricing review: a revenue line that went up, a cost of the next unit nobody wrote down, and a decision judged on the half of the picture that happened to be in the table.
The next best use of the hour
5 min liveThe true cost of doing anything is the best thing you did not do instead. An hour spent writing a product listing is an hour not spent answering support tickets; a real spent on stock is a real not spent on advertising. That is opportunity cost, and it is the reason a "free" thing is never free and a cheap thing can be dear. It also leads to a result that surprises everyone the first time: two people should split their work by what each gives up, not by who is faster, and that holds even when one of them is faster at everything.
LiveOpportunity cost, and the two-person rule that follows from it3 min▶
Opportunity cost is the value of the next best alternative you gave up. It is the honest price of an hour, a real, a server, a desk, and it is nearly always higher than the price on the invoice, because the invoice records what you paid and not what you could have done with it. A meeting with eight people has an invoice cost of zero and an opportunity cost of eight hours of whatever those people would otherwise have done. That is why "it is free" is a claim about the invoice and never about the cost.
Comparative advantage is what opportunity cost says about who should do what. In the figure, Ana writes 4 listings an hour or answers 8 tickets; Bruno writes 1 or answers 4. Ana is better at both, which is called an absolute advantage, and it tempts a manager to give Ana everything. But look at what each gives up. When Ana writes a listing she gives up 2 tickets; when Bruno writes one he gives up 4. Ana's listings are cheaper in tickets, so Ana should list. When Ana answers a ticket she gives up half a listing; when Bruno answers one he gives up a quarter. Bruno's tickets are cheaper in listings, so Bruno should answer. Split that way, the two of them together produce more of both than under any other split, and Bruno has a job even though Ana is faster at it.
The rule generalises far past two people. It is why a country that is worse at making everything still exports something, why a platform does the storefront and the seller does the sourcing, and why a senior engineer who is faster at writing tests than the junior should still not be the one writing them. The question is never "who is best at this"; it is "who gives up the least to do this".
Self-studyDiminishing returns, and why the fourth hire earns less than the first3 min▶
Add one more unit of an input while holding the others fixed and, past some point, each added unit produces less than the one before. One more packer in a warehouse of fixed size adds a lot of throughput; the tenth adds a little; the twentieth gets in the way. That is diminishing marginal returns, and it is the reason marginal cost eventually rises: once the cheap capacity is used, the next unit needs the expensive input, the overtime hour, the rented van. It is a statement about the short run, when something is fixed. Given time to add warehouse as well as packers, the constraint moves.
The data habit it gives you: when a team says "we doubled the ad budget and got 40 percent more sales" the interesting number is not the 40, it is the shape. Was the first half of the budget earning far more per real than the second half? A spend that has hit diminishing returns has a marginal return below its average return, and a report that quotes only the average will keep recommending the next increase long after the next increase stopped paying. Any number in this paragraph is illustrative; the shape is the point.
Beira Goods, a constructed seller, and the hours nobody prices. Beira has 40 products and two people. Ana writes four listings an hour or clears eight support tickets; Bruno writes one or clears four. For a year Ana did both, because she was better at both, and Bruno was given "whatever is left". Priced by opportunity cost, every ticket Ana answered cost Beira half a listing, and every listing Bruno wrote cost four tickets. The fix took no hiring and no tool: swap so that each does the task that costs them least. Ana and Bruno are invented; the rates are invented; the reason the swap works is the same reason a marketplace does storefronts and leaves sourcing to sellers.
Three things, three marginal costs
4 min liveA fixed cost is paid once, whether you make one unit or a million: the factory, the codebase, the trained model. A marginal cost is paid again for every unit. Most of the economics of the last thirty years comes from one observation about that split, made by Shapiro and Varian in 1998 and reported here from the publisher's record: an information good is expensive to make the first time and nearly free to copy, so its marginal cost is close to zero, and a price that tracks marginal cost tracks zero. A prediction from a model breaks that story in one specific way, and the break is the whole economics of AI in a sentence.
LiveFixed, marginal, and the economics of a prediction in words4 min▶
A physical unit has a marginal cost that is real and visible: the item from the supplier, the packaging, the courier, the commission. It is roughly flat while there is spare capacity and rises when there is not. Pricing it is Foundations session 2's job: the price sits above the marginal cost by an amount the elasticity decides.
A software copy has a marginal cost close to zero. The first copy cost the whole development budget; the millionth costs a few seconds of bandwidth. Shapiro and Varian's argument, as reported, is that this is why information goods are priced by what they are worth to the buyer and not by what they cost to make, and why the same product gets sold in versions at different prices to different buyers. Deep-dive session 3 takes that apart. Tonight the point is only the shape: a fixed cost that is enormous, a marginal cost that is nearly nothing, and an average cost that falls forever.
A prediction from a model sits between the two, and the position matters. Training the model is a fixed cost, like writing the software. But each answer the model gives is not a copy; it is a computation, metered per token in and per token out, and it costs something every single time. Small, but not zero, and multiplied by every request. That means the average cost of an inference does not fall to nothing the way a software copy's does; it falls towards the per-token floor and stops. Every decision about whether to build, rent or switch off a model comes down to that floor times the volume against the fixed cost, and deep-dive session 4 puts dated list prices on it. No price is quoted here on purpose: the shape is the lesson, and the numbers move.
Self-studyEconomies of scale, and Coase on why a firm exists at all3 min▶
Economies of scale are what a large fixed cost does to the average: the more units it is spread across, the lower the cost per unit, until the marginal cost stops falling and takes over. They are the reason big producers can undercut small ones and the reason a market with a large fixed cost tends towards a few big players. They are also the reason "our cost per unit fell 30 percent" can be entirely a statement about volume and not at all a statement about efficiency; an illustrative figure, and a common confusion.
Coase, in "The Nature of the Firm", Economica 4(16) 386-405, 1937, asked a question that sounds naive and is not: if markets coordinate so well, why do firms exist? Why not hire every hour and buy every part on the open market? His answer is that using a market has costs of its own, finding a counterparty, agreeing a price, writing and enforcing a contract, and a firm exists wherever doing the thing inside, by instruction, is cheaper than buying it outside, by contract. The boundary of the firm sits where those two costs meet. It is opportunity cost applied to organisation: every task is either coordinated by a price or by a manager, and the cheaper coordinator wins. Deep-dive session 9 uses exactly that line to decide whether to build, buy or rent a data platform.
A marketplace is a Coase boundary drawn 3,095 times. The Olist data used throughout these sessions holds 3,095 sellers and 96,096 customers, counts from the RFM course that shares the dataset. Every one of those sellers made the same decision: rather than build a storefront, a checkout, a payment rail and a delivery contract, they rented all of it from a platform and kept sourcing and pricing inside. The platform does the tasks where its opportunity cost is lowest, the seller does the rest, and the commission is the price of the boundary. Nothing about the split is fixed. When a seller's volume makes the commission dearer than running their own shop, the boundary moves, and that is the whole of Coase in one marketplace.
Three decisions at Beira Goods, on paper
★ 22 min · everyone works it throughNo code tonight. Beira Goods is a constructed seller with 40 products and two people, and every number below is invented and labelled so. Three decisions, each worked with the tonight's tools: whether to make one more of an item, whether to keep a product that cost a lot to list, and where Ana's and Bruno's hours are best spent. Then the same three for one thing you own. Work alongside; the blanks are yours.
Decision 1 · One more of an item. Beira's best-selling towel set sells at R$ 89 (invented). The next unit costs R$ 62 to buy, pack, ship and pay commission on, as the figure stacks it. Beira's average cost per unit, including a share of the rent and the photographer, comes out at R$ 95 (invented). Should Beira make one more? Fill in the margin, then do the same for one item you sell.
Decision 2 · Keep a product that cost a lot to list. Beira spent R$ 4,000 (invented) on photography, copy and a launch discount for a lamp that now sells three units a month at R$ 12 margin each, against a R$ 50 monthly listing fee (all invented). The R$ 4,000 is gone on both paths. Write the two paths with only what lies ahead, and then decide.
Decision 3 · Where the hours go. Ana writes 4 listings or clears 8 tickets an hour; Bruno writes 1 or clears 4 (invented). Beira needs both listings and tickets done. Work out what each gives up for each task, circle the lower cost in each column, and assign. Then do it for two people on your own team with two tasks they both do.
Decision 4 · The same three for a prediction. Beira is thinking of paying a model to draft every product description and to answer the simple tickets. Write the three marginal costs side by side in words, with no prices: what the next unit shipped costs, what the next copy of a description costs once written, and what the next model call costs. Then say which of the three rules from tonight applies to each.
Decision 5 · The sentence for a leader. One sentence per decision, in the shape that survives a hard question: the next unit's cost, the next unit's earning, what was left out and why. Practise it out loud for Decision 2, where the pile is largest and the temptation strongest.
Decision 6 · What the data cannot tell you. Every one of Beira's numbers was handed to you. In a real catalogue the marginal cost of a unit is usually not in any table: the supplier's invoice is in one system, the courier's in another, the commission in a third, and the hours nowhere. Write, for one thing you sell, which of the four stack items you could find tonight and which you could not. The gap is the first thing to fix before any pricing decision.
Keep the three questions as your standing rule. What does the next one cost? What is on both paths and therefore cancels? What is the best thing I could do with this hour or this real instead? Any decision that arrives with an average, a pile of past spend, or the word "free" in it has skipped at least one of the three.
Before Foundations session 4
30 min- Find one decision your team made on an average and rewrite it at the margin: what did the next unit cost and earn? If the verdict flips, write down why the average pointed the wrong way.
- Find one product, project or tool that is kept because of what it already cost. Draw the fork on one page with only what lies ahead on each branch. Say which branch wins and what the sunk spend taught you that still counts.
- Take two people who both do two tasks and write the four rates and the four opportunity costs. Circle the lower cost in each column. If the assignment you get is not the one you have, write the sentence that explains the swap without the word "better".
- Bring one purchase where you could not see the quality before you paid: a dataset, a tool, a contractor, a used car. Foundations session 4 is about what happens to a market when one side knows more than the other, and why the good sellers leave first.
Three questions
Clear all three and Foundations session 3 gets stamped in your passport.
1 · Beira Goods (constructed) spent R$ 4,000 listing a lamp that now earns R$ 36 a month in margin against a R$ 50 monthly fee. What should Beira do, and why?
Sunk means unrecoverable on every path, so it cancels out of the comparison. Only what lies ahead ranks the branches, and ahead the lamp loses money each month. What the spend taught, three units a month at this price, is the one part of it that still counts.
2 · Ana writes 4 listings an hour or clears 8 tickets; Bruno writes 1 or clears 4 (constructed). Who should answer tickets, and why?
Comparative advantage is about what each person gives up, never who is faster. Ana has the absolute advantage in both tasks and the comparative advantage in listings only; Bruno's tickets are cheaper in listings forgone, so the pair produces more of both when Bruno answers them.
3 · Which statement about marginal cost is correct?
The three shapes are the whole of Part 3. Shapiro and Varian's near-zero copy cost, as reported, is why information goods are priced by value; inference breaks that story because each answer is a computation with a per-token cost. Deep-dive session 4 puts dated prices on it.
What this session teaches, and where it came from
Every fact on this page, and its verification tier, is recorded in the course's source map.
Foundations session 3 cheat sheet · pin this
You can now decide at the margin and price an hour by its next best use. Foundations session 4 is about the cases where a market, left alone, gets the price wrong: a cost that lands on someone who did not choose it, a good that nobody can be charged for, a purchase where the seller knows the quality and the buyer does not and the good sellers leave first, and a metric that stopped measuring anything the day it became a target. Each one has a name, a mechanism, and a direct copy in the market for data and models.