{"head":{"title":"Token Counter: Estimate LLM Tokens and Cost | OceanLab","description":"Paste text to estimate its tokens for GPT, Claude, Gemini and more, and what it would cost as input. The method is shown and every ratio is editable.","canonical":"https://oceanlab.in/tools/token-counter"},"tool":{"slug":"token-counter","path":"/tools/token-counter","name":"Token counter","h1":"LLM token counter","lede":"Paste any text to estimate how many tokens it is, and what it would cost to send to each model.","category":"ai","categoryTitle":"AI cost and planning","method":["This is an estimate, not a tokenizer. Tokens ≈ the average of (characters ÷ characters per token) and (words × tokens per word), with Chinese, Japanese and Korean characters counted at about one token each.","The range shown is ±20% around the estimate. Code, numbers and rare words can fall outside it.","Each model family has its own tokenizer. For exact counts, use the provider's token-counting endpoint.","The cost table prices the estimated tokens as input on each model, at the prices shown with their checked dates."],"sources":[{"label":"Anthropic API pricing","url":"https://platform.claude.com/docs/en/about-claude/pricing","checkedAt":"2026-10-23"},{"label":"OpenAI API pricing","url":"https://developers.openai.com/api/docs/pricing","checkedAt":"2026-10-23"},{"label":"Google API pricing","url":"https://ai.google.dev/gemini-api/docs/pricing","checkedAt":"2026-10-23"},{"label":"DeepSeek API pricing","url":"https://api-docs.deepseek.com/quick_start/pricing","checkedAt":"2026-10-23"},{"label":"MiniMax API pricing","url":"https://platform.minimax.io/docs/pricing/overview","checkedAt":"2026-10-23"}],"faq":[{"question":"Is this an exact token count?","answer":"No. It is an estimate from characters and words, shown as a range. Each model family has its own tokenizer; use the provider's token-counting endpoint for exact numbers."},{"question":"Why do code and other languages count differently?","answer":"Tokenizers are trained mostly on English text, so code, numbers and other scripts often split into more tokens per character."},{"question":"Is my text sent anywhere?","answer":"No. Counting happens in your browser and the text is not stored or put in the page link."}],"notice":{"title":"An estimate.","text":"Real token counts depend on each model's tokenizer; this tool estimates them from characters and words."},"updatedAt":"2026-10-25"},"related":[{"href":"/tools/llm-api-cost-calculator","label":"LLM API cost","detail":"Enter your monthly tokens and the input, cached and output mix, and compare what each model would cost."},{"href":"/tools/prompt-caching-savings","label":"Prompt caching savings","detail":"See how much prompt caching would save on each model, and the hit rate you need before it pays off."},{"href":"/tools/embedding-cost-calculator","label":"Embedding cost","detail":"Enter the size of your documents and compare what embedding them costs on each model, now and each month."}],"studies":[{"meta":{"slug":"kaganek","industry":"ai","projectType":"RAG knowledge assistant","country":"pl","tags":["ai","enterprise"],"compliances":["GDPR","EU AI Act","ISO/IEC 27001","ISO/IEC 42001","Polish labour law"],"cover":{"src":"/case-studies/kaganek/01-home.png","width":1440,"height":1000}},"text":{"en":{"title":"Kaganek - RAG Knowledge Assistant with Citations and Permissions Intact","description":"Designed and built a clickable internal knowledge assistant for a Kraków consulting engineering firm: staff ask in Polish or English and get answers built only from the firm's own SharePoint, Confluence, Google Drive and file share documents, with every claim linked to its source passage and an honest \"I don't know\" when the sources are weak.","category":"AI Agents & Automation / Knowledge Assistant","client":"Modrzew Engineering"}}},{"meta":{"slug":"sonde","industry":"ai","projectType":"AI evaluation dashboard","country":"fr","tags":["ai","enterprise","insurtech"],"compliances":["EU AI Act","GDPR (Article 9 health data)","DORA","HDS health data hosting","ACPR AI governance","OpenTelemetry GenAI conventions"],"cover":{"src":"/case-studies/sonde/01-home.png","width":1440,"height":1000}},"text":{"en":{"title":"Sonde - LLM Evaluation and Observability Platform with Release Gates","description":"Designed and built a clickable LLM evaluation and observability platform for the AI team of a French health mutual: redacted production traces span by span, release gates that block a prompt or model change when quality regresses, alerts with owners and ageing, and the monitoring record its risk and compliance teams can show a supervisor.","category":"AI & Automation / LLM Evaluation","client":"Mutuelle Serpolet"}}},{"meta":{"slug":"lektor","industry":"ai","projectType":"Code review agent","country":"ch","tags":["ai","enterprise","fintech"],"compliances":["Swiss Banking Act Art. 47","FINMA Circular 2023/1","FINMA Guidance 08/2024","revFADP","ArGV 3 Art. 26","OWASP Top 10","CWE"],"cover":{"src":"/case-studies/lektor/01-home.png","width":1440,"height":1000}},"text":{"en":{"title":"Lektor - AI Code Review Agent That Comments but Never Merges, Hosted Inside a Private Bank","description":"Designed and built a clickable AI code review agent for the engineering team of a Zurich private bank: it reviews every merge request on GitLab and GitHub Enterprise with models hosted in the bank's own tenancy, masks client data and secrets before any model sees the diff, posts inline findings with rule, CWE and suggested patch, and never approves or merges.","category":"AI Agents & Automation / Code Review Agent","client":"Brunnacher & Cie AG"}}}],"more":[{"href":"/case-studies/industry/ai","label":"AI agents & automation case studies","detail":"Every OceanLab product build in AI agents & automation."},{"href":"/case-studies","label":"All case studies","detail":"Every OceanLab product build."},{"href":"/ai-automation","label":"AI automation","detail":"AI built into real business workflows, with people in charge."}],"today":"2026-10-25"}