AI Token Counter & LLM Cost Calculator
AI Token Counter tokenizes your text in the browser and shows what it costs to send to the popular LLM APIs. Counts are exact for OpenAI models (o200k_base encoding) and clearly-labelled estimates for Claude and Gemini, whose tokenizers aren't public — Claude typically tokenizes 10–20% higher than the GPT count. The built-in price table covers current GPT, Claude and Gemini models per million input/output tokens and is fully editable, so it never goes stale. Nothing you paste leaves your device — useful when the prompt you're costing is confidential.
Última actualización: July 2026
To count tokens, paste your prompt — it's tokenized locally with the same o200k encoding OpenAI's models use, giving exact counts for GPT models and close estimates for Claude and Gemini (which use their own tokenizers). The cost table then multiplies your input and expected output tokens by each model's per-million-token price, and every price is editable so you can keep it current or add your own models.
Cómo usar AI Token Counter & LLM Cost Calculator
- Paste your prompt or document.
- Read the token count, character and word stats.
- Set your expected output length and compare cost per model — edit any price to match current rates.
Preguntas frecuentes
How many tokens is my text?
Paste it here — as a rule of thumb English text runs ~4 characters or ~0.75 words per token, but the exact count depends on the tokenizer; this tool computes it precisely with the o200k encoding used by current GPT models.
Are the counts exact for Claude and Gemini?
No — Anthropic and Google don't publish their tokenizers. The tool shows the GPT-tokenizer count plus an adjusted estimate for Claude (typically 10–20% more tokens for the same text). For billing-accurate Claude counts, use Anthropic's count-tokens API endpoint.
How is cost calculated?
Input tokens × the model's input price per million, plus your expected output tokens × the output price per million. Prices ship with current published rates and every cell is editable.
Is my prompt uploaded?
No — tokenization happens entirely in your browser, so it's safe to paste confidential prompts and documents.
herramientas para desarrolladores relacionadas
Contador de palabras
Cuenta palabras, caracteres, frases y párrafos al instante mientras escribes, gratis y en tu navegador. Nada se sube.
Contador de caracteres
Cuenta caracteres, palabras, frases y parrafos en tiempo real.
Formateador y validador JSON
Formatea, embellece, minifica y valida JSON al instante. Gratis, privado y en tu navegador, con mensajes de error claros.
Generador de prompts para IA
Genera prompts estructurados para ChatGPT, Claude, Gemini y mas.