Token & cost calculator

Paste text or enter token counts to estimate what a request costs across the models in the TokenCheat pricing catalog. Built for engineers sizing prompts, comparing models, or sanity-checking a bill before it arrives.

The math: tokens ≈ characters / 4 for English and code, then cost = (tokens / 1,000,000) × the per-million rate, computed separately for input and output. A 3:1 output:input ratio and an optional prompt-cache share are applied as defaults you can override.

Model prices verified .

Estimate

Tokens
0
Input cost (uncached share)
$0.0000
Output cost (3:1 default)
$0.0000
Cache read cost
$0.0000
Total
$0.0000
Approx. cache vs all-input baseline
−$0.0000

How to read the results

Input and output are billed at different rates, so the split matters more than the total. If your workload is verbose (code generation, long explanations), the output lane usually dominates. Treat every number here as an estimate — the chars/4 heuristic drifts on JSON, non-English text, and dense code, and real tokenizers differ by model.

FAQ

How is the token count estimated?
With the ~4 characters per token heuristic that holds roughly for English prose and typical code. It is an estimate, not a tokenizer: JSON, whitespace-heavy code, and non-English text can tokenize meaningfully differently. Verify against your provider invoice or the provider's tokenizer for anything budget-critical.
How is cost computed?
Per-million rates from the pricing catalog, multiplied by (tokens / 1,000,000) for each lane. Worked example: at $3/M input, 1M input tokens = $3.00; output is billed separately at its own rate.
What are the limitations?
It doesn't see batch-API discounts, tiered pricing, or the system-prompt and tool-definition overhead your harness prepends to every request — which is often the larger cost driver in agentic coding workflows.
When should I use this vs the full audit?
Use this for one-off prompt sizing and model comparisons. The full stack audit looks at your whole setup — CLAUDE.md size, MCP overhead, and caching posture — where recurring waste actually lives.

For your full setup, run the free stack audit — or see the 100-configs report.