Support
Dev & AI100% Client-Side · Zero Uploads

LLM API Cost & Token Calculator

Estimate prompt tokens and compare per-request, daily, and monthly API costs across Claude 5.5, GPT-6, Gemini 4, and DeepSeek V4.

~141 input tokens97 words590 chars
Quick scale:
0%
Cheapest Option

Claude Haiku 5.5 / GPT-6 Luna

$7.92 / month

Total Monthly Tokens (30d)

19,230,000

141 in + 500 out per req

Max Monthly Savings

$625.92

vs. GPT-6.2 Astra ($633.84/mo)

Model Cost Comparison (Sorted Cheapest → Most Expensive)

Edit Input/Output $/1M rates inline or add your own custom model.

ModelInput ($ / 1M)Output ($ / 1M)Cost / ReqDaily CostMonthly Cost
Claude Haiku 5.5Cheapest Option
Anthropic · 1M ctx · 95% output cost
$
$
$0.00026$0.2641
$7.92
GPT-6 LunaCheapest Option
OpenAI · — ctx · 95% output cost
$
$
$0.00026$0.2641
$7.92
DeepSeek Flash
DeepSeek · 1M ctx · 93% output cost
$
$
$0.00064$0.6423
$19.27
Gemini 3.5 Flash-Lite
Google · — ctx · 97% output cost
$
$
$0.00129$1.29
$38.77
DeepSeek V4 Pro
DeepSeek · 1M ctx · 91% output cost
$
$
$0.00217$2.17
$64.98
Gemini 4 Hydrogen
Google · 1M ctx · 95% output cost
$
$
$0.00396$3.96
$118.84
Claude Sonnet 5.5
Anthropic · 1M ctx · 95% output cost
$
$
$0.00528$5.28
$158.46
GPT-6.2 Sol
OpenAI · — ctx · 95% output cost
$
$
$0.00528$5.28
$158.46
Gemini 4 Neon
Google · 1M ctx · 95% output cost
$
$
$0.00792$7.92
$237.69
Claude Opus 5.5
Anthropic · 1M ctx · 95% output cost
$
$
$0.0106$10.56
$316.92
Claude Fable 5.2
Anthropic · 1M ctx · 95% output cost
$
$
$0.0211$21.13
$633.84
GPT-6.2 Astra
OpenAI · — ctx · 95% output cost
$
$
$0.0211$21.13
$633.84

Frequently Asked Questions

Practical tips, formulas, and privacy details for using this tool.

How are LLM API tokens calculated from plain text?

Large language models break text into subword units called tokens using tokenizers like BPE or SentencePiece. For English prose, 1 token averages roughly 4 characters or about 0.75 words—meaning 1,000 tokens equals approximately 750 words. Source code, JSON payloads, URLs, and non-English scripts often split into slightly more tokens per character because of punctuation and UTF-8 byte encoding. Our Paste Prompt estimator combines character count, word count, and symbol density to give a reliable planning figure right inside your browser.

Why do output tokens cost significantly more than input tokens?

Processing your input prompt happens in parallel during the prefill phase, which uses GPU compute efficiently. Generating output tokens, however, is sequential (autoregressive): the model must read memory bandwidth for every single generated token one step at a time. As a result, providers such as Google, OpenAI, and Anthropic typically price output tokens 3× to 8× higher than input tokens—making output length caps one of the highest-leverage ways to control monthly AI spending.

What are the best ways to reduce my monthly LLM API bill?

Four proven engineering techniques can trim AI API costs by 50% to 90%: (1) Model routing—send classification, extraction, and simple chat turns to fast, low-cost models like Claude Haiku 5.5, GPT-6 Luna, Gemini 3.5 Flash-Lite, or DeepSeek Flash, reserving flagship reasoning models strictly for hard tasks; (2) Prompt caching—reuse long static system prompts and reference documents to qualify for cached-input discounts of 90% or more on current Anthropic, OpenAI, Google, and DeepSeek models; (3) Constrain output verbosity using structured JSON schemas and max_tokens limits; and (4) Use Batch APIs for non-real-time background jobs to cut token rates in half.

Can I update the model prices if a provider changes rates or gives me volume discounts?

Yes. AI API pricing evolves rapidly, and enterprise or cached-prompt workloads often have custom rates. Every Input $/1M and Output $/1M cell in the comparison table is directly editable—just type your exact rate and the entire table re-sorts and recalculates per-request, daily, and monthly spend instantaneously. You can also export the comparison table to CSV for stakeholder budgets.

Are my pasted prompts sent to any AI provider or server?

Never. Token estimation, pricing calculations, sorting, and CSV export run 100% locally in your browser with zero external API calls. Proprietary system prompts and customer examples stay completely private on your machine.

More Dev & AI Tools

Browse all 50 tools