AI Token & Cost Calculator
Estimate token counts and real-money API costs across 22+ models instantly — with prompt caching savings, context window tracking, and side-by-side comparison.
Models
6 selectedType a prompt to see token counts and cost estimates instantly.
How it works
Paste your prompt
Type or upload your system prompt, user message, and expected output into the input area.
Select models
Choose which LLMs to include in your comparison — OpenAI, Anthropic, Google, and more.
See instant results
Token counts and dollar costs update in real time as you type — no button clicks needed.
Optimize costs
Use the cache hit slider to model prompt caching savings. Export results as CSV or Markdown.
Privacy & accuracy
Your prompts never leave your browser. All token counting happens locally using JavaScript — no text is sent to our servers or any third party.
Accuracy. Counts are estimates based on BPE tokenizer heuristics calibrated per model family. For production use, verify with each provider's official API (e.g., OpenAI's tiktoken, Anthropic's count_tokens endpoint). Estimates are typically within ±5% of actual counts for English text.
Pricing. Prices are updated manually and may not reflect the latest provider changes. Always verify costs on the official pricing pages before making budget decisions.