Skip to content
MyToolers

AI Token Counter & Cost Calculator

Estimate tokens in any prompt and work out the API cost for your requests.

Estimated tokens
≈ 0
Words
0
Characters
0

API cost (optional)

Enter the prices from your AI provider's pricing page — they change often, so we don't fill them in.

Add the input and output prices to see the cost.

Token counts are estimates (about 4 characters per token for English). Each model family uses its own tokenizer, so the exact count can differ by 10–20% or more. Your text stays in your browser.

About this tool

Paste a prompt, document or chat history to estimate how many tokens it uses with AI models such as ChatGPT, Claude and Gemini, alongside the word and character count. Then enter the input and output prices from your provider's pricing page to see what one request — and a thousand — will cost. The prices are yours to enter, so the calculator never shows an out-of-date rate.

How to use it

  1. Paste your prompt or text into the box — the token estimate updates as you type.
  2. Copy the input and output prices per 1 million tokens from your AI provider's pricing page.
  3. Set the expected reply length and the number of requests to see the cost per request and in total.

Good to know

  • Tokens are estimated at about 4 characters per token for English. Urdu, Arabic, Hindi and Chinese use more tokens per character, which the estimate allows for.
  • Each model family uses its own tokenizer, so real counts can differ by 10–20% or more. For an exact figure, use your provider's own token counter.
  • Cost = (input tokens × input price + output tokens × output price) ÷ 1,000,000, per request.
  • Output (reply) tokens usually cost several times more than input tokens, so long answers drive most of the bill.
  • Your text never leaves your browser.

Tokens, words and characters

Language models don't read words; they read tokens. In English a token is about 4 characters or three-quarters of a word, so 1,000 tokens is roughly 750 words and a 1,500-word article is about 2,000 tokens. Every request is billed on the tokens you send (input) and the tokens the model writes back (output), and every model has a context window — the most tokens it can handle at once.

Worked example: cost of a customer-support bot

Say each request sends a 1,500-token system prompt plus a 500-token customer message (2,000 input tokens) and gets a 400-token reply. At example prices of $3 per million input tokens and $15 per million output tokens, one request costs 2,000 × 3 ÷ 1,000,000 + 400 × 15 ÷ 1,000,000 = $0.006 + $0.006 = $0.012. For 50,000 requests a month that is $600.

Shortening the system prompt to 800 tokens saves 700 input tokens per request — about $105 a month at these example prices. Check your provider's current prices before you budget.

Ways to spend fewer tokens

Keep system prompts tight and remove repeated instructions; send only the part of a document the question is about; ask for answers with a word or bullet limit; and use smaller, cheaper models for simple jobs such as classification. Many providers also discount repeated (cached) prompt prefixes.

Frequently asked questions

What is a token?

A token is a chunk of text a language model reads — often a whole short word, part of a longer word, or a punctuation mark. In English, 1,000 tokens is roughly 750 words.

How do I calculate the cost of an API call?

Multiply input tokens by the input price per million and output tokens by the output price per million, add them and divide by 1,000,000. Multiply by your number of requests for the total.

Why doesn't the calculator include model prices?

AI providers change prices and release new models often. A built-in price list would soon be wrong, so you paste the current prices from the provider's pricing page.

Why does Urdu or Arabic text use more tokens?

Tokenizers are trained mostly on English, so text in other scripts is split into smaller pieces. The same sentence can take two or more times as many tokens in Urdu as in English.

How can I reduce my token costs?

Shorten long system prompts, send only the context the model needs, ask for concise answers with a word limit, and reuse cached prompts where your provider supports it.