Count tokens and calculate API cost for GPT-4o, Claude, Gemini, and more. Paste any text to instantly see token count, character count, and estimated cost per model.
Added May 3, 2026
Input
Result
Enter a value for your text or prompt to see your result.
Estimate the token count of any text and calculate the API cost across popular AI models including GPT-4o, Claude, and Gemini. Runs entirely in your browser.
A ~100-word prompt costs a fraction of a cent at GPT-4o input pricing.
Inputs
Result
A token is roughly 4 characters or 0.75 words in English text. The word 'hamburger' is typically 3 tokens; a space and short word like ' is' is 1 token. AI models process text as sequences of tokens, not characters.
The estimate uses a character-to-token ratio (÷4) and a word-to-token ratio (÷0.75), taking the higher value. For typical English prose this is accurate to within ±10%. For code, non-English text, or heavy punctuation the actual count may differ.
GPT-4o is a larger, more capable model. GPT-4o mini is optimized for low cost on simpler tasks. For most chatbots and classification tasks, mini delivers comparable quality at a fraction of the cost.
No. All computation runs in your browser. Your text never leaves your device when using this tool.