Skip to content
TheCalcUniverse

AI Token Pricing Calculator — Compare GPT-4o, Claude, Gemini Costs

Compare token pricing across 12 models from 6 providers: GPT-5, Claude 4.7, Gemini 3.1, DeepSeek V3, Grok 3, Llama 4. Free, instant, and accurate.

✓ Tested formula & cited sources Formula verified 2026-05-18 Runs in your browser — inputs never sent anywhere

See it worked out

Example — Prompt Tokens per Request 500, Completion Tokens per Request 150, Daily Active Users (optional) 10000, Requests per User per Day (optional) 5:

Model

GPT-5

Provider

OpenAI

Prices Last Updated

2026-05-02

Input Price (per 1M tokens)

$15.00

Output Price (per 1M tokens)

$60.00

Prompt Tokens

500

Completion Tokens

150

Input Cost per Request

$0.00750000

Output Cost per Request

$0.00900000

Cost per Request

$0.0165

Total Monthly Tokens

19,500

Estimated Monthly Cost

$24.75K

Estimated Annual Cost

$297.00K

Cost per User per Month

$2.4750

Requests per Day

50,000

The formula

Cost = (PromptTokens / 1M × InputPrice) + (CompletionTokens / 1M × OutputPrice)

Prompt Tokens
Input Tokens
Completion Tokens
Output Tokens
Input Price
Price per 1M Input Tokens
Output Price
Price per 1M Output Tokens
Cached Input
Cached Input Price

Worked example — Prompt Tokens per Request 500, Completion Tokens per Request 150, Daily Active Users (optional) 10000, Requests per User per Day (optional) 5

Cost per Request = $0.0165

Full explanation ↓

How AI Token Pricing Works

Cost = (PromptTokens / 1M × InputPrice) + (CompletionTokens / 1M × OutputPrice)

AI model pricing is based on token usage, split between input (prompt) tokens and output (completion) tokens. Output tokens typically cost 3-6x more than input tokens because generating tokens requires sequential compute. Prompt caching can reduce input costs by up to 90% for repeated context blocks.

Prompt Tokens
Input TokensTokens in the user prompt / system message. Includes system instructions, conversation history, and the user's current query.
Completion Tokens
Output TokensTokens generated by the model in its response. Depends on task complexity and model's response style.
Input Price
Price per 1M Input TokensCost per million tokens for the prompt portion. Ranges from $0.075 (Gemini Flash) to $15.00 (GPT-5, Opus).
Output Price
Price per 1M Output TokensCost per million tokens for the generated response. Usually 3-6x input price.
Cached Input
Cached Input PriceDiscounted rate for repeated prompt context blocks. Available on OpenAI, Anthropic, and Google. Typically 10-25% of standard input price.

How to Use

  1. Select your AI model from 12 options across 6 providers.
  2. Paste your actual prompt text to auto-count tokens, or enter token counts manually.
  3. Toggle prompt caching to see cached vs standard pricing.
  4. Enter daily active users and requests per user to project monthly and annual costs.
  5. Compare costs across all models to optimize your AI spend.
  6. Prices are updated regularly — last updated date is shown in results.

Quick Reference

GPT-5 (OpenAI)$15.00 input / $60.00 output per 1M tokens — cached: $2.50. Top-tier reasoning.
GPT-4o-mini (OpenAI)$0.15 input / $0.60 output per 1M tokens — cached: $0.0375. Budget workhorse.
Claude Opus 4.7 (Anthropic)$15.00 input / $75.00 output per 1M tokens — cached: $1.50. Premium reasoning.
Claude Haiku 4.5 (Anthropic)$0.25 input / $1.25 output per 1M tokens — cached: $0.025. Fast & cheap.
Gemini 3.1 Flash (Google)$0.15 input / $0.60 output per 1M tokens — cached: $0.01875. Lowest cost.
DeepSeek V3$0.50 input / $2.00 output per 1M tokens. Strong open competition.
Prompt Caching Savings75-90% off input costs. Reuse system prompts, conversation history, few-shot examples.

Common Uses

  • Estimating production AI costs by comparing per-request pricing across 12+ models from OpenAI, Anthropic, Google, and others
  • Choosing the most cost-effective model for each task — from budget-friendly (GPT-4o-mini, Gemini Flash) to premium (GPT-5, Claude Opus)
  • Budgeting monthly AI infrastructure costs with usage projections based on daily active users and requests per user
  • Optimizing prompt design and implementing caching strategies to reduce token consumption and lower operational costs

Understanding the Result

AI token pricing varies dramatically across models and providers. GPT-5 and Claude Opus 4.7 are the most capable (and most expensive) at $15/$60 and $15/$75 per million tokens respectively. For high-volume production workloads, GPT-4o-mini ($0.15/$0.60) or Gemini 3.1 Flash ($0.15/$0.60) offer the best value. Prompt caching is now a standard feature across all major providers — cached input tokens cost 75-90% less than standard input. For production deployments, enabling caching and choosing the right model tier for each task are the two most impactful cost optimization strategies. A customer support chatbot handling 10K conversations/day might cost $50/day on GPT-5 but only $1.65/day on GPT-4o-mini — a 30x difference. Use the model comparison table below to find the optimal price/performance balance for your use case.

Worked Examples

Customer support chatbot: 10K DAU, 5 requests/user, 500 prompt + 150 output tokens each, GPT-4o

model = gpt-4o · promptTokensPerRequest = 500 · completionTokensPerRequest = 150 · useCachePricing = yes · dailyActiveUsers = 10000 · requestsPerUser = 5

Cost per request: $0.0018125; Monthly: ~$2,719; Annual: ~$32,625 (with caching).

With prompt caching enabled (cached input at $0.625/1M), input cost = $0.0003125/req + output cost = $0.0015/req = $0.0018125/req. 50K requests/day = ~$90.63/day, ~$2,719/month, ~$32,625/year. Without caching: ~$10,875/month. Caching saves ~75% on input costs. Switch to GPT-4o-mini and monthly costs drop to ~$65/month — a 40x reduction for simple classification/FAQ-style support.

Code review agent: 100 DAU devs, 20 requests/dev/day, 8000 prompt (codebase context) + 2000 output tokens, Claude Opus 4.7

model = claude-opus-4 · promptTokensPerRequest = 8000 · completionTokensPerRequest = 2000 · useCachePricing = yes · dailyActiveUsers = 100 · requestsPerUser = 20

Cost per request: $0.162; Daily: $324; Monthly: ~$9,720; Annual: ~$116,640.

With caching at $1.50/1M input, cost = (8000/1M * $1.50) + (2000/1M * $75) = $0.012 + $0.15 = $0.162/request. 2000 requests/day = $324/day = ~$9,720/month, ~$116,640/year. For a 100-person team, that is ~$97/dev/month. Without caching, it would be ~$540/day. Claude Sonnet 4.6 at $3.00/$15.00 would reduce costs to ~$84/day while still providing excellent code review quality.

Simple text classification pipeline: 1M DAU free-tier users, 3 requests/user, 100 prompt + 10 output tokens, Gemini 3.1 Flash

model = gemini-3-flash · promptTokensPerRequest = 100 · completionTokensPerRequest = 10 · useCachePricing = yes · dailyActiveUsers = 1000000 · requestsPerUser = 3

Cost per request: ~$0.0000062; Monthly: ~$557 at 3M requests/day.

With cached input at $0.01875/1M: cost = (100/1M * $0.01875) + (10/1M * $0.60) = $0.0000001875 + $0.000006 = $0.0000061875/req. 3M requests/day = $18.56/day = ~$557/month. At this scale, even tiny prompt optimizations matter — shaving 10 tokens off the prompt saves ~$55/month. Model choice at scale has enormous leverage: GPT-5 would cost ~$24,480/month for the same pipeline.

Frequently Asked Questions

Which AI model is cheapest for production?
GPT-4o-mini ($0.15/$0.60 per million tokens) and Gemini 3.1 Flash ($0.15/$0.60) are the most cost-effective models for high-volume production workloads. DeepSeek V3 ($0.50/$2.00) and Llama 4 ($0.50/$1.50) are competitive mid-range options. GPT-5 ($15/$60) and Claude Opus 4.7 ($15/$75) are premium models for complex reasoning tasks.
What is prompt caching and how much does it save?
Prompt caching stores repeated context blocks (system prompts, conversation history) and charges a reduced rate when they're reused. OpenAI charges $0.625/1M cached tokens vs $2.50/1M standard (75% savings). Anthropic charges $0.30/1M vs $3.00/1M (90% savings). Google charges $0.01875/1M vs $0.15/1M (87.5% savings). In practice, caching can reduce total API costs by 30-60% for production workloads with shared context.
Why do output tokens cost more than input?
Output tokens require autoregressive generation — the model generates each token one at a time, with each step requiring a full forward pass through the network. Input tokens are processed in parallel during encoding, making them computationally cheaper. This typically results in output costing 3-6x more than input across all providers.
How do I estimate tokens without an exact tokenizer?
As a rough rule of thumb, one token equals approximately 4 characters for English text, or about 0.75 words. A 500-word article is roughly 667 tokens. Code and non-English languages may have different ratios. For exact counts, use each provider's official tokenizer — OpenAI's tiktoken, Anthropic's tokenizer API, or Google's token counting endpoint. Our paste-text counter uses the 4-character approximation.
What is the best model for my use case?
For simple classification and extraction: GPT-4o-mini or Gemini Flash ($0.001-0.003 per request). For customer support chatbots: Claude Sonnet 4.6 or GPT-4o ($0.005-0.02 per request). For complex reasoning, code generation, or analysis: GPT-5 or Claude Opus 4.7 ($0.02-0.10 per request). Use the comparison table to see exactly how each model prices the same request.

Pro Tips

  • Enable prompt caching for any production workload. It reduces input costs by 75-90% and is supported by all major providers (OpenAI, Anthropic, Google). Structure your prompts to keep static content (system instructions, few-shot examples) at the beginning of the prompt — this is the portion that gets cached.
  • Use tiered model routing: send simple tasks (classification, keyword extraction, formatting) to budget models like GPT-4o-mini or Gemini Flash, and route complex tasks (reasoning, code generation, analysis) to premium models like GPT-5 or Claude Opus. This can cut costs 50-70% without any user-perceptible quality difference.
  • Track your actual token counts from API responses rather than estimating. Each provider returns prompt_tokens and completion_tokens in the API response. Use this data to build accurate cost dashboards. Our 4-char-per-token estimate is directionally useful but insufficient for production budgeting.
  • Be aware that thinking/reasoning tokens (Claude's extended thinking, OpenAI's o-series) are charged at output token rates but are not visible to users. A model might consume 2000 thinking tokens to generate a 200-token response. Factor this into cost estimates for reasoning-heavy tasks — actual costs can be 5-10x higher than visible output suggests.

Limitations to Know

  • This calculator uses list prices from official API pricing pages as of the last-updated date. It does NOT account for volume discounts (OpenAI and Anthropic offer tiered pricing for $5K+/month committed spend), fine-tuning API costs (which have different token rates), batch/async API pricing (typically 50% off for 24-hour turnaround), or image/audio input token pricing (which uses different multipliers).
  • The token counter uses a rough 4-characters-per-token estimate, which is accurate to about +/-20% for English text but diverges significantly for code, non-English languages, and structured data. For exact token counts, use each provider's official tokenizer: tiktoken (OpenAI), Anthropic's token-count API, or Google's countTokens endpoint.
  • Pricing changes frequently — always verify against the provider's official pricing page before making budget commitments.
Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "AI Token Pricing Calculator — Compare GPT-4o, Claude, Gemini Costs." TheCalcUniverse, 2026, https://thecalcuniverse.com/engineering/ai-token-pricing/. Accessed July 24, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like