LLM API Pricing Calculator

Compare real token costs across 12 models from 6 providers. Workload-aware — chat costs different from summarization. Includes prompt caching (up to 90% off) and batch processing (up to 50% off) discounts. All calculations client-side. No data leaves your browser.

📋 Workload Configuration

Select a workload profile to auto-fill typical token ratios, or configure custom values. Token counts are approximate — different providers use different tokenizers, so the same text produces different token counts. The calculator uses your numbers uniformly; see the methodology note below.

Prompt Cache Hit Rate: 0%
% of input tokens served from cache. Anthropic gives 90% discount, OpenAI 50%.
Batch Processing: 50% off for async (24h SLA).

Why LLM API Pricing Isn't a Simple Multiplication

The pricing page says $2.50 per million input tokens. Your mental math: "10,000 requests × 2,000 tokens × $2.50/M = $50/day." Then the bill arrives and it's $180/day. Four structural reasons the napkin math fails every time.

1. Input ≠ Output Token Counts

Most pricing pages quote input and output prices separately — but your workload determines the ratio. A chat application with system prompts and conversation history averages roughly 1:0.4 input-to-output tokens (2.5× more input than output). A summarization pipeline averages 8:1 (long document in, short summary out). A code generation agent averages 1:2 (short prompt, longer code block out). Since output tokens cost 3–4× more than input tokens at most providers, the workload ratio is a cost multiplier. A summarization workload at 8:1 pays mostly input prices; a code generation workload at 1:2 pays mostly output prices. Same daily request count, same provider — 3× cost difference between profiles.

2. Prompt Caching: The Most Underutilized Discount

Anthropic gives a 90% discount on cached input tokens. OpenAI gives 50% off. Google's context caching is free for prompts under 128K tokens with a small storage fee. If your application sends the same system prompt with every request — and most do — that's 500–2,000 tokens per request that qualify for caching. At a 90% discount on Anthropic, a 2,000-token system prompt at 1M requests/month saves $27,000/month on Claude Opus 4 alone. The discount exists. Most teams never configure it.

3. Batch Processing: Half Price for Patience

Both OpenAI and Anthropic offer 50% off for batch (asynchronous) processing with a 24-hour completion SLA. For offline workloads — evaluation runs, dataset labeling, embedding generation, nightly summarization jobs — batch pricing cuts the bill in half with no downsides. Combined with prompt caching on Anthropic, the effective cost for batched, cached inference can be 5–10% of the sticker price.

4. Tokenizer Variance: 1,000 Tokens ≠ 1,000 Tokens

OpenAI, Anthropic, Google, and DeepSeek each use different tokenizers. The same English paragraph might be 800 tokens on OpenAI's cl100k_base tokenizer, 750 on Anthropic's tokenizer, and 880 on Google's SentencePiece tokenizer. Across 1 million requests per day, a 10% tokenizer efficiency difference translates to thousands of dollars per month in cost variance — before you even compare the per-token prices. The calculator uses uniform token counts for comparability; in practice, benchmark your actual text across providers before committing.

How to Use This Calculator

  1. Pick your workload profile — this sets realistic input/output token ratios.
  2. Set your daily request volume and adjust token counts if needed.
  3. Slide the prompt cache hit rate based on what percentage of your requests share a common prefix (system prompts, few-shot examples, RAG context).
  4. Toggle batch processing for offline/non-realtime workloads.
  5. Compare the "Annual Cost" column (no optimizations) with "Optimized Annual" (cache + batch) — the gap is savings you're leaving on the table.