learn-economics-with-phoebe / Deep-dive session 4 of 10
Learn Economics with Phoebe · Deep-dive session 4 of 10

The economics of a prediction

For thirty years the economics of software rested on one fact: the second copy costs nothing. A prediction from a model is not a copy. Every request burns tokens, every token has a price on a public list, and the bill is a straight line through the origin with no fixed part at all. That is a pure marginal cost, and it is the first thing about AI that a finance team has seen before: it is a cost of goods sold. Tonight prices one constructed workload, 2,000,000 requests a month at 1,200 input and 300 output tokens each, at the list prices published on 25 September 2026: 27,000 dollars a month on Claude Opus 5, 10,800 on Claude Sonnet 5, 5,400 on Claude Haiku 4.5. Then it asks the only question owning a model ever answers: at what volume does a flat monthly cost beat a line through the origin? The answer is one division, and the only invented number in it is the flat cost.

🟡 Core Analysts, platform and finance teams Python 45 min
0-3 · Welcome 3-18 · Fixed, marginal, and the crossing 18-40 · Build-along: the cost function and the break-even 40-45 · Q&A
Part 0

Where we start

Foundations session 3 drew two marginal cost curves: a physical good, where the next unit costs about what the last one did, and an information good, where the next copy costs nothing. Inference sits in neither picture. The next prediction costs a fixed number of tokens times a fixed price per token, every time, forever. That makes the choice between renting a model by the request and owning one by the month a textbook fixed-versus-variable problem, and textbook problems have textbook answers: find the volume where the two lines cross, then ask which side of it you are on. Tonight builds that crossing from list prices and a constructed workload, and keeps the one number nobody can publish, the cost of owning, as a variable you move.

🎫 Clear all three quiz questions to stamp your passport Live = presented in the 45 minutes Self-study = the full depth, after class ★ Build-along = run the code yourself

★ What you walk out with tonight. A cost function that turns a request into dollars from a dated price list, the monthly bill for a constructed workload on three models, a break-even volume you can defend as F divided by c, and the habit of writing the price list's date next to every number that came from it.

Part 1 · covers fixed cost, marginal cost, and the price list

A prediction has a marginal cost, and it is on a price list

5 min live

A fixed cost is paid whether or not a request arrives: a server, a licence, a team. A marginal cost is paid per request and only per request. Per-token API pricing has no fixed part: send nothing, pay nothing; send twice as much, pay twice as much. The list prices as published on 25 September 2026 are 5 dollars per million input tokens and 25 per million output tokens for Claude Opus 5, 2 and 10 for Claude Sonnet 5, 1 and 5 for Claude Haiku 4.5, with cache reads at about a tenth of the input price. The list carries more models than these three; the page names only these, and you re-check the list before you decide anything.

TWO COSTS, ONE CROSSING rent is a line through the origin, own is a flat line, and the break-even is where they meet MONTHLY COST REQUESTS A MONTH F own: F, flat until the box is full rent: c x N, no fixed part c each N* = F / c rent is cheaper here own is cheaper here Below N* the line through the origin is under the flat one; above it the flat one wins. Every number tonight sits somewhere on this picture.
🔍 Click to zoom - the amber dot is the whole decision: rent below it, own above it, and F is the only number on the page that has to be invented
LivePer-token pricing is a pure marginal cost3 min▶

The shape of the bill. Cost equals requests times cost per request, and cost per request equals input tokens times the input price plus output tokens times the output price, both per million. Nothing in that expression is paid when no request arrives. Economists call a cost with that property purely variable, and a cost per additional unit a marginal cost; here the two are the same number, c, and c does not change with volume until a volume discount is negotiated, which the public list does not carry.

Why the output price matters more than it looks. Output tokens are priced five times the input tokens on every one of the three models named tonight: 25 against 5, 10 against 2, 5 against 1. A request that reads 1,200 tokens and writes 300 pays more for the 300 than for the 1,200. A feature that writes long answers is a dear feature even if it reads almost nothing, and that is visible only if you split the request into its two token counts before pricing it.

The date on the list. The prices above are list prices as published on 25 September 2026. They have moved before and will move again; the map that feeds these pages records that Claude Sonnet 5's price was introductory earlier in the year and is now standard. Every cost you compute from a list carries the list's date, and a break-even computed on a stale list is a stale break-even.

Self-studyThe zero-marginal-cost story, and why inference breaks it2 min▶

Shapiro and Varian 1998, Information Rules, is the reported source of the modern version: an information good is expensive to produce and cheap to reproduce, so its cost structure is almost all fixed, competition drives the price toward the near-zero marginal cost, and the only defence is to differentiate, version, and lock in. Software companies built their margins on that sentence for three decades: the thousandth user of a spreadsheet costs the vendor a few cents of bandwidth.

Inference breaks the sentence at the word reproduce. A prediction is not reproduced; it is produced, every time, from tokens through a model on hardware that draws power. The thousandth request costs as much as the first. The fixed cost of training is still enormous, so the story is half right, but the half that is wrong is the half a finance team lives in: a cost of goods sold line that rises with usage, and a gross margin that can fall as the product succeeds. Software margins assumed volume was free. Inference margins have to be earned per request.

Real world

The summariser that got cheaper by writing less (constructed). A team ships a document summariser and prices it in their head by the size of the documents: long inputs, so a dear feature. The bill says otherwise. At the list prices above a request reading 1,200 tokens on Claude Opus 5 costs 0.006 dollars for the reading and 0.0075 for a 300-token summary; the summary is more than half the cost. Cutting the summary from 300 tokens to 150 saves more than trimming the input by a third would. The story is invented; the arithmetic is the list price times the token counts, and it is the reason to price the two halves of a request separately.

Part 2 · covers the constructed workload and the monthly bill

One request, priced token by token, times two million

5 min live

The workload is constructed: 2,000,000 requests a month, 1,200 input tokens and 300 output tokens each. It is a plausible shape for a customer-facing assistant and it is invented, so the bills below are arithmetic, not evidence. The arithmetic: 2,000,000 requests times 1,200 tokens is 2,400 million input tokens; times 300 is 600 million output tokens. At Claude Opus 5's list prices that is 2,400 times 5 plus 600 times 25, or 12,000 plus 15,000, which is 27,000 dollars a month. Claude Sonnet 5 comes to 4,800 plus 6,000, 10,800 dollars. Claude Haiku 4.5 comes to 2,400 plus 3,000, 5,400 dollars.

ONE REQUEST, PRICED TOKEN BY TOKEN the input is four times longer; the output costs more 1,200 input tokens 300 output tokens x 5 Claude Opus 5, list prices dated 25 September 2026 1,200 / 1,000,000 x 5 = 0.0060 300 / 1,000,000 x 25 = 0.0075 = 0.0135 dollars a request model input, per M output, per M per request per month at 2,000,000 Claude Opus 55250.013527,000 Claude Sonnet 52100.005410,800 Claude Haiku 4.5150.00275,400 List prices as published on 25 September 2026: re-check before you decide. Only three of the listed models are named here. Constructed workload: 2,000,000 requests a month, 1,200 tokens in, 300 out. Per request x 2,000,000 is the bill.
🔍 Click to zoom - the short amber bar costs more than the long hatched one, because output is priced five times input on all three models
LiveThe monthly bill, and what it is a bill for3 min▶

The three bills. 27,000, 10,800 and 5,400 dollars a month for the same constructed 2,000,000 requests, a factor of five between the dearest and the cheapest. That factor is the reason model choice is a cost decision before it is a quality decision: if the cheaper model does the job as well on your evaluation set, the difference is margin. If it does not, the difference is the price of quality, and it is now a number rather than a feeling.

What the bill is not. It is not the cost of the feature. It is the marginal cost of the feature's requests. The engineers who built it, the evaluation harness, the on-call, the retrieval index the requests read from: all of those are fixed costs that the API bill does not carry and that an honest cost per request has to be spread over the volume, which is the utilisation question of Part 3.

Where the workload came from. It is invented. Real workloads have a distribution of input and output lengths, not a point, and the mean of a distribution is what the bill charges; a tail of long conversations can dominate. The first thing to do with a real product is to pull the token counts from the logs and replace the two constants with two means and two 95th percentiles.

Self-studyCaching as a marginal-cost cut, and latency as a cost2 min▶

Caching. Cache reads are listed at about a tenth of the input price. If 1,000 of the 1,200 input tokens are a system prompt and a shared context that every request repeats, a constructed share and a plausible one, the input cost of a Claude Opus 5 request falls from 0.006 to 0.001 for the 200 fresh tokens plus 0.0005 for the 1,000 cached, 0.0015 in total, and the request from 0.0135 to 0.009. Over the constructed month that is 18,000 instead of 27,000. The list also prices cache writes; add that line from the list before you count the saving. Caching is the rare cost lever that cuts c itself rather than N.

Latency. A request that takes four seconds instead of one is not dearer on the bill, and it is dearer to the business: a user who waits leaves, an agent that waits blocks the request behind it, a batch that waits ties up the machine. Latency is a cost with no line on the invoice, which is why it needs its own number, measured, next to c. The two trade against each other: a smaller model is cheaper and faster, a cached prefix is cheaper and faster, a longer output is dearer and slower. When a lever moves both the same way it is not a trade-off, and those are the levers to pull first.

Real world

The month the bill doubled and the traffic did not (constructed). A team's API bill rises 90 percent in a month on 5 percent more requests. The logs explain it: a prompt change added a worked example to the system prompt, and the mean input length went from 1,200 tokens to 2,300. Nothing about the product changed; c changed. The story is invented; the lesson is that c is a function of the prompt, and a prompt is a cost decision that engineers make without a finance review.

Part 3 · covers utilisation and the break-even volume

Utilisation, and the volume where owning wins

5 min live

Owning a model means paying a fixed monthly cost F, for hardware, hosting and the people who keep it up, whether or not a request arrives. No public list prices that, and no figure is asserted here: F is a variable the page moves. What owning does is turn a marginal cost into a fixed one, and a fixed cost has a utilisation problem: F spread over N requests is F over N per request, which falls as N rises. Rent costs c per request at every N. Owning wins when F over N drops below c, which is the same as N rising above F over c. That quotient is the break-even volume, and it is the only sentence the decision needs.

ONE FIXED COST, SPREAD THIN OR THICK the same F, three volumes; the bar is F / N, the dashed line is what renting costs per request F 40,000 a month invented utilisation N = 1,000,000 N = 2,000,000 N = 4,000,000 0.04 each 0.02 each 0.01 each Opus 5 rent: 0.0135 each F / N: dearer than rent F / N: still dearer F / N: now cheaper the box is mostly idle the constructed month past N* = 2,962,963 Owning moves the cost from the request to the calendar; it pays off only if the requests come. Here they come at 4,000,000.
🔍 Click to zoom - the bar is the same 40,000 dollars every time; only the pile it is spread over changes, and the amber bar is the first one under the rent line
LiveBreak-even is one division, and F is a slider3 min▶

The division. Rent costs c times N a month; own costs F. Set them equal and N star is F over c. With c at 0.0135 for Claude Opus 5 at the list prices and an invented F of 40,000 dollars a month, N star is 40,000 over 0.0135, about 2,962,963 requests a month. The constructed workload is 2,000,000, under N star, so on those numbers renting Opus 5 at 27,000 a month beats owning at 40,000. Raise the volume past 2.96 million and the flat line wins; halve F to 20,000 and N star halves to about 1,481,481, which the workload clears.

Why F is a slider and not a number. The fixed cost of owning depends on hardware you have not priced, a hosting contract you have not signed, an on-call rota you have not staffed, and a utilisation you have not measured. Any single figure would be a guess dressed as a fact. So the page carries none. It varies F across a range and shows the break-even as a function of it, and the honest output is a table, not a point: at F of 20,000, 40,000 and 80,000, N star for Opus 5 is about 1.48, 2.96 and 5.93 million requests a month. Your F comes from your quotes, and the division is the same.

The cheaper model moves the break-even the other way. Renting Claude Haiku 4.5 costs 0.0027 a request, so N star at F of 40,000 is about 14.8 million requests a month. The cheaper the rented model, the more volume owning needs to justify itself. If a smaller model passes your evaluation, owning is usually not the next question; it is the answer to a question you no longer have.

Self-studyWhat the flat line hides2 min▶

Capacity. A flat F is flat until the box is full. Past its capacity a second box is needed and F steps up, so the own line is a staircase, not a line, and the break-even arithmetic holds only on the first step. If your volume sits just past N star, the first extra step can put you back on the rent side.

Peak against mean. Owning has to be sized for the busiest hour, not the average one; renting charges the average. A workload with a sharp daily peak needs a bigger box than its monthly mean suggests, which raises F and moves N star out. The quantity that decides this is the ratio of peak to mean load, and it is measurable from a week of logs.

The people. Hardware is the visible part of F. The team that patches, upgrades, monitors and answers the pager at three in the morning is the part that is left out of a quote and turns up in the salary line. Put it in F before the division, or the break-even is a marketing number.

Move the fixed cost and watch the break-even move. The cost per request is fixed by the list prices and the constructed 1,200 in and 300 out; F is invented, so it is yours to drag. The constructed workload is 2,000,000 requests a month.

Real world

The box that ran at a fifth of capacity (constructed). A platform team takes on a model to stop paying by the request. Six months later the box is busy one hour in five, the on-call rota has three names on it, and the per-request cost, F over the requests that actually came, is above the list price they left. Nobody did the division with a measured N; they did it with the N from the business case. The story is invented; the failure is the general one: a fixed cost is a bet on volume, and the bet is only as good as the forecast.

Build-along

A cost function, a monthly bill, and a break-even table

★ 22 min · everyone builds

Six steps in plain Python, no data download. The prices are the list prices as published on 25 September 2026 and the code carries that date in a constant; the workload and every F are invented and the code says so. Nothing in the file prices a GPU, and the last step checks that it does not.

THE CALCULATOR AS A MACHINE 1 · list prices 5/25, 2/10, 1/5 dollars per M 2 · per request c = tok / 1e6 x price, in+out 3 · x 2,000,000 27,000 / 10,800 / 5,400 a month 4 · F, invented 20,000, 40,000 or 80,000 5 · N* = F / c Opus 5, 40,000: 2.96M requests 6 · say it range, dated re-check prices Stations 1 to 3 are the rent side. Station 4 is the only invented number, so the page varies it. Station 5 is where they meet. Write c with the date of the price list in the docstring. A break-even computed on a stale list is a stale break-even.
🔍 Click to zoom - the amber station is the only invented input; the navy one is the only function; everything else is multiplication

The price list, dated. Three models, input and output prices per million tokens, and the cache-read share. The date is a constant so that every number downstream can say where it came from.

★ Step 1 · the list, with its date# list prices as published on 25 September 2026, dollars per million tokens # re-check before you decide; the list carries more models than these three PRICE_LIST_DATE = "2026-09-25" PRICES = { # (input, output) "Claude Opus 5": (5.00, 25.00), "Claude Sonnet 5": (2.00, 10.00), "Claude Haiku 4.5": (1.00, 5.00), } CACHE_READ_SHARE = 0.10 # cache reads cost about a tenth of the input price def cost_per_request(model, in_tokens, out_tokens, cached_tokens=0): """Dollars for one request at the list prices dated PRICE_LIST_DATE. Pure marginal cost: no fixed part, and nothing here prices hardware.""" p_in, p_out = PRICES[model] fresh = in_tokens - cached_tokens return ((fresh / 1e6) * p_in + (cached_tokens / 1e6) * p_in * CACHE_READ_SHARE + (out_tokens / 1e6) * p_out) print(round(cost_per_request("Claude Opus 5", 1200, 300), 4)) # 0.0135

The constructed workload and the monthly bill. Two million requests, 1,200 in and 300 out. The three bills are arithmetic on the list; the workload is invented and the comment says so.

★ Step 2 · the billREQUESTS = 2_000_000 # constructed workload, invented for teaching IN_TOK, OUT_TOK = 1200, 300 for m in PRICES: c = cost_per_request(m, IN_TOK, OUT_TOK) print(f"{m:17s} {c:.4f} a request {c * REQUESTS:>9,.0f} a month") # Claude Opus 5 0.0135 a request 27,000 a month # Claude Sonnet 5 0.0054 a request 10,800 a month # Claude Haiku 4.5 0.0027 a request 5,400 a month

Split the bill into its two halves. Input and output separately, because output is priced five times input and the short half is the dear half. This is the check that catches a long-answer feature before the invoice does.

★ Step 3 · input against outputfor m, (p_in, p_out) in PRICES.items(): month_in = REQUESTS * IN_TOK / 1e6 * p_in month_out = REQUESTS * OUT_TOK / 1e6 * p_out print(f"{m:17s} input {month_in:>7,.0f} output {month_out:>7,.0f} " f"output share {month_out / (month_in + month_out):.0%}") # Claude Opus 5 input 12,000 output 15,000 output share 56% # Claude Sonnet 5 input 4,800 output 6,000 output share 56% # Claude Haiku 4.5 input 2,400 output 3,000 output share 56%

Utilisation: one F, three volumes. F is invented. Spread it over more or fewer requests and compare the result with c; the crossing is visible before any formula.

★ Step 4 · F over NF = 40_000 # invented fixed monthly cost of owning; yours comes from quotes c_opus = cost_per_request("Claude Opus 5", IN_TOK, OUT_TOK) for n in (1_000_000, 2_000_000, 4_000_000): own = F / n print(f"N = {n:>9,} own {own:.4f} a request rent {c_opus:.4f} " f"{'own wins' if own < c_opus else 'rent wins'}") # N = 1,000,000 own 0.0400 a request rent 0.0135 rent wins # N = 2,000,000 own 0.0200 a request rent 0.0135 rent wins # N = 4,000,000 own 0.0100 a request rent 0.0135 own wins

The break-even table. N star is F over c, for three invented values of F and the three models. The output is a table because F is not known; the reader finds their row.

★ Step 5 · N* = F / cdef break_even(model, F, in_tokens=IN_TOK, out_tokens=OUT_TOK): """Requests a month at which a fixed cost F equals the rented bill.""" return F / cost_per_request(model, in_tokens, out_tokens) print("F (invented) " + " ".join(f"{m:>16s}" for m in PRICES)) for F in (20_000, 40_000, 80_000): row = " ".join(f"{break_even(m, F):>16,.0f}" for m in PRICES) print(f"{F:>12,} {row}") # F (invented) Claude Opus 5 Claude Sonnet 5 Claude Haiku 4.5 # 20,000 1,481,481 3,703,704 7,407,407 # 40,000 2,962,963 7,407,407 14,814,815 # 80,000 5,925,926 14,814,815 29,629,630

The cached variant, the sentence, and the assertion. A constructed 1,000 of the 1,200 input tokens served from cache cuts c; the sentence carries the date and the word invented; the assertion proves no hardware price crept into the model.

★ Step 6 · say it, and check the fileimport inspect c_cached = cost_per_request("Claude Opus 5", IN_TOK, OUT_TOK, cached_tokens=1000) # 1,000 cached: constructed share print(round(c_cached, 4), round(c_cached * REQUESTS)) # 0.009 18000 # the list also prices cache writes; add that line from the list before counting the saving sentence = (f"At list prices dated {PRICE_LIST_DATE}, a constructed month of {REQUESTS:,} requests " f"costs {c_opus * REQUESTS:,.0f} to rent on Claude Opus 5; owning beats renting only above " f"{break_even('Claude Opus 5', F):,.0f} requests a month if the fixed cost is {F:,}, " f"which is invented. Re-check the list before you decide.") print(sentence) src = inspect.getsource(cost_per_request) + inspect.getsource(break_even) assert "gpu" not in src.lower() and "hour" not in src.lower() # no hardware price anywhere, on purpose

Keep the date next to the prices and the word invented next to F. When the list changes, one constant changes and every number downstream follows. When someone asks where 40,000 came from, the comment answers before you have to. A cost model that cannot say the date of its prices is a cost model nobody should sign.

Homework

Before deep-dive session 5

30 min
  1. Replace the two constants with two measurements. Pull the mean and the 95th percentile of input and output tokens for one real feature from its logs and re-run steps 2 and 3. Write one sentence on which half of the request is the dear half.
  2. Re-check the list. Open the current price page, compare it with the constants in step 1, and change the date constant if anything moved. Note how far the break-even moved.
  3. Price your own F. Write every monthly line owning would carry, with the people included, and put the total through step 5. Say which side of N star your measured volume sits on, and by how much.
  4. Find the cache share. Count how many of your input tokens are the same on every request. Re-run step 6 with that number, and add the cache-write line from the list.
Check yourself

Three questions

Clear all three and deep-dive session 4 gets stamped in your passport.

1 · Why is per-token API pricing described as a pure marginal cost, and why does that matter for the old software story?

The vendor's fixed cost of training is enormous, but the buyer sees only c. Shapiro and Varian's reported story is half right: expensive to produce, but not cheap to reproduce, because a prediction is not reproduced.

2 · The constructed month on Claude Opus 5 costs 27,000 dollars: 12,000 for input and 15,000 for output. The input is four times longer than the output. Why is the output the dear half?

The same ratio holds on all three models named, 10 against 2 and 5 against 1, so the output share of the bill is 56 percent on each at this token mix. The check is step 3: split the bill before the invoice does it for you.

3 · With c at 0.0135 a request and an invented F of 40,000 dollars a month, which is cheaper for the constructed 2,000,000 requests, and what is the honest way to publish the answer?

At F of 20,000 the break-even halves to about 1,481,481 and the workload clears it. No GPU price is asserted anywhere, because none is known; the division is the same for whatever F your quotes produce.

Sources covered

What this session teaches, and where it came from

✓Fixed against marginal cost; break-even volume as F over c; utilisation as a fixed cost spread over volumeStandard economics, no single source
✓Anthropic list prices: Claude Opus 5 5 and 25, Claude Sonnet 5 2 and 10, Claude Haiku 4.5 1 and 5 dollars per million tokens; cache reads about a tenth of inputList prices as published on 25 September 2026, read live; the list carries more models and the page names only these three; re-check before deciding
✓The 2,000,000-request workload at 1,200 in and 300 out; the bills of 27,000, 10,800 and 5,400; N star of about 2,962,963 for Opus 5 at F of 40,000Constructed workload and invented F, arithmetic on the list prices; the page varies F and asserts no self-hosting cost
✓The near-zero marginal cost of information goods, and why inference does not share itShapiro and Varian 1998, Information Rules, reported; the inference argument is standard cost accounting applied to per-token pricing
◐Any GPU hourly price or self-hosting costNot claimed; F is a slider and a labelled variable
◐Network effects, data moats and the learning curve that flattensNamed as deep-dive session 5; not taught here

Every fact on this page, and its verification tier, is recorded in the course's source map.

Deep-dive session 4 cheat sheet · pin this

Rent = c x NNo fixed part. c = tokens over a million, times the price, input plus output.
Output is the dear half25 against 5, 10 against 2, 5 against 1. 300 out costs more than 1,200 in.
The bill, constructed month27,000 Opus 5 · 10,800 Sonnet 5 · 5,400 Haiku 4.5. List dated 25 Sep 2026.
Own = F, flatF over N per request. Falls as N rises, steps up when the box is full.
N* = F / c40,000 over 0.0135 is about 2.96M a month. F is invented; publish a range.
Caching cuts c, not NCache reads about a tenth of input. Check the write line on the list too.