metadlabs

Free toolprices checked October 14, 2026

LLM API cost calculator

Price one AI feature before the invoice does it for you. Describe the workload, pick a model, and see the monthly bill line by line, with what trimming, prompt caching, batching and routing each take off it.

14 modelsAnthropic · OpenAI · Google · xAI · DeepSeek

  • Prices checked weekly against the official pricing pages
  • Separates the cacheable prefix from per-call input and output
  • Shows what each lever saves, in order, on your numbers
  • Shareable link, so the estimate reaches whoever holds the budget

01What are you building?

System prompt and a handful of tools on every turn, plus a growing conversation.

101K100K10M
+ don't know your token counts? paste a prompt
≈ 0 tokens · 0 chars ÷ 4

English averages about 4 characters per token. Code, JSON and non-English text run higher, and Claude 4.7 and later count about 30% more tokens for the same text. For exact numbers, use your provider's token counting endpoint or the usage field in real responses.

02Which model?

Per million tokens

source ↗

Negotiated a discount, or a price changed? Type over any number.

03Pull the levers

Applied in this order. Each saving is measured on what's left after the one before.

a

Trim tokens

−$334/mo
Cut input (stale instructions, tools loaded on demand, summarized history)20%
Cap output (concise, structured answers, max tokens)10%
b

Prompt caching

−$562/mo
Calls that hit the cache for the static prefix85%

On Claude Sonnet 5.5: reads $0.1/M (5% of input), writes $2.50/M (1.25× input). A prefix used only once costs more with caching.

c

Batch what can wait

Calls that don't need an answer in seconds0%

Batch API on Anthropic: 50% off input and output, and it stacks with caching.

d

Route easy calls to a cheaper model

−$410/mo
Calls a smaller model handles as well40%

Only route the task types that pass your eval set on the cheaper model. Otherwise you save money by shipping worse answers.

The same workload on every model

Monthly cost with your trim, caching and batch settings, cheapest first. Click a model to switch to it. Cheaper only counts if it passes your evals.

How it works

The math, in the open.

Every call is three kinds of tokens at three prices. The levers change either how many tokens you send or what each one costs, and they're applied in the order you'd usually ship them.

per model, prices per million tokens
cost per call =
    static  × (hit × cache_read + (1 − hit) × cache_write)
  + variable × input
  + output   × output_price

monthly = cost per call × calls per day × 30.4
          × (1 − async + async × discount)
  1. a

    Trim tokens

    Cuts input and output before anything else. Old instructions, every tool sent on every call and full conversation history add up; output usually costs 4 to 6 times as much as input, so capping it matters more than it looks.

  2. b

    Prompt caching

    Bills the repeated prefix at the cache read price when it hits, and the write price when it misses. On models with a write premium, a prefix that is rarely reused costs more with caching, and the calculator shows that.

  3. c

    Batch or off-peak

    Half price for the share of calls that can wait: nightly jobs, document processing, evals, backfills. It stacks with caching. Grok 4.7 has no batch API, so the lever is off for it.

  4. d

    Route to a cheaper model

    Sends a share of calls to a second model, with the same trim, caching and batch settings. It's last on purpose: it's the lever that can quietly lower quality, so only use it behind an eval set.

Price list

Every price the calculator uses.

USD per million tokens, standard tier, checked against each provider's pricing page on October 14, 2026.

ModelInputCache readCache writeOutputAsync discount
Anthropicsource ↗
Claude Fable 5.1$10.00$0.25$12.50$50.0050% · Batch API
Claude Opus 5.5$4.00$0.2$5.00$20.0050% · Batch API
Claude Sonnet 5.5$2.00$0.1$2.50$10.0050% · Batch API
Claude Haiku 5.5$0.1$0.01$0.125$0.550% · Batch API
OpenAIsource ↗
GPT-6 Astra$10.00$1.00$12.50$50.0050% · Batch or Flex
GPT-6.1 Sol$2.00$0.1$2.50$10.0050% · Batch or Flex
GPT-6 Luna$0.1$0.01$0.125$0.550% · Batch or Flex
Googlesource ↗
Gemini 4 ArgonRises to $4 input and $20 output on December 1, 2026.$2.00$0.1no fee$10.0050% · Batch API
Gemini 3.8 FlashRises to $1.50 input and $7.50 output on January 1, 2027.$0.75$0.075no fee$3.7550% · Batch API
Gemini 3.5 Flash-Lite$0.3$0.03no fee$2.5050% · Batch API
Gemini 3.1 Flash-Lite$0.25$0.025no fee$1.5050% · Batch API
xAIsource ↗
Grok 4.7$2.00$0.5no fee$6.00none
DeepSeeksource ↗
DeepSeek V4 ProPeak rates. Off-peak hours are half price.$1.32$0.044no fee$3.9650% · Off-peak hours
DeepSeek FlashPeak rates. Off-peak hours are half price.$0.3$0.006no fee$1.2050% · Off-peak hours

“No fee” means writing to the cache costs the normal input rate. Regional or data-residency endpoints add about 10% at Anthropic, OpenAI and on cloud platforms. Spot a wrong or stale price? Email hello@metadlabs.com.

FAQ

Before you trust the number.

How accurate is this estimate?

The arithmetic is exact for the prices and token counts you enter. The inputs are the uncertain part: token counts per call, cache hit rates and how much traffic can wait for batch. Start from your real usage data if you have it (every API response reports input, cached and output tokens), and treat the preset numbers as typical starting points, not facts about your app.

Why split the input into a static prefix and variable input?

Because only a repeated prefix can be cached, and caching is usually the biggest safe saving. Providers cache from the start of the prompt up to the first byte that changes, so the static part (system prompt, tool definitions, reference documents, and in a conversation or agent loop the earlier turns) has to come first and stay byte-identical. The variable part is billed at the full input rate every time.

How does the calculator price prompt caching?

For the static prefix, the hit rate share is billed at the model's cache read price and the rest at its cache write price. Anthropic and OpenAI charge 1.25x the input rate to write to the cache; Google, xAI and DeepSeek don't charge extra for automatic caching. Providers also have a minimum cacheable prefix (around 1,024 tokens on many models), and Google charges storage for explicit caches, which this estimate leaves out.

Do batch discounts stack with caching?

Yes, at the providers listed here. Batch requests are billed at half the standard rate, including cached reads and writes. The calculator applies the batch discount to the share of calls you mark as able to wait. For DeepSeek, which has no batch API, the same lever models moving that work to off-peak hours, which are billed at half the peak rate shown.

Are reasoning or thinking tokens included?

Put them in the output tokens. Every provider here bills reasoning tokens as output, and on a reasoning-heavy workload they can be most of the bill. Check the usage field of real responses for the actual count.

What about long prompts?

Some models charge more for the whole request once the input passes a threshold: 272K tokens on GPT-6 models, 200K on Grok 4.7, and 100K on Claude Haiku 5.5. The calculator switches to those rates automatically and shows a long-context badge. Anthropic's other current models bill the full 1M context at standard rates.

Which model should I pick?

The cheapest model that passes your eval set. Build 100 to 300 real examples with expected outputs, score the candidates, and only move the task types where quality holds. The ranking on this page is by cost for your workload; it says nothing about quality.

How often are prices updated?

We check every price against the official pricing pages each week and update this page when anything changes. The date at the top shows the last check (currently October 14, 2026). If you have negotiated rates, type them over the published ones.

The estimate says you're overpaying. Now what?

We instrument cost per feature, restructure prompts for caching, move work to batch and build the eval set that makes routing safe. Bring your usage data to a free call and we'll tell you where the money is going.

Newsletter

Price changes that matter

When a provider changes pricing in a way that moves real bills, we write it up with the numbers. Plus our AI and performance posts, about every two weeks.

No pitch. Unsubscribe from any email.