LLM Token Calculator
Count prompt tokens locally in your browser and estimate OpenRouter API costs using its published model pricing.
Loading OpenRouter pricing…
For non-OpenAI models, select Transformers.js and enter the matching Hugging Face tokenizer repository. OpenRouter model IDs do not necessarily equal Hugging Face repository IDs.
Input tokens—
Output tokens—
Estimated input cost—
Estimated total cost—
—
—
—
—
Text-only estimates exclude image/audio/video processing, cached-token discounts, reasoning tokens, tool calls, provider-specific chat framing, and per-request fees. OpenRouter rates are per token; figures here convert them to per-million rates. Actual billed usage may differ.