LLM Cost Estimator
Estimate multi-model API cost from tokens or pasted prompts.
OpenPaste text to see characters, words and two quick token estimates as you type.
Add a prompt, system message or document.
Characters, words and two token estimates update live.
See a rough input price for four reference models.
Copy the summary or download it as a text file.
The API rejected your request for exceeding the context limit, or the monthly bill jumped and you want to know which prompt is responsible. You need a fast token figure without installing a tokenizer library. Token Counter gives you one the moment you paste.
The output lists the character count, the word count and two token approximations: characters divided by four, and words multiplied by 1.3. Below that, an input-cost section multiplies the character-based estimate by built-in reference rates for GPT-4o, GPT-4o mini, Claude 3.5 Sonnet and Claude 3 Haiku. Results update on every keystroke, and you can copy them or download a text file of the stats.
The two estimates bracket the real number for most English text. They drift apart on code, JSON and languages without spaces, where the word-based figure is usually too low. When accuracy matters, for instance near a hard context limit, confirm with the provider's own tokenizer. To see roughly where a heuristic would split your text, open the Token Visualizer. To check a prompt against an 8K to 200K window, the Context Estimator shows the percentage used. The LLM token cost comparison guide covers why counts differ between vendors.
Counting is simple arithmetic on the text in this tab, so you can paste internal documents without them leaving the page.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
One divides characters by four and the other multiplies words by 1.3. Both are common rules of thumb. When they agree, the estimate is probably close; when they differ a lot, your text is unusual and a real tokenizer will be more reliable.
No. It only prices the text you pasted as input tokens. Use LLM Cost Estimator when you also want to account for output length and daily call volume.
Less so. Code, JSON, URLs and scripts such as Chinese or Japanese often use more tokens per character than English prose. Add a margin or verify with the vendor tokenizer.