Calculate AI token costs per request, day, month and year — editable pricing per 1M tokens for any model.
Calculate AI token costs per request, day, month and year — editable pricing per 1M tokens for any model.
Enter values above and click Calculate — results will appear here with the formula explained.
AI pricing is per million tokens, separate for input, cached input and output. Output is typically 2-5× input price because generation costs more compute than encoding. Cached input is dramatically cheaper (often ~10% of input price) when providers reuse a repeated prefix. Multiply tokens by price to get cost per request, then by requests per day for daily/monthly/yearly totals.
A token averages ~4 characters or ~0.75 English words, so 1,000 tokens ≈ 750 words. But tokenization varies by language and content: code, non-Latin scripts and long strings tokenize less efficiently, sometimes 2–3× worse than plain English prose. If your workload is multilingual or code-heavy, measure real token counts from API usage dashboards rather than estimating from word counts.
Output length dominates most bills because it is both the priciest token type and the one you control least precisely. A chat assistant emitting 500-token answers at 10,000 requests a day on $15/1M output pricing burns $75/day on output alone. Capping max_tokens, asking for concise formats (bullets, JSON, short answers) and streaming-cutoff logic are the highest-leverage cost controls available — often 2–5× cheaper than switching models.
Prompt caching is the closest thing to free money in AI economics: repeated system prompts, few-shot examples and document prefixes billed at ~10% rates. Anthropic's and OpenAI's caching offerings differ in minimum lengths and TTLs, so structure prompts with stable prefixes first and volatile user content last to maximize cache hits. Batch APIs (typically ~50% off for non-urgent work) and tiered volume pricing stack further savings on top.
Model selection is a price-performance frontier, not a single ranking. A frontier model at $5/$15 per 1M may be 10× the cost of a mini-class model that handles 80% of requests equally well. The production pattern that wins: route simple requests (classification, extraction, short answers) to cheap models, escalate only hard cases, and evaluate quality deltas on your own data — generic benchmarks rarely match your distribution.
All model pricing is user-editable here so the calculator stays correct when providers change prices — and they change them often, usually downward. Re-check provider pricing pages (OpenAI, Anthropic, Google) quarterly, re-run your workload mix, and watch for new discount levers (caching, batch, provisioned throughput) that can halve the bill without touching a line of product code.
Calculate AI token costs per request, day, month and year — editable pricing per 1M tokens for any model. Formula: Cost/request = input/1M×inputPrice + cached/1M×cachedPrice + output/1M×outputPrice. Example: 2,000 input at $5/1M = $0.01, 500 output at $15/1M = $0.0075, total $0.0175 per request.
AI pricing is per million tokens, separate for input, cached input and output. Output is typically 2-5× input price because generation costs more compute than encoding. Cached input is dramatically cheaper (often ~10% of input price) when providers reuse a repeated prefix. Multiply tokens by price to get cost per request, then by requests per day for daily/monthly/yearly totals.
A token averages ~4 characters or ~0.75 English words, so 1,000 tokens ≈ 750 words. But tokenization varies by language and content: code, non-Latin scripts and long strings tokenize less efficiently, sometimes 2–3× worse than plain English prose. If your workload is multilingual or code-heavy, measure real token counts from API usage dashboards rather than estimating from word counts.
Output length dominates most bills because it is both the priciest token type and the one you control least precisely. A chat assistant emitting 500-token answers at 10,000 requests a day on $15/1M output pricing burns $75/day on output alone. Capping max_tokens, asking for concise formats (bullets, JSON, short answers) and streaming-cutoff logic are the highest-leverage cost controls available — often 2–5× cheaper than switching models.
Prompt caching is the closest thing to free money in AI economics: repeated system prompts, few-shot examples and document prefixes billed at ~10% rates. Anthropic's and OpenAI's caching offerings differ in minimum lengths and TTLs, so structure prompts with stable prefixes first and volatile user content last to maximize cache hits. Batch APIs (typically ~50% off for non-urgent work) and tiered volume pricing stack further savings on top.
Model selection is a price-performance frontier, not a single ranking. A frontier model at $5/$15 per 1M may be 10× the cost of a mini-class model that handles 80% of requests equally well. The production pattern that wins: route simple requests (classification, extraction, short answers) to cheap models, escalate only hard cases, and evaluate quality deltas on your own data — generic benchmarks rarely match your distribution.
All model pricing is user-editable here so the calculator stays correct when providers change prices — and they change them often, usually downward. Re-check provider pricing pages (OpenAI, Anthropic, Google) quarterly, re-run your workload mix, and watch for new discount levers (caching, batch, provisioned throughput) that can halve the bill without touching a line of product code.
2,000 input at $5/1M = $0.01, 500 output at $15/1M = $0.0075, total $0.0175 per request. At 1,000 requests/day = $17.50/day, $525/month, $6,387/year. With 1,000 cached at $0.50/1M, save $0.0045 per request. A routing scenario: moving 80% of those requests to a $0.50/$1.50 mini model cuts the yearly bill to roughly $1,500 — same product, ~75% cheaper.
Formulas are standard public references (see our methodology). External standards are cited in the text where they apply.
Last reviewed: September 2026 · Report an error