Create a free account to use the calculator

Members use every tool on AIDataLegends for free. It takes a name, an email and a password, and you come straight back here.

Not ready yet? The worked example below shows exactly what the tool produces.

Worked example

A call with 3,000 input tokens (2,000 of them served from a prompt cache at $0.30/1M) and 600 output tokens, at $3/1M input and $15/1M output, running 500 times a day every day. The calculator's answer:

Per call0.0186 50.0% input / 50.0% output (+ cache)
Per day9.30
Per month279.00 15,000 calls/month
Per year3,348.00

What this means

  • This is the per-call shape multiplied up — it won't match a real bill if calls vary in size (a long document one day, a short query the next). Run it again with your typical and your worst-case token counts to see the range.

The breakdown

Input cost/call   = input tokens ÷ 1,000,000 × input price = 0.0090
Output cost/call  = output tokens ÷ 1,000,000 × output price = 0.0090
Cached cost/call  = cached tokens ÷ 1,000,000 × cached price = 0.0006
Cost/call         = 0.0186
Cost/month        = cost/call × calls/day × days/month = 279.00

Starting points, not an invoice: per-token prices change often and vary by model and provider. Use your own current rates for an exact number.

Why input, output and cache are priced separately

Model providers meter usage in tokens — rough chunks of text, usually 3-4 characters each in English — and almost always quote prices per million tokens, with three distinct rates where a prompt cache is on offer:

  • Input tokens — everything newly sent to the model: the prompt, system instructions, tool definitions, and any document or conversation context not served from a cache.
  • Output tokens — the tokens the model generates in its response. These are priced higher than input, often 3-5× or more, because generating each token costs more compute than reading one.
  • Cached input tokens — the portion of input that matches a previous call closely enough to be read from a cache (a repeated system prompt, tool schema, or document) instead of fully reprocessed. Several providers price this at a fraction — often around 10% — of the normal input rate.

Keeping the three separate is why this calculator asks for each independently rather than one blended "token price": a pipeline that's mostly output-heavy and one that's mostly input-heavy can have wildly different costs at the same total token count.

Where to find your numbers

  • Token counts — your provider's own tokenizer or token-counting endpoint gives an exact figure for a given prompt; most chat UIs and API responses also report token usage per call after the fact.
  • Prices — each provider's pricing page, always quoted per model and almost always per million tokens for both input and output, with cache pricing (if offered) listed alongside.

Nothing here is looked up automatically and nothing is cached by this tool: every number comes from what you type in, so the answer stays correct even after a provider changes its prices.

The levers that actually move this number

  • Output length. Because output is priced highest, capping max tokens, asking for more concise responses, or stopping a stream early once you have what you need usually saves more than any input-side change.
  • Prompt caching. A large, repeated system prompt, tool schema or document context is close to free on every call after the first if your provider's cache applies — worth checking before assuming a large context is expensive on every call.
  • Batch processing. For workloads that don't need a live response, several providers' batch APIs run at roughly half the synchronous price in exchange for asynchronous (minutes-to-hours) turnaround.
  • Model choice. A smaller or older model in the same family is often an order of magnitude cheaper per token; the right call is whichever model is the cheapest one that reliably gets the task right, not the newest.

Limitations and assumptions

  • This models one fixed call shape multiplied up by volume. A real pipeline's calls vary in size — run it again with your typical and your worst-case token counts to see the range, rather than trusting a single average.
  • Reasoning/thinking tokens some models generate internally before answering are usually billed as output tokens — include them in the output count if your provider meters them that way.
  • Prices change often and vary by model, provider and sometimes region — this tool has no pricing data of its own, only the arithmetic on what you provide.

Frequently asked questions

Why is output priced higher than input?
Generating each output token requires a forward pass through the model for that token alone, while input tokens can be processed in parallel in a single pass. That extra per-token compute cost is why output is typically priced several times higher than input across providers.
What counts as a token?
Roughly 3-4 characters of English text, but it varies by language, code, and the specific tokenizer a model uses — the only exact way to know is your provider's own tokenizer or a usage report from an actual call.
Is prompt caching the same as semantic caching?
No. Prompt caching (what this calculator models) caches the exact token sequence of a repeated prefix — like a system prompt or tool schema — at the provider's infrastructure level. Semantic caching is an application-level technique that skips calling the model entirely for near-duplicate queries, which this tool doesn't model.
Why does my pipeline's real bill not match this?
This models one call shape multiplied by volume. If call sizes vary (short queries some days, long documents others), run the calculator with your typical and worst-case shapes separately rather than a single blended average.
Why do I need an account?
The tools are free for members. Signing in lets us keep them free and fast, and protects them from automated abuse. Your input is used only to produce the answer and is not stored.

Keep going