Multi-Token Model Counter
Count tokens and calculate the USD cost for 9 LLM models in parallel. Client-side, no login, multilingual.
Text to analyze
This tool uses BPE/SentencePiece approximation algorithms. The actual count may differ by up to 10-15% from official tokenizers (tiktoken, HuggingFace). For exact counts use the library of your provider's API. Prices are snapshot as at May 2026 and can vary.
How it works
Paste the text
Any text: prompt, code, article, JSON. Up to 50,000 characters.
Instant estimate
BPE (Byte Pair Encoding) / SentencePiece algorithm for automated Italian-English and technical text language detection.
Cost comparison
Ordered models by cost, Ollama always free on premises. Prices are hard-coded from a 2026-05 snapshot.
Come utilizzare Token Counter Multi-Model
Stick the text
Paste or type in text, prompt, or code to analyze in the input field (up to 50,000 characters).
Choose your cost method
Choose "Only Input" to estimate only the input cost, or "Input + Output" to include a preview of the expected output.
Read the comparative table
Table shows tokens, char/token and USD cost for 9 LLM models, sorted by total cost in ascending order. Ollama on-prem is always marked as €0.
Suggerimenti
- Activate "Input + Output" and stick to a typical model response to estimate the real end-to-end cost, not just the prompt.
- Compare at least one cloud and one on-premises model: cost differences can be of orders of magnitude.
- Be concise — keep similar length. When working with technical text or code, expect fewer tokens than expected.
Domande frequenti
How accurate is the count of tokens?
The tool uses an approximation BPE/SentencePiece algorithm with automatic language detection (IT/EN) and technical text. Typical offset is 10-15% compared to official tokenizers (tiktoken for OpenAI, HuggingFace tokenizer for other models). Always use the official library of the provider before going into production for exact counting.
Why does the same text generate a different number of tokens for each model?
Every family of models uses a different tokenizer (BPE for GPT, SentencePiece for Llama/Mistral, proprietary encodings for Claude and Gemini) with distinct vocabularies and segmentation rules. This results in the same text producing different counts by up to 20-30% between models, especially on non-English text.
Are prices shown up-to-date?
Prices for tokens are a snapshot of May 2026 and are hardcoded in the tool. Providers update price lists periodically, so always check official provider pricing before making final budget estimates.
What does it mean that On-Premises Ollama costs always €0?
Local models executed via Ollama (self-hosted, for example on a dedicated VPS) do not incur token costs since they don't pass through the paid API: the cost is only the hardware infrastructure, already paid upfront. That's why the tool always marks them as €0 and shows them at the top of the ordering list.
Are my data being sent to a server?
No. Token counting and cost calculation occur entirely on the client-side in the browser: no API calls, no text sent to the server. You can use the tool with sensitive text or reserved prompts.