LLM API workload cost calculator
Estimate what an LLM-powered feature costs per month. Describe the workload once, then compare up to four models from OpenAI, Anthropic, Google, xAI, Perplexity side by side, with prompt caching, batch discounts and long-prompt tiers applied.
Last checked Sources: platform.claude.com ↗, ai.google.dev ↗, developers.openai.com ↗, docs.perplexity.ai ↗, docs.x.ai ↗Estimated cost
Not included: cache storage / agent tool fees
These estimates cover tokens and per-request fees only. Prompt-cache storage (billed per token per hour) and agent tool-call fees (web search, URL fetch, code sandbox) are extra.
- Google Gemini 3.8 Flash: Cache storage: from $0.50 per 1M cached tokens per hour
USD, excluding tax, standard pay-as-you-go rates from each provider’s official pricing page. Long-prompt tiers are applied by input size. Cache storage fees, tool calls, fine-tuning, priority/flex tiers and free-tier allowances are not included. A month is 30 days.
How the estimate works
For each request we multiply the average input and output tokens by the model’s price per 1 million tokens. The cached share of the input is billed at the cached-input rate, cache writes at the cache-write rate, and the batch share of requests at the provider’s batch price (or its published batch discount). If a model has a higher price for long prompts, the tier is chosen from your average input size. The result is multiplied by requests per day and days per month.
Worked example: a chatbot with 2,000 requests/day, 1,500 input and 400 output tokens, 50% cached for 30 days costs about $16.95 a month on OpenAI GPT-6 Luna and $1,695.00 on OpenAI GPT-6 Astra. Model choice usually matters more than any other setting.
Presets
- Chatbot: 2,000 requests/day, 1,500 input and 400 output tokens, 50% cached.
- RAG / document Q&A: 1,000 requests/day, 6,000 input and 500 output tokens, 30% cached.
- Summarisation: 500 requests/day, 10,000 input and 800 output tokens, 50% batch.
- Coding agent: 300 requests/day, 40,000 input and 2,000 output tokens, 70% cached.
They are starting points, not benchmarks. Measure your real token counts with the token counter or from your provider’s usage dashboard.
What is not included
Cache storage fees, web-search and tool-call fees, fine-tuning, image and audio tokens, priority or flex service tiers, regional-endpoint surcharges and free-tier allowances. Introductory prices are used only if you tick the box; models whose only current price is introductory use the announced regular price and are labelled with its start date.
Every rate comes from the LLM API pricing table, which links to each provider’s pricing page. Wondering whether a ChatGPT or Claude subscription would be cheaper for personal use? Try the API vs subscription calculator.