LLM Token Counter & Cost Estimator
Paste text to see an estimated token count and the input cost across popular models. Counts are estimates; prices are editable. Everything runs in your browser.
| Model | Input $/1M | Output $/1M | Est. input cost |
|---|
About the LLM Token Counter & Cost Estimator
The LLM Token Counter & Cost Estimator gives you a quick read on how large a prompt is and roughly what it would cost to send as input across popular models. It counts characters and words exactly, estimates tokens with a simple heuristic, and applies editable per-model prices to show an estimated input cost. It is built for developers, prompt engineers, and anyone budgeting LLM usage. Everything runs in your browser, so your text is never uploaded.
How it works
- Paste or type your text into the box. Characters, words, and estimated tokens update as you type.
- Read the per-model table to see the estimated input cost for the current token count.
- Edit any input or output price cell to match the rates you actually pay; costs recalculate live.
- Treat the token and cost figures as approximations and verify against the provider for exact numbers.
Features
- Live character, word, and estimated token counts as you type.
- Token estimate that blends a character-based and word-based heuristic, labeled clearly as an estimate.
- Editable price table for GPT-4o, GPT-4o mini, Claude 3.5 Sonnet, Claude 3 Haiku, Gemini 1.5 Pro, and Gemini 1.5 Flash.
- Per-model estimated input cost computed from your token count and the prices you set.
- Runs entirely in your browser with no signup and no data sent to a server.
Frequently asked questions
How accurate is the token estimate?
It is an approximation. The tool blends a character count (about four characters per token) with a word count (about 1.33 tokens per word). Each model uses its own tokenizer, so the real count will differ, especially for code, non-English text, or unusual formatting. Use the provider's own counter when you need an exact number.
Why are the prices editable?
Model prices change over time and vary by tier and region. The table ships with reasonable starting values, but you can edit any cell to match your current rates so the cost estimate reflects what you actually pay.
Does this calculate output cost too?
The table shows the estimated input cost for the text you paste, since that is the part you control directly. It also has an editable output price column so you can keep your own reference, but output cost depends on how much the model generates, which this tool does not predict.
Is my text sent anywhere?
No. Counting and cost estimation happen entirely in your browser. Nothing you paste is uploaded or logged.
How is cost calculated?
Input cost is the estimated token count divided by one million, multiplied by the input price per one million tokens. For example, 50,000 tokens at $3.00 per million is roughly $0.15.