LLM Token Counter & Claude API Cost Calculator

Paste any prompt, code, or document to estimate tokens 100% locally in your browser and compare real-time API costs across 13 Claude 5.5, GPT-6.2, Gemini 4, and DeepSeek V4 models.

Estimated Input Tokens
0
0 words · 0 chars
Cost / Request
$0.00
In $0 + Out $0
Estimated Monthly Bill
$0.00
15,000 req/mo
Context Window
1M
0.000% used

LLM API Pricing Comparison Table (Updated Dec 6, 2026)

Prices in USD per 1M tokens · Source: OpenRouter Public API
Model Provider Context Input / 1M Output / 1M Est. / Req Est. / Month
Claude Sonnet 5.5Anthropic1M$2.00$10.00——
Claude Opus 5.5Anthropic1M$4.00$20.00——
Claude Haiku 5.5Anthropic1M$0.10$0.50——
Claude Fable 5.2Anthropic1M$8.00$40.00——
GPT-6.2 SolOpenAI1.05M$2.00$10.00——
GPT-6.2 AstraOpenAI1.05M$8.00$40.00——
GPT-5.6 LunaOpenAI1.05M$0.20$1.20——
GPT-5.6 TerraOpenAI1.05M$2.00$12.00——
Gemini 4 NeonGoogle1.05M$3.00$15.00——
Gemini 4 HydrogenGoogle1.05M$1.50$7.50——
Gemini 3.8 FlashGoogle1.05M$0.825$4.125——
DeepSeek V4.1 FlashDeepSeek1.05M$0.0503$0.48——
DeepSeek V4 ProDeepSeek1.05M$0.1307$4.40——
Developer Tip · Unified API Router

Switch Between Claude, GPT & DeepSeek with One API Key

Route simple prompts to DeepSeek V4.1 Flash ($0.05/1M) and hard reasoning to Claude Sonnet 5.5 without rewriting SDKs. Cut monthly LLM spend by up to 70%.

Explore OpenRouter →
Developer Tip · Zero-Egress Edge Hosting

Deploy AI Proxy & Caching Workers for Free

Cache repeated system prompts at the edge with Cloudflare Workers & KV to slash input token bills and avoid cold starts.

Explore Cloudflare Workers →

Exact LLM API Cost Formula

Transparent calculation method
Request Cost (USD) = (Input Tokens ÷ 1,000,000 × Input Price) + (Output Tokens ÷ 1,000,000 × Output Price)
Monthly Cost (USD) = Request Cost × Daily Requests × 30 × (0.5 if Batch/Cache enabled, else 1.0)

Frequently Asked Questions

Direct answers for developers & AI search

How many tokens is 1,000 English words in Claude and GPT models?

1,000 English words equals roughly 1,300 to 1,350 tokens in modern BPE tokenizers such as Claude 5.5 and GPT-6.2 (about 4 characters or 0.75 words per token). For Chinese, Japanese, and Korean (CJK) text, expect roughly 1.5 tokens per character.

How much does Claude Sonnet 5.5 API cost per 1 million tokens?

As of December 6, 2026, Claude Sonnet 5.5 costs $2.00 per 1M input tokens and $10.00 per 1M output tokens. Using Batch API cuts both rates by 50% to $1.00 input and $5.00 output per 1M tokens.

Which frontier model has the lowest API cost in late 2026?

DeepSeek V4.1 Flash is the lowest-cost option in our benchmark at $0.0503 per 1M input tokens and $0.48 per 1M output tokens, followed by Claude Haiku 5.5 ($0.10 / $0.50) and GPT-5.6 Luna ($0.20 / $1.20).

Why are output tokens 4× to 5× more expensive than input tokens?

Input tokens are processed in parallel during prefill, while output tokens are generated sequentially one token at a time (memory-bandwidth bound). Keeping responses concise or setting max_tokens is the fastest way to lower API bills.

Is my pasted prompt uploaded to a server?

No. This calculator runs 100% client-side in your browser with zero backend API calls. Your prompts, code, and CSV exports never leave your device.