About tokencalc
Who runs it, how the numbers are made, and whose work it builds on.
Who runs it
tokencalc is built and run by AIR-Optic Solutions s.r.o., an internet provider in eastern Slovakia that also sets up local AI for companies. We built it because we needed honest numbers for our own agents. Contact and company details are on the legal notice.
How the counts are made
- Exact. Where a vendor publishes its tokenizer, we run that tokenizer in your browser. Our test suite compares every tokenizer with the reference implementation (OpenAI’s tiktoken and the Hugging Face tokenizers library) on texts in five languages, code, JSON and Markdown.
- Exact, marked with an asterisk. OpenAI has not published the GPT-6 tokenizer. GPT-6 rows use o200k_base, the tokenizer of GPT-5 and GPT-4o.
- Estimate. Claude, Gemini and Grok tokenizers are private. We scale the OpenAI count by a factor and show an error band. The factors for these three are provisional until calibrated against the vendors’ endpoints.
- Exact, from the vendor. On request we ask the vendor’s own token-counting endpoint. The text is passed on for that one count and is not stored.
Counts are for the text itself. Chat formatting adds a few tokens per message, and images, files and tools are counted separately by each vendor.
Where the prices come from
Prices are read from the open LiteLLM price list (MIT licence), which records the vendor page for each model. The date of the last check is in the footer of every page. Announced price changes are added by hand from the vendor’s page. Euro amounts use the European Central Bank reference rate of 2026-11-11. Prices can change without notice: confirm on the vendor’s page before you commit a budget.
Tokenizers and their licences
| Tokenizer | Source | Licence | Download |
|---|---|---|---|
| OpenAI o200k, cl100k | gpt-tokenizer (npm) | MIT | built in |
| Llama 3.x | unsloth/Llama-3.3-70B-Instruct | Llama 3.3 Community License | 1.6 MB |
| Qwen3.8 | Qwen/Qwen3.8-27B | Apache-2.0 | 2.5 MB |
| Qwen3 | Qwen/Qwen3-8B | Apache-2.0 | 1.4 MB |
| DeepSeek V4 | deepseek-ai/DeepSeek-V4-Flash | MIT | 1.3 MB |
| Gemma 4 | google/gemma-4-12b-it | Apache-2.0 | 3.2 MB |
| Mistral Small 4 (Tekken) | mistralai/Mistral-Small-4-119B-2603 | Apache-2.0 | 1.7 MB |
| Phi-4 | microsoft/phi-4 | MIT | 0.9 MB |
| nomic-embed-text v1.5 | nomic-ai/nomic-embed-text-v1.5 | Apache-2.0 | 0.1 MB |
| GLM-5.3 | zai-org/GLM-5.3 | GLM-5.3 licence (custom) | from Hugging Face |
| MiniMax M3 | MiniMaxAI/MiniMax-M3 | MiniMax community licence (custom) | from Hugging Face |
| Mistral Large 4 | mistralai/Mistral-Large-4-1T-A52B | Mistral licence (custom, 'other' on the Hub) | from Hugging Face |
Tokenizers under a custom licence are not hosted here. When you ask for an exact count with one of them, your browser loads it directly from Hugging Face.
Built with Llama. The Llama 3 tokenizer is distributed under the Llama 3.3 Community License, copyright Meta Platforms, Inc.
Software we build on
gpt-tokenizer (MIT), Hugging Face tokenizers.js (Apache-2.0), the Model Context Protocol TypeScript SDK (MIT), TOON (MIT), yaml (ISC), Astro (MIT) and Hono (MIT). The language comparison uses the Universal Declaration of Human Rights in the UDHR in Unicode text files.
Estimate factors in use
For open tokenizers that are not loaded yet, estimates use the ratio measured on our 14 reference texts, for example 1.016 for Llama 3 and 1.069 for Qwen3.8 against the OpenAI tokenizer.