Skip to content

LLM API Cost Calculator

Estimate and compare API cost across models in your browser. Paste a prompt, set expected output and monthly call volume, and see per-call and monthly cost for every model — with the cheapest priced option highlighted. Token counts are Exact for OpenAI and clearly labeled Estimated elsewhere.

Private by default · No signup · Local token counting where supported · Exact and estimated results clearly labeled

Your text is processed in your browser for supported local tokenizers. We do not store pasted prompts.

Import .txt, .md, or .json files locally. Files are read in your browser and are not uploaded to our server.

Model comparison

Compare the current prompt, expected output, and monthly call volume across every supported model.

Same-prompt model comparison table with token count accuracy, cost, and context fit.
ModelAccuracyPrompt tokensPer-call costMonthly costContext fit
OpenAI · GPT-5.5gpt-5.5Exact
OpenAI · GPT-5.4gpt-5.4Exact
OpenAI · GPT-5.4 minigpt-5.4-miniExact
OpenAI · GPT-5.4 nanogpt-5.4-nanoExact
Anthropic · Claude Fable 5claude-fable-5Estimated
Anthropic · Claude Opus 4.8claude-opus-4-8Estimated
Anthropic · Claude Sonnet 5claude-sonnet-5Estimated
Anthropic · Claude Sonnet 4.6claude-sonnet-4-6Estimated
Anthropic · Claude Opus 4.6claude-opus-4-6Estimated
Anthropic · Claude Haiku 4.5claude-haiku-4-5-20251001Estimated
Google · Gemini 3.5 Flashgemini-3.5-flashEstimated
Google · Gemini 3.1 Pro Previewgemini-3.1-pro-previewEstimated
Google · Gemini 3.1 Flash-Litegemini-3.1-flash-liteEstimated
Google · Gemini 3 Flash Previewgemini-3-flash-previewEstimated
Google · Gemini 2.5 Progemini-2.5-proEstimated
Google · Gemini 2.5 Flashgemini-2.5-flashEstimated
Google · Gemini 2.5 Flash-Litegemini-2.5-flash-liteEstimated
Mistral · Mistral Largemistral-large-latestEstimated
Mistral · Mistral Mediummistral-medium-latestEstimated
Mistral · Mistral Smallmistral-small-latestEstimated
Mistral · Ministral 14Bministral-14b-latestEstimated
DeepSeek · DeepSeek V4 Flashdeepseek-v4-flashEstimated
DeepSeek · DeepSeek V4 Prodeepseek-v4-proEstimated
xAI · Grok 4.3grok-4.3Estimated
xAI · Grok Build 0.1grok-build-0.1Estimated
Meta · Llama 4 Scoutmeta-llama/Llama-4-Scout-17B-16E-InstructEstimated
Meta · Llama 4 Maverickmeta-llama/Llama-4-Maverick-17B-128E-InstructEstimated

Estimated rows use one local OpenAI-compatible proxy token count, so real provider counts can differ. Pricing estimate based on public model pricing. Check provider pricing before production use.

Model pricing table

Published API list prices per 1M tokens for every supported model, from the local model list. This is a static reference — use the calculator above to price your own prompt.

API list prices per 1M tokens, context window, and pricing last-checked date per model.
ModelInput / 1MCached input / 1MOutput / 1MContext windowPricing last checked
OpenAI · GPT-5.5gpt-5.5$5.00$0.50$30.001,000,0002026-07-08
OpenAI · GPT-5.4gpt-5.4$2.50$0.25$15.001,000,0002026-07-08
OpenAI · GPT-5.4 minigpt-5.4-mini$0.75$0.075$4.50400,0002026-07-08
OpenAI · GPT-5.4 nanogpt-5.4-nano$0.20$0.02$1.25400,0002026-07-08
Anthropic · Claude Fable 5claude-fable-5$10.00$1.00$50.001,000,0002026-07-08
Anthropic · Claude Opus 4.8claude-opus-4-8$5.00$0.50$25.001,000,0002026-07-08
Anthropic · Claude Sonnet 5claude-sonnet-5$2.00$0.20$10.001,000,0002026-07-08
Anthropic · Claude Sonnet 4.6claude-sonnet-4-6$3.00$0.30$15.001,000,0002026-07-08
Anthropic · Claude Opus 4.6claude-opus-4-6$5.00$0.50$25.001,000,0002026-07-08
Anthropic · Claude Haiku 4.5claude-haiku-4-5-20251001$1.00$0.10$5.00200,0002026-07-08
Google · Gemini 3.5 Flashgemini-3.5-flash$1.50$0.15$9.001,048,5762026-07-08
Google · Gemini 3.1 Pro Previewgemini-3.1-pro-preview$2.00$0.20$12.001,048,5762026-07-08
Google · Gemini 3.1 Flash-Litegemini-3.1-flash-lite$0.25$0.025$1.501,048,5762026-07-08
Google · Gemini 3 Flash Previewgemini-3-flash-preview$0.50$0.05$3.001,048,5762026-07-08
Google · Gemini 2.5 Progemini-2.5-pro$1.25$0.125$10.001,048,5762026-07-08
Google · Gemini 2.5 Flashgemini-2.5-flash$0.30$0.03$2.501,048,5762026-07-08
Google · Gemini 2.5 Flash-Litegemini-2.5-flash-lite$0.10$0.01$0.401,048,5762026-07-08
Mistral · Mistral Largemistral-large-latest$0.50$0.05$1.50256,0002026-07-08
Mistral · Mistral Mediummistral-medium-latest$1.50$0.15$7.50256,0002026-07-08
Mistral · Mistral Smallmistral-small-latest$0.15$0.015$0.60256,0002026-07-08
Mistral · Ministral 14Bministral-14b-latest$0.20$0.02$0.20256,0002026-07-08
DeepSeek · DeepSeek V4 Flashdeepseek-v4-flash$0.14$0.0028$0.281,000,0002026-07-08
DeepSeek · DeepSeek V4 Prodeepseek-v4-pro$0.435$0.003625$0.871,000,0002026-07-08
xAI · Grok 4.3grok-4.3$1.25$0.20$2.501,000,0002026-07-08
xAI · Grok Build 0.1grok-build-0.1$1.00$0.20$2.00256,0002026-07-08
Meta · Llama 4 Scoutmeta-llama/Llama-4-Scout-17B-16E-InstructPricing varies by host10,000,000
Meta · Llama 4 Maverickmeta-llama/Llama-4-Maverick-17B-128E-InstructPricing varies by host1,000,000

List prices are each provider's standard, non-batch tier. Some models publish long-context, cached, or promotional rates — check the provider before production use.

Pricing estimate based on public model pricing. Check provider pricing before production use.

Plan your monthly API budget

Four steps to turn a prompt into a monthly cost estimate you can compare across providers.

1. Paste a typical prompt

Enter a representative prompt, document, or chat message. Its input tokens drive the input cost for every model.

2. Set expected output tokens

Estimate how many tokens the model will generate. Output tokens are usually priced higher than input, so this matters.

3. Set calls per month

Enter how many times you expect to call the API each month to turn a per-call cost into a monthly estimate.

4. Compare and sort by cost

The comparison table prices the same prompt across every model. Sort by per-call or monthly cost, and the cheapest priced model is highlighted.

Read the estimate honestly

Costs are estimates from public list prices, and token counts for non-OpenAI models are Estimated. List prices use each provider's standard tier — some models have long-context, cached, or promotional rates — so confirm with the provider before committing a budget.

LLM API cost FAQ

Answers about estimating monthly cost, finding the cheapest model, and how pricing works.

Can I estimate monthly API cost?

Yes. Enter expected output tokens and calls per month. The calculator combines those values with the selected model's public pricing to estimate per-call and monthly cost.

Which model is cheapest?

The cheapest model depends on your prompt size, expected output length, and monthly volume. Use the comparison table to price the same text across all supported models; models without first-party pricing show Pricing varies by host.

What are input vs output tokens, and why is output usually more expensive?

Input tokens are the prompt and context you send to the model. Output tokens are the model's response. Providers often price output tokens higher because generating text costs more compute than reading input.

What is cached input pricing?

Some providers discount repeated input that can be reused from cache. When a model publishes cached-input pricing, the calculator shows it separately. If a model does not publish it, the row stays empty or unavailable.

How do I reduce LLM API cost?

Remove repeated instructions, shorten examples, reduce expected output length, use smaller models for simple tasks, use cached input when available, and avoid sending full documents when a retrieved excerpt is enough.

Is this calculator exact?

It is Exact only for supported OpenAI encodings counted locally with gpt-tokenizer. Other providers are labeled Estimated and use an OpenAI-compatible tokenizer as a proxy, so real provider counts can vary.

Is my prompt uploaded to your server?

No. Pasted text is processed in your browser. This site has no accounts, saved prompt history, analytics scripts, ad scripts, or server-side text processing.

More token tools

Focus on one provider with the OpenAI, Claude, or Gemini token calculators, or start from the main LLM token calculator.