What is an AI Token?
Large Language Models (LLMs) like ChatGPT and Claude do not read words the way humans do. Instead, they break text down into "tokens." A token can be a single character, a part of a word, or an entire word. As a general rule of thumb for English text, **1 token is approximately 4 characters** or **0.75 words**.
Why calculate API costs?
When you build an AI application or use tools like OpenAI's API or Anthropic's API, you are billed based on the number of tokens you send (Input Tokens) and the number of tokens the AI generates (Output Tokens). If you are passing large documents, entire codebases, or complex system prompts, these costs can add up extremely fast. This tool helps developers and founders estimate pricing before running large batches.
100% Client-Side Privacy
We know you are pasting sensitive codebases, proprietary prompts, or confidential documents to estimate their size. This calculator operates entirely in your browser using JavaScript heuristics. Your data is never sent to a server.