Cost Per Token Explained: Read LLM Pricing Like a Pro
Cost per token explained: input vs output pricing, per-million-token math, and how to compare LLM pricing across providers without spreadsheets.
LLM pricing is quoted per million tokens, with separate rates for input and output. Cost per token sounds simple — but output tokens cost 2-10x input tokens, and context length changes the total fast.
Input vs output pricing
Input tokens are everything you send (system prompt, context, user text). Output tokens are what the model generates. Most providers charge significantly more for output — sometimes 2-10x — because generation is compute-heavy.
The per-token math
- Take input tokens ÷ 1,000,000 × input price.
- Take output tokens ÷ 1,000,000 × output price.
- Add the two for total cost.
- Multiply by expected requests per month.
Worked example
Hidden factors that change the real price
- Prompt caching discounts on cached prefixes.
- Batch/async pricing at lower rates.
- Free-tier quotas and trial credits.
- Context length: long prompts raise input cost per call.
- Retries and loops: re-sent context adds up.
Comparing providers fairly
- Compare same task, same length — not just listed prices.
- Factor in cache and batch discounts.
- Include quality: a cheap model that fails costs more in retries.
- Use your real prompt mix, not marketing examples.
FAQ
Why is output more expensive than input?+
Generating tokens is compute-heavy compared to processing input, so providers price output higher — often 2-10x.
How do I compare LLM pricing?+
Use your real prompt mix and compute total monthly cost including output, caching, and batch discounts — not just the listed input price.
What does 1 million tokens mean?+
Roughly 750,000 words of English text, or about 25,000 typical API requests with moderate context.
Related posts
Aug 10, 2026 · Cost control
LLM Token Calculator: How to Estimate and Cut Token CostsHow to estimate LLM token costs: token-per-word ratios, a practical token calculator workflow, and ways to cut token spend by 30-60%.
Aug 16, 2026 · Cost control
LLM API Pricing Comparison 2026: Costs Side by SideLLM API pricing compared in 2026: input/output rates, caching, batch discounts, and how to model total cost across OpenAI, Anthropic, Google, and more.
Aug 18, 2026 · Cost control
The LLM Cost Optimization Playbook for 2026An LLM cost optimization playbook: caching, routing, batching, compression, token hygiene, and monitoring that cuts API spend by 50-80% without cutting quality.