Paste a prompt, pick a model, and estimate token count and API cost. Your text stays in your browser.
How it works
Three steps. Paste the text your model will see. Pick the catalog row that matches your API model. Read Exact or Approx tokens, then project cost with output size, cache, batch, and monthly volume when those levers apply.
- Paste system plus user content (and tools or schemas when they ship every turn).
- Choose GPT for Exact OpenAI encodings, or Claude, Gemini, and Llama rows for labeled Approx planning counts.
- Set expected output tokens and scale by users times messages when you need a monthly API budget.
Exact versus Approx
Exact means TokenCalculator runs a matching OpenAI encoding such as o200k_base in your browser. Approx means the provider tokenizer is not available client-side, so we show an honest heuristic instead of a fake Exact badge. Verify Claude with Anthropic count_tokens and Gemini with Google countTokens before you lock spend.
Start with these guides
- What is a token?: Plain-language definition and why APIs bill this way.
- OpenAI token calculator: Exact GPT counts and API cost workflow.
- ChatGPT token calculator: ChatGPT UI versus API token billing.
- Tokens vs words: English rules of thumb before you paste real text.
Frequently asked questions
Does TokenCalculator upload my prompt?
No. Token counting for supported OpenAI encodings runs in your browser. Prompt text is not uploaded to TokenCalculator servers for counting.
How accurate are the token counts?
OpenAI rows with supported encodings are Exact in-browser. Claude, Gemini, and Llama rows are Approx until you verify with the provider tokenizer or count API.
Can I estimate monthly API cost?
Yes. After you have input tokens, set output size and users times messages per day on the cost calculator. Confirm curated rates on the provider pricing page before contracts.