---
title: LLM cost and unit economics
url: https://gurkanozkan.ai/learn/topics/cost/
markdown: https://gurkanozkan.ai/learn/topics/cost.md
kind: topic
tracks:
  - Applied LLM
  - AI leadership
json: https://gurkanozkan.ai/api/learn/topics/cost.json
---

# LLM cost and unit economics

Cost questions check whether you can turn traffic into tokens and tokens into money, then cut the bill without hurting quality. Applied engineers are expected to estimate monthly spend from volumes and prices, know the levers (routing and cascades, prompt caching, batch APIs, shorter prompts and outputs, distillation, self-hosting at realistic utilisation) and measure cost per successful task. Leads are tested on unit economics, ROI attribution, budgets and build-versus-buy. Prices for a fixed level of capability have been falling by at least an order of magnitude a year (Epoch AI measured 9× to 900× a year depending on the task), so always state your price assumptions and show how sensitive the answer is to them.

## Key concepts

### Token arithmetic

Cost per request = input tokens × input price + output tokens × output price; output costs several times more per token (5× across Anthropic's current price list). Count everything that is sent: system prompt, tool definitions, retrieved context, conversation history, retries, evaluation and judge traffic, and hidden reasoning tokens, which are billed as output. Tokenisers differ (Anthropic notes its newer tokeniser produces about 30% more tokens for the same text), so compare models on measured cost per task, not on list price per token.

### Cost per successful outcome

The unit that matters is cost per resolved ticket, accepted summary or approved document: model cost divided by success rate, plus human review, escalations and the cost of errors. Compare it with the value per outcome to get a margin, and track that margin as usage and prices change.

### Prompt and prefix caching

Providers and self-hosted engines reuse computation for an identical token prefix. On Anthropic's API, a 5-minute cache write costs 1.25× the base input price, a 1-hour write 2×, and a read about 0.1× (lower on some newer models); other providers discount cached tokens automatically. Put static content first (instructions, tools, documents) and variable content last, keep history append-only and never put timestamps or request IDs at the top. A semantic response cache is different: it returns stored answers for similar questions and risks wrong or cross-tenant answers.

### Batch APIs

For work that can wait, OpenAI's and Anthropic's batch APIs charge 50% of the synchronous price, with results within 24 hours (often much sooner). Nightly enrichment, evaluation runs, backfills and non-urgent triage are natural fits; batch and caching discounts can stack.

### Routing, cascades and distillation

Send easy requests to a cheap model and hard ones to an expensive model, either with a learned router (RouteLLM trains routers on preference data) or a cascade that escalates when a verifier or calibrated confidence check fails (FrugalGPT). Plot quality against cost across thresholds and account for the latency and double cost of escalated requests. For narrow, high-volume tasks, distil a large model's outputs into a small fine-tuned model, checking the provider's terms first.

### Self-hosting economics

Self-hosted cost per request = GPU cost per hour ÷ requests served per hour at the utilisation you actually achieve. Capacity must cover peaks and redundancy, so average utilisation sits well below capacity (about one-third if you provision for peaks at 3× the average), and on-call, upgrades and evaluation need people. Self-hosting tends to win on cost only at high, steady volume, or when residency, latency control or customisation force it; hybrids are common.

### Agent and reasoning multipliers

Reasoning modes add output tokens you do not see; agents re-send a growing context at every step, so input grows roughly quadratically with step count, and Anthropic reported agents using about 4× and multi-agent systems about 15× the tokens of a chat. Budget steps and tokens per task, and cache the shared prefix. Effort or thinking-budget settings are now the main dial: Anthropic reported Opus 4.5 at medium effort matching Sonnet 4.5's best SWE-bench Verified score with 76% fewer output tokens, so measure cost per task at each effort level.

### ROI and budgets for leads

Take a baseline before rollout, use controlled comparisons (A/B tests, staggered rollouts, difference-in-differences), count full cost (people, compute, licences, change management) and separate adoption, productivity and business impact; be candid about attribution limits. A budget usually has lines for API and GPU spend, people, data and labelling, evaluation, tooling, security and compliance, and a contingency for price and volume changes.

## Worked examples

### Estimate an email-triage bill, then cut it five-fold

An email-triage feature handles 200,000 emails a day at about 1,500 input and 200 output tokens each. Estimate the monthly cost at $3/$15 per million input/output tokens (a mid-tier model) and at $0.25/$1.25 (a small model). Then cut the mid-tier bill at least five-fold. Prices are assumptions; check current list prices.

**Solution**

**Volume.** Input 200,000 × 1,500 = 300M tokens a day; output 200,000 × 200 = 40M a day.
Over 30 days: **9B input** and **1.2B output** tokens.

**Baseline.**
- Mid-tier: 9,000M × $3/M = $27,000; 1,200M × $15/M = $18,000 → **$45,000 a month**
- Small: 9,000 × $0.25 = $2,250; 1,200 × $1.25 = $1,500 → **$3,750 a month**

Note that output is only 12% of the tokens but 40% of the mid-tier bill.

**Cutting the mid-tier bill, lever by lever:**

| Lever | Assumption | Monthly cost |
|---|---|---|
| Start | | $45,000 |
| Cache the static 1,000-token prefix | effective input = 500 + 1,000 × 0.1 = 600 tokens (40%); input $27,000 → $10,800 | $28,800 |
| Shorter structured output | 200 → 60 tokens; output $18,000 → $5,400 | $16,200 |
| Batch API for non-urgent mail | 60% of volume at 50% off: × (0.4 + 0.6 × 0.5) = × 0.7 | $11,340 |
| Route to a small model | 70% handled by a model 12× cheaper, 10% of those escalate and pay twice | ≈ $4,860 |

Routing arithmetic: the expensive model still sees 30% + 7% = 37% of traffic → 0.37 × $11,340 =
$4,196; the small model sees 70% at 1/12 the price → 0.7 × $11,340 / 12 = $662. Total ≈ **$4,860,
about 9× cheaper**. With a 2.3-emails-per-second steady flow, the 5-minute cache stays warm, so cache
writes are negligible. Rules that skip newsletters and auto-replies before any model call cut further.

**Guard quality**: run the regression eval suite on each lever, especially routing thresholds.

**Follow-up: the bill doubles while traffic grows 10%.** Attribute cost by feature, model and tenant,
then check prompt growth (new few-shot examples, unbounded history), a collapsed cache-hit rate (someone
put a timestamp at the top), retry storms, a routing change, longer outputs, eval jobs on production keys
and abuse.


### When does self-hosting beat the API?

Compare a hosted small model at $0.25/$1.25 per million tokens with self-hosting an open-weight model of similar quality. Requests average 1,500 input and 200 output tokens. Assume a rented GPU costs $2.50 an hour and sustains 5 requests a second for this request shape (measure this in a load test), capacity is provisioned for peaks at 3× average with at least 2 replicas, and operating it takes half an engineer ($100k a year, about $8,300 a month). Find the break-even daily volume.

**Solution**

**Hosted cost per 1,000 requests:** 1.5M × $0.25/M + 0.2M × $1.25/M = $0.375 + $0.25 = **$0.625**.

**Self-hosted cost per 1,000 requests at full utilisation:** 5 × 3,600 = 18,000 requests per GPU-hour →
$2.50 / 18 = **$0.139**. At the roughly one-third average utilisation that 3× peak provisioning implies:
about **$0.42**. The headline 4.5× saving shrinks to about 1.5× before any staff cost.

**Monthly totals** (30 days; 720 GPU-hours = $1,800 per GPU per month):

| Daily volume | Hosted | Peak req/s | GPUs | Self-hosted (GPUs + staff) |
|---|---|---|---|---|
| 200k | $3,750 | 6.9 | 2 | $3,600 + $8,300 = $11,900 |
| 1M | $18,750 | 34.7 | 7 | $12,600 + $8,300 = $20,900 |
| 1.5M | $28,125 | 52.1 | 11 | $19,800 + $8,300 = $28,100 |
| 2M | $37,500 | 69.4 | 14 | $25,200 + $8,300 = $33,500 |

Peak req/s = 3 × daily volume / 86,400; GPUs = max(2, ⌈peak / 5⌉).

**Break-even ≈ 1.5M requests a day** under these assumptions. Below it the API wins clearly; above it
self-hosting saves 10–30%, more if batch work fills the night-time troughs. Because hosted prices keep
falling, recheck the comparison every quarter. In a UK bank or healthtech the deciding factors are often
data residency, latency control and fine-tuning rather than price, and the hybrid answer (a self-hosted
small model for the high-volume simple path, a frontier API for the hard cases) is common.


### Showing ROI for a coding-assistant rollout

You rolled out an AI coding assistant to 200 engineers: $40 per seat per month in licences plus about $30 per seat per month of usage-based API spend, and half an engineer ($100k a year) for enablement and governance. Loaded engineering cost is about $200k per engineer per year. How do you show whether it paid off?

**Solution**

**Full cost.** ($40 + $30) × 200 × 12 = $168,000 + $100,000 = **$268,000 a year**.

**Measurement design.** Roll out in waves (four cohorts a month apart) and use difference-in-differences:
compare each cohort's change in a basket of delivery metrics (lead time for changes, merged PRs per
engineer-week, incident and rollback rate as a quality guardrail) with not-yet-treated cohorts over the
same weeks. Suppose treated cohorts improve throughput by 12% and controls by 3%: an effect of **9%**,
95% confidence interval **4%–14%**, with no rise in change-failure rate.

**Value.** Engineering spend is 200 × $200k = $40M a year.
- Point estimate: 9% × $40M = $3.6M of capacity → ROI = (3.6 − 0.268) / 0.268 ≈ **12×**
- Lower bound: 4% × $40M = $1.6M → ROI ≈ **5×**

Lead with the conservative figure.

**Candour about limits.** Capacity is not cash: value is realised only if freed time goes to roadmap
work or avoids hiring. PR counts can be gamed, novelty effects fade, and rework or security issues add
hidden cost, so re-measure at six months, keep the quality guardrails and report adoption (weekly active
users), productivity and business impact separately.


## What changed recently

- **Sep 2026: Frontier models are now sold on cost per task.** Anthropic priced Claude Opus 5.5 at $4/$20 per million input/output tokens, 20% below Opus 5, but led with claims that at default settings it costs 40% less than Opus 5 on typical workloads and matches or beats rivals on several benchmarks at 20–40% of their cost per task. Default effort is medium, while most headline scores use max effort. Compare models on measured cost per successful task at the effort you will actually run, not on list price. [Source](https://www.anthropic.com/news/claude-opus-5-5)
- **Nov 2025: Effort settings become the main cost dial.** With Claude Opus 4.5, Anthropic cut Opus pricing to $5/$25 (from $15/$75) and added an effort parameter; at medium effort it matched Sonnet 4.5's best SWE-bench Verified score while using 76% fewer output tokens. Reasoning budgets now move cost per task more than list prices do, so cost models must include effort level, output length and retries. [Source](https://www.anthropic.com/news/claude-opus-4-5)
- **Sep 2025: Sparse attention arrives with a 50% price cut.** DeepSeek released V3.2-Exp with DeepSeek Sparse Attention and cut its API prices by more than 50% while reporting benchmark parity with the previous model. It is a clear case of architecture changes for cheaper long-context inference flowing straight into price, and a reason to assume continued falls for a fixed capability in multi-year plans. [Source](https://api-docs.deepseek.com/news/news250929)
- **Apr 2025: AI Index 2025: 280-fold fall in inference cost.** Stanford's AI Index reported that the cost of querying a model at GPT-3.5 level fell more than 280-fold between November 2022 and October 2024, with hardware costs falling about 30% a year and energy efficiency improving about 40% a year. Use such figures to argue for short payback periods and price-review clauses, while noting that reasoning and agent workloads can still raise total spend. [Source](https://hai.stanford.edu/ai-index/2025-ai-index-report)

## Pitfalls

- Forgetting that output tokens cost several times more than input, or leaving out tool definitions, history, retries and reasoning tokens.
- Comparing per-token list prices across models whose tokenisers and verbosity differ instead of measuring cost per task.
- Comparing a GPU-hour price with an API price without utilisation, redundancy and staff.
- Putting timestamps, user IDs or retrieved documents at the start of the prompt, which destroys prefix-cache hits.
- Downgrading to a cheaper model without a regression eval, or a one-off cost cut with no ongoing per-feature cost visibility.
- Reporting usage or licences as value; ignoring human-review and rework costs.

## How interviewers probe it

- 'Estimate the monthly cost': show the arithmetic aloud, state price assumptions, then give a sensitivity range.
- 'Cut it five-fold': list levers in order of effort and saving, with the quality checks for each.
- 'The bill doubled while traffic rose 10%': a cost-attribution debugging exercise.
- 'Should we self-host?': break-even with utilisation, redundancy and staff; residency and customisation; the hybrid option.
- Lead: 'The CFO wants spend halved in two quarters', 'Draft next year's AI budget', 'Prove the copilots paid off'.
- Product: 'Does this AI feature make economic sense?' — cost per successful outcome against value and pricing.

## Reading

- [Pricing (Claude API documentation)](https://platform.claude.com/docs/en/about-claude/pricing) (Docs, 15 min, Intro): A current, detailed price sheet showing input/output, cache, batch and tool-use pricing in one place.
- [Prompt caching (Claude API documentation)](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) (Docs, 25 min, Core): How prefix caching works, write and read multipliers, minimum lengths and how to structure prompts for hits.
- [Batch API (OpenAI documentation)](https://developers.openai.com/api/docs/guides/batch) (Docs, 15 min, Intro): The asynchronous 50%-discount route for work that can wait up to 24 hours.
- [FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance](https://arxiv.org/abs/2305.05176) (Paper, 40 min, Core): Cascades, prompt adaptation and approximation as systematic cost levers.
- [RouteLLM: Learning to Route LLMs with Preference Data](https://arxiv.org/abs/2406.18665) (Paper, 45 min, Deep): How to train and evaluate a strong/weak model router on a quality–cost curve.
- [Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizes](https://arxiv.org/abs/2305.02301) (Paper, 40 min, Deep): Evidence that small distilled models can match large ones on narrow tasks.
- [LLM inference prices have fallen rapidly but unequally across tasks](https://epoch.ai/data-insights/llm-inference-price-trends) (Blog, 10 min, Core): Task-dependent rates of price decline, a nuance to add to the 10× rule of thumb.
- [Effort (Claude API documentation)](https://platform.claude.com/docs/en/build-with-claude/effort) (Docs, 15 min, Core): How effort levels trade output tokens for capability, which is why cost per task, not price per token, is the unit to compare.

## Practise this topic

- [Estimate the monthly LLM cost of an email-triage feature handling 200k emails a day at about 1,500 input and 200 output tokens each. Then cut it five-fold…](https://gurkanozkan.ai/learn/questions/applied-llm-srv-07.md)
- [How do provider prompt caching and self-hosted prefix caching work, how do you structure prompts to benefit, and how is a semantic response cache different?](https://gurkanozkan.ai/learn/questions/applied-llm-srv-06.md)
- [When would you self-host an open-weight model instead of using a hosted API? Walk through the decision for a UK healthtech or bank.](https://gurkanozkan.ai/learn/questions/applied-llm-srv-08.md)
- [Design a router that sends easy requests to a cheap model and hard ones to an expensive model. How do you train and evaluate it?](https://gurkanozkan.ai/learn/questions/applied-llm-srv-09.md)
- [Your feature works with a large frontier model but costs too much. How would you distil it into a smaller model, and how do you know it's good enough?](https://gurkanozkan.ai/learn/questions/applied-llm-ft-08.md)
- [Choose between three hosted models and one self-hosted open-weight model for a summarisation feature at 2 million requests a day. Describe the bake-off.](https://gurkanozkan.ai/learn/questions/applied-llm-evl-08.md)
- [LLM inference spend tripled in a quarter as usage grew. The CFO wants it halved within two quarters without hurting the product. Plan it.](https://gurkanozkan.ai/learn/questions/lead-sc-06.md)
- [How do you tell whether an AI feature makes economic sense?](https://gurkanozkan.ai/learn/questions/lead-pr-06.md)
- [How do you show that an AI investment paid off, including spread-out benefits such as staff copilots or coding assistants?](https://gurkanozkan.ai/learn/questions/lead-st-02.md)
- [When would you run open-weight models yourselves instead of calling a commercial API?](https://gurkanozkan.ai/learn/questions/lead-st-10.md)
- [Explain how a subword tokeniser such as byte-level BPE is trained and applied, then tell me how the choice of tokeniser shows up in cost, latency and quality…](https://gurkanozkan.ai/learn/questions/applied-llm-fnd-01.md)
- [Models now accept hundreds of thousands of tokens. When would you put everything in the context window instead of building retrieval, and what failure modes…](https://gurkanozkan.ai/learn/questions/applied-llm-fnd-11.md)
- [When is an orchestrator-plus-sub-agents architecture worth its cost compared with a single agent holding more tools?](https://gurkanozkan.ai/learn/questions/applied-llm-agt-08.md)
- [When does asking a model to reason step by step, or enabling a reasoning mode, help — and what does it cost?](https://gurkanozkan.ai/learn/questions/applied-llm-prm-03.md)
- [Your coding agent is connected to 25 MCP servers exposing about 300 tools, and tool definitions alone consume tens of thousands of tokens before the user's…](https://gurkanozkan.ai/learn/questions/recent-a-agents-03.md)
- [A document-QA product re-sends the same 60k-token contract across many sessions spread over hours, so GPU prefix-cache hits are rare. Would you offload KV…](https://gurkanozkan.ai/learn/questions/recent-a-kvcache-02.md)
- [Model A costs $3 per million input tokens and $15 per million output tokens; model B costs $1 and $5. On your agentic task, A at medium reasoning effort…](https://gurkanozkan.ai/learn/questions/recent-a-cost-01.md)
- [Design a pipeline that turns 50 million PDFs (born-digital reports, scanned forms, papers with tables and equations) into clean text for pretraining and…](https://gurkanozkan.ai/learn/questions/recent-a-datapipe-01.md)
- [You are planning a three-year LLM roadmap. Epoch AI estimated that the price of reaching a fixed capability level fell between 9× and 900× per year depending…](https://gurkanozkan.ai/learn/questions/recent-a-cost-02.md)
- [Your coding agent runs for 300 turns and its context fills with tool output. Design a context-management strategy using what model APIs now offer (context…](https://gurkanozkan.ai/learn/questions/recent-b-long-context-03.md)
- [Your product serves a 70B model in FP8 on Hopper GPUs. Leadership asks whether moving to Blackwell with NVFP4 weights will halve the serving cost. Explain what…](https://gurkanozkan.ai/learn/questions/recent-b-serving-02.md)
- [A product team wants an orchestrator–worker multi-agent 'deep research' feature. Given published figures that multi-agent systems use around 15 times the…](https://gurkanozkan.ai/learn/questions/recent-b-system-design-02.md)
- [GPT-5 shipped as a fast model, a deeper reasoning model and a real-time router between them. Design and evaluate a similar router for your own assistant, which…](https://gurkanozkan.ai/learn/questions/recent-b-system-design-03.md)
- [You run a coding-agent product on a flat £20-a-month plan. Your heaviest 5% of users now cost more in model spend than they pay, because long agentic tasks…](https://gurkanozkan.ai/learn/questions/recent-b-product-growth-02.md)
- [After DeepSeek-R1 (MIT licence, January 2025) and OpenAI's gpt-oss (Apache 2.0, August 2025), your CFO asks why you still pay a frontier API for an internal…](https://gurkanozkan.ai/learn/questions/recent-b-strategy-01.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
