How to read LLM token pricing without fooling yourself
A practical guide to input, output, cached input, and cache-write prices—and the assumptions hiding inside a cost estimate.
· 6 min read
On this page
Loading article…
A practical guide to input, output, cached input, and cache-write prices—and the assumptions hiding inside a cost estimate.
· 6 min read
Loading article…
Find models, providers, pricing pages, and practical guides.
Model pricing tables look simple: two dollar amounts, a model name, and a context window. The expensive mistakes happen in the assumptions between those numbers.
Most providers publish text-model prices in US dollars per one million tokens. A token is not a word. For English prose, one token is often around three quarters of a word, but code, numbers, and non-English text can behave very differently.
The first useful normalization is:
cost = token_count / 1,000,000 × price_per_million
If a model charges $2 per 1M input tokens, a request with 25,000 input tokens costs $0.05 before any output is generated.
Input and output usually have different prices. Do not multiply total tokens by one blended rate unless you have already calculated that rate from your own traffic.
| Field | What it usually means | Common mistake |
|---|---|---|
| Input | Uncached prompt tokens sent to the model | Forgetting system prompts and retrieved documents |
| Output | Tokens generated by the model | Estimating from the maximum limit instead of observed usage |
| Cached input | Reused prompt tokens read from a provider cache | Assuming every eligible token will be a cache hit |
| Cache write | Tokens written into a prompt cache | Treating cache creation as free |
There is no broadly comparable “cached output” price for the text APIs tracked here. Prompt caching applies to reusable input prefixes. That is why LLM Price Lens labels the fourth field Cache write rather than inventing a cached-output number.
Suppose an application sends 40,000 input tokens, receives 2,000 output tokens, and 30,000 of those input tokens are cache hits. With these hypothetical rates:
| Price dimension | Rate | Tokens | Cost |
|---|---|---|---|
| Uncached input | $3.00 / 1M | 10,000 | $0.03 |
| Cached input | $0.30 / 1M | 30,000 | $0.009 |
| Output | $15.00 / 1M | 2,000 | $0.03 |
The request costs $0.069, excluding cache-write charges. For a useful monthly estimate, multiply by actual request volume and model the cache-hit rate as a range—not a promise.
Use this index to compare models quickly, then check the provider's official pricing page before making a purchasing decision. For production cost control, log real input, cached-input, and output usage from API responses and compare the estimate with invoices every month.