By Tim King · Updated
LLM Cost Calculator
Claude API Pricing and GPT Token Cost Per Request, With Caching
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the LLM Cost Calculator works
This LLM cost calculator prices language model API calls. Pick one of 82 models from Anthropic, OpenAI, Google, xAI, Mistral and others, or enter your own rates, then set input and output tokens and daily requests to see the cost per request, per 1,000 requests and per 30 days.
How the LLM cost calculator works
Providers price input tokens, the prompt you send, and output tokens, the reply, separately per million tokens, and output usually costs four to eight times more. Many also offer a lower rate for cached input: a prompt prefix that repeats across requests, such as a long system prompt or document, is billed at a fraction of the normal rate when it is served from cache. Prices are list prices in US dollars from the model prices dataset, checked on 30 September 2026.
The formula per request is input × (1 − cached share) × input price + input × cached share × cached price + output × output price, all divided by 1,000,000.
First example. Claude Sonnet 4.5 at $3 input and $15 output per million, with 2,000 input and 500 output tokens, costs $0.0135 a request: $13.50 per 1,000 and $405 over 30 days at 1,000 requests a day. Input is 44.4 percent of the bill.
Second example. The same calls with half the input served from cache at $0.30 cost $0.0108 a request, $10.80 per 1,000 and $324 a month, saving $0.0027 a request.
How many requests does $100 buy? At $0.0135 each, about 7,400; divide your budget by the cost per request.
Cost of 1,000 requests of 2,000 input and 500 output tokens, list prices checked 2026-09-30
| Model | Input $/1M | Output $/1M | Per request | Per 1,000 requests |
|---|---|---|---|---|
| Claude Fable 5.1 (Anthropic) | $10.00 | $50.00 | $0.045 | $45.00 |
| Claude Mythos 5 (Anthropic) | $10.00 | $50.00 | $0.045 | $45.00 |
| Claude Opus 4.8 (Anthropic) | $5.00 | $25.00 | $0.0225 | $22.50 |
| Claude Opus 4.5 (Anthropic) | $5.00 | $25.00 | $0.0225 | $22.50 |
| Claude Sonnet 5.5 (Anthropic) | $2.00 | $10.00 | $0.009 | $9.00 |
| Claude Sonnet 4.5 (Anthropic) | $3.00 | $15.00 | $0.0135 | $13.50 |
| Claude Haiku 3.5 (Anthropic) | $0.8 | $4.00 | $0.0036 | $3.60 |
| gpt-6-luna (OpenAI) | $0.1 | $0.5 | $0.00045 | $0.45 |
| gpt-5.6-terra (OpenAI) | $2.00 | $12.00 | $0.01 | $10.00 |
| gpt-5.5-pro (OpenAI) | $30.00 | $180.00 | $0.15 | $150.00 |
| gpt-5.4-nano (OpenAI) | $0.2 | $1.25 | $0.00103 | $1.03 |
| gpt-5.2-pro (OpenAI) | $21.00 | $168.00 | $0.126 | $126.00 |
| gpt-5-mini (OpenAI) | $0.25 | $2.00 | $0.0015 | $1.50 |
| gpt-4.1 (OpenAI) | $2.00 | $8.00 | $0.008 | $8.00 |
| gpt-4o (OpenAI) | $2.50 | $10.00 | $0.01 | $10.00 |
| o1-pro (OpenAI) | $150.00 | $600.00 | $0.6 | $600.00 |
| o4-mini (OpenAI) | $1.10 | $4.40 | $0.0044 | $4.40 |
| gpt-4-0613 (OpenAI) | $30.00 | $60.00 | $0.09 | $90.00 |
| Gemini 3.7 Flash (Google) | $0.75 | $3.75 | $0.00337 | $3.38 |
| Gemini 3.5 Flash-Lite (Google) | $0.3 | $2.50 | $0.00185 | $1.85 |
| Gemini 3 Flash Preview (Google) | $0.5 | $3.00 | $0.0025 | $2.50 |
| Gemini 2.5 Flash-Lite (Google) | $0.1 | $0.4 | $0.0004 | $0.4 |
| Mistral Small 4 (Mistral) | $0.15 | $0.6 | $0.0006 | $0.6 |
| Ministral 3 3B (Mistral) | $0.1 | $0.1 | $0.00025 | $0.25 |
| GLM 5.2 (Mistral) | $1.40 | $4.40 | $0.005 | $5.00 |
| grok-4.7 (xAI) | $2.00 | $6.00 | $0.007 | $7.00 |
Tips and pitfalls
Count tokens rather than guessing: a token counter on a real prompt beats a words estimate, especially for code. Reasoning models bill hidden thinking tokens as output, which can multiply the output count several times. Cache writes on some providers cost more than normal input, and batch APIs often halve every price, so check the provider's page before committing to a budget.
FAQ
How do I estimate tokens per request?
Paste a typical prompt, including the system prompt and any documents, into a token counter for input, and count a typical reply for output. English prose averages about 0.75 words per token, so 1,000 words is about 1,333 tokens.
Why is output more expensive than input?
Input tokens are processed in parallel in one pass, while output tokens are generated one at a time, each needing a full pass through the model. That makes generation far more compute-intensive per token.
What is prompt caching?
When the start of a prompt repeats across requests, the provider can reuse its processed form and bill it at a reduced cached rate. Put stable content such as instructions and reference documents first so the cache can match it.
Are these prices current?
They are list prices checked on 30 September 2026 from the providers' published pricing. Prices change often, and discounts for volume, batch processing or long-context tiers are not included, so choose Custom prices to enter your own.
Does it include image, audio or tool costs?
No. It prices text input and output tokens only. Images and audio are converted to tokens at model-specific rates, and features such as web search or code execution are billed separately per call.
See also: all AI tools, Dev Utilities, Formatters & Validators, Data & Encoding, Security & Identifiers, SEO, Accessibility.
Related tools
AI Token Counter
Count GPT tokens in a prompt or document with o200k_base, in your browser.
Context Window Calculator
Check whether a prompt, documents and reply fit a model's context window.
Embedding Cost Calculator
Estimate what it costs to embed documents and how much storage the vectors take.
RAG Chunk Calculator
Plan chunk size and overlap for retrieval-augmented generation.
LLM API Prices
Per-million-token API prices for 82 models from six vendors.