LLM API Cost Calculator
Paste a prompt and an expected output length to estimate the API cost across Claude, GPT, and Gemini models side by side. Prices are refreshed from a public model-pricing catalog every time the site is rebuilt.
Everything runs locally in your browser — your text is never sent to any server, only the price list is fetched ahead of time at build.
Loading tokenizer dictionary…
Applied to every model equally — there is no generated text to tokenize per model, so this is a single estimate you control.
Cost by model
| Model | Input tokens | Output tokens | $ / 1M in · out | Est. cost |
|---|---|---|---|---|
| Claude Opus 4.8 | 0 | 0 | $5 · $25 | $0.00 |
| Claude Sonnet 4.5 | 0 | 0 | $3 · $15 | $0.00 |
| Claude Haiku 4.5 | 0 | 0 | $1 · $5 | $0.00 |
| GPT-5.5 | 0 | 0 | $5 · $30 | $0.00 |
| GPT-5 | 0 | 0 | $1.25 · $10 | $0.00 |
| GPT-4.1 | 0 | 0 | $2 · $8 | $0.00 |
| GPT-4o | 0 | 0 | $2.5 · $10 | $0.00 |
| GPT-4 Turbo | 0 | 0 | $10 · $30 | $0.00 |
| GPT-3.5 Turbo | 0 | 0 | $0.5 · $1.5 | $0.00 |
| Gemini 3 Pro | 0 | 0 | $2 · $12 | $0.00 |
| Gemini 2.5 Flash | 0 | 0 | $0.3 · $2.5 | $0.00 |
Pricing data fetched: 2026-07-15 · Source: OpenRouter public model catalog (reference pricing, not official vendor pricing).
Costs are estimates for rough comparison only — not for billing. Claude and Gemini token counts are heuristic estimates (±10–20%), and per-model chat-API overhead (message structure, system prompt, tool definitions) is not included. Always check the vendor's own pricing page before making a purchasing decision.
The tokenizer dictionary could not be loaded, so the GPT-based input token count is also an approximation.