AI & LLM
Token, cost & context tools for LLMs
LLM API Cost Calculator
Estimate LLM API cost from input/output tokens at current per-model rates, compare providers, and find the cheapest model for your prompt. Accurate, instant and free — for United States.
What these mean:
GPT-4o: $0.0075/call (in $0.0025 + out $0.005) → $7.50 for 1,000 calls. Output is priced ~4.0× input. Rates as of 2026-07-03.
Cost breakdown — GPT-4o
Per call
$0.0075
At volume (1,000 calls)
$7.50
Input cost (33%)
$0.0025
Output cost (67%)
$0.005
Input vs output cost split
Cheapest model for this prompt shape
Sorted cheapest-first for your exact token mix (1,000 in / 500 out). The right model for this workload can cut costs by 10–100×.
| Model | Provider | $/call |
|---|---|---|
| cheapestText Embedding 3 Small | OpenAI | $0.00002 |
| GPT-5.4 nano | OpenAI | $0.00082 |
| GPT-3.5 Turbo | OpenAI | $0.0013 |
| Gemini 2.5 Flash | $0.0015 | |
| GPT-5.4 mini | OpenAI | $0.003 |
| Claude Haiku 4.5 | Anthropic | $0.0035 |
| Gemini 2.5 Pro | $0.0063 | |
| GPT-4o(selected) | OpenAI | $0.0075 |
| Claude Sonnet 4.6 | Anthropic | $0.01 |
| Claude Opus 4.8 | Anthropic | $0.02 |
| GPT-5.5 | OpenAI | $0.02 |
Don't know your token count? The Token Counter estimates tokens for any prompt across all models — paste your prompt there first.
How per-token API cost is calculated
LLM APIs bill per token, with input and output tokens priced separately per million. This calculator applies each model’s current input and output rate to your token counts, and can compare providers to find the cheapest for your prompt mix.
Cost formula
input + output, priced apart
cost = (in ÷ 1M × price_in) + (out ÷ 1M × price_out)
- in / out = input / output tokens
- price_in / price_out = $ per 1M tokens
Output ≈ 4× input
Generation costs more than reading
Typical GPT-4o-class rates: $2.50/M input vs $10.00/M output.
A short prompt with a long answer can cost more than the reverse — the split matters.
- 1Price each side separately, then add: Input: 1,000 ÷ 1M × $2.50 = $0.0025. Output: 500 ÷ 1M × $10.00 = $0.0050. Total = $0.0075 per call. Note the 500 output tokens cost twice the 1,000 input tokens — because output is priced ~4× input.
- 2Scale to a budget: Multiply by call volume: 1,000 calls = $7.50; 100,000 calls/month ≈ $750. Get the per-call token counts from the LLM Token Counter.
Rates change — check the "as of" date
The split that catches people out
Many cost estimates lump all tokens together and use a single rate — which understates the cost of generation-heavy calls and overstates prompt-heavy ones. Because output is priced around 4× input, the input/output mix, not just the total, drives your bill. This calculator always prices the two sides separately.
Pick the cheapest model for the job
Frequently asked questions
API cost is charged per token, split into input (prompt) and output (completion) tokens at different per-million rates: cost = (in ÷ 1M × price_in) + (out ÷ 1M × price_out). At $2.50/M in and $10.00/M out, 1,000 in + 500 out = $0.0075/call ($7.50 per 1,000 calls). Get the token counts from the LLM Token Counter.
Output (generated) tokens are typically priced around 4× the input rate — for example $2.50/M input vs $10.00/M output on GPT-4o-class models. Generation is more compute-intensive than reading the prompt: each output token requires a full forward pass, whereas input tokens are processed in parallel during the prefill. Because of this split, a short prompt that produces a long answer can cost far more than a long prompt with a short answer.
Prices are stored in a per-model table dated to the last review and updated by a pull request whenever a provider changes its rates — never an automatic scrape. Every result shows a "rates as of" date so you know which pricing a figure is based on. Providers do change LLM API prices; verify against the official pricing page before committing to a large production budget.
Estimate the average input and output tokens per call (paste a representative prompt into the token counter), multiply by your expected calls per month, then apply the per-model rate. For example, at $0.0075 per call, 100,000 calls/month is about $750/month. Prompt caching, batching, and choosing a cheaper model for simple calls can cut this materially — the comparison view shows the cheapest model for your exact token mix.
Yes. Providers offer discounted rates for cached (re-used) prompt prefixes — often a fraction of the standard input price. If your application sends the same long system prompt on every call, caching can cut input cost substantially. The calculator uses standard (uncached) input pricing by default; treat cached savings as an additional discount on the input portion.
Method, assumptions & references
Methodology: cost = (input ÷ 1M × input_price) + (output ÷ 1M × output_price), with input and output priced separately per model. Output is typically ~4× the input rate. Worked example: 1,000 in + 500 out at $2.50/M and $10.00/M = $0.0075/call ($7.50 per 1,000 calls). Per-model rates are dated and PR-updated on provider changes (repo-json-on- rate-change), never auto-scraped; every result shows a rates-as-of date. Prompt caching discounts the input portion. Verify against the official pricing page before a large budget commitment.
Cross-links
How we calculate this
Reviewed by Reckonist Editorial · Last reviewed 24 June 2026. Figures follow the methods and sources set out in our editorial standards.
Per-model API prices are as of the review date and change when providers update them; every result shows a rates-as-of date. Output tokens are priced separately from (and typically ~4×) input tokens. Estimates are for planning — verify against the provider’s official pricing page before committing to a production budget. Prompt caching and batching can reduce actual cost.
Keep going
Same-category tools follow this colour; a cross-category link keeps its own.