Free Tools → LLM Token Counter & Cost Calculator

LLM Token Counter & API Cost Calculator

Estimate token counts and compare monthly API costs across 32 models from Anthropic, OpenAI, Google, xAI, and DeepSeek. Live prices sourced directly from each provider — not from training data.

Prices as ofloading... Verify with provider before committing
Honest token counting
Character and word counts are exact. Token counts are estimates because tokenizers differ per model family and only OpenAI publishes theirs (tiktoken). This tool uses per-family chars-per-token heuristics tuned to published averages. For byte-exact OpenAI counts use OpenAI’s official tokenizer.

1. Count tokens

0Characters
0Words
0Lines
0UTF-8 Bytes
OpenAI (cl100k / o200k)
0
Anthropic Claude
0
Google Gemini
0
xAI Grok
0
DeepSeek
0

2. Compare monthly costs

Enter your expected per-request tokens and request volume. Uses the token counts above as defaults, or override manually.

use "Count tokens" above to autofill
e.g. 80% if reusing system prompts
Provider Model Input $/MTok Output $/MTok Cached $/MTok Context Monthly $

Verify before committing. Pricing changes frequently and varies by tier, region, and features (batch discounts, priority tiers, volume commits). Some providers list off-peak or promotional rates — peak/standard-tier rates may be higher. Cached-input pricing applies only to reused prefixes; write-time cache costs are omitted for readability. This tool is a planning aid, not a bill.

3. Model reference

All 32 models tracked. Sort by any column. Click any provider name for its official pricing page.

Provider Family Model Input Output Cached Context Notes

How to estimate LLM API costs before you commit

Model pricing shifts monthly, tokenizers differ per family, and every provider prices things a little differently — per-million tokens vs. per-thousand, cached vs. fresh input, batch vs. real-time. This tool gives you an apples-to-apples monthly-cost view across the current lineup without you memorizing anyone’s pricing page.

Why token counts are estimates (and why that’s honest)

Only OpenAI publishes their tokenizer (tiktoken). Anthropic, Google, and xAI keep theirs private. Every “Claude token counter” tool you see online is estimating, whether they admit it or not. Common heuristics: chars-per-token ~4 for English on GPT models, ~3.5 for Claude, ~4 for Gemini. Real content varies with language, code density, and punctuation. Treat estimates as within ±15%.

What matters more than exact token counts

Data source and freshness

Prices are pulled from each provider’s own pricing page and stored in llm-pricing.json with per-entry source URLs. Retrieval date is shown prominently at the top of the tool. We aim to refresh quarterly — if you spot a stale figure, the source URL is one click away. Never trust an LLM-generated pricing summary (including one from us) without verifying against the provider’s page.

Related tools

More Free Tools