How to count the tokens in a prompt before you send it

To count the tokens in a prompt, you can estimate or measure exactly. A fast estimate for English: one token is about four characters, or three-quarters of a word, so 100 tokens is roughly 75 words. For the exact number, run your prompt through a tokenizer — OpenAI's Tokenizer or the tiktoken library, your model's token-counting API, or an on-device app. Estimate and exact differ because models split text into sub-word tokens: a 27-word prompt can be 36 tokens, and a word like "Summarize" becomes three. Counting matters for two reasons — staying inside a model's context window and controlling cost, which APIs bill per million tokens for both your prompt and the reply. On iPhone, Promptler's MeterMuse counts a prompt's tokens on-device and free, without sending your text to a website.

What is a token?

A token is the unit AI models read text in — usually a short chunk of characters, not a whole word. Models don't see letters or words; they break text into tokens first, where a token might be a whole common word, a word fragment, a space, or a punctuation mark. As a rule of thumb for English, one token is about four characters or three-quarters of a word, so 100 tokens lands around 75 words. Even a tiny string carries more tokens than you'd guess: Hello, world! is four tokens, because the comma and the exclamation mark are tokens of their own. Everything an AI model does — its context limit, its speed, its price — is measured in these units, which is why counting them is worth a minute of your time.

How do you count the tokens in a prompt?

There are four practical ways, from roughest to exact. Estimate by dividing your character count by four (or multiplying words by about 1.33) — instant, but only approximate. Use a tokenizer tool like OpenAI's web Tokenizer, which shows the exact split for GPT models. Use a library or API: tiktoken is OpenAI's open-source local counter, and Gemini and Claude both expose free token-counting endpoints you can call before you send. Use an on-device app so the prompt never leaves your phone. One caveat for every method: counts vary by model, because each model family tokenizes a little differently — so count with the tokenizer that matches the model you'll actually use.

How many tokens is my prompt? A worked example

Take a realistic, reusable prompt and count it three ways:

"You are a helpful assistant. Summarize the article below in exactly three bullet points, each under 20 words, for a busy executive. Then suggest one follow-up question."

Characters168
Words27
Estimate (characters ÷ 4)~42
Exact tokens36

The exact count is 36 tokens — and it's the same whether you're on GPT-4 or GPT-4o. Notice the character estimate (42) overshot by six: rules of thumb are useful for a gut check but aren't reliable when tokens matter. The reason the numbers wobble is sub-word splitting — common words stay whole, but others break apart:

  • SummarizeSummarize
  • executiveexecutive
  • follow-upfollow-up

So one word can be one token or three. That's why two prompts with the same word count can have noticeably different token counts, and why an exact tokenizer beats counting words when you're close to a limit.

Why do tokens matter — context limits and cost?

Tokens are the currency of every model, so they cap two things you care about. First, the context window: each model can only hold so many tokens at once — modern models range from about 128,000 tokens to over a million — and your prompt, any attached files, and the reply all share that budget. Overflow it and the model silently forgets the earliest part of the conversation. Second, cost: paid APIs price by the token, quoted per million, and you pay for input and output, so a wordy prompt you send hundreds of times a day adds up. Counting before you send is how you catch a prompt that's about to blow the context window or quietly cost more than it should — especially a long reusable template you fire repeatedly.

How do you count tokens on iPhone without sending your prompt to a website?

Use an on-device counter so the text never leaves your phone — most web token counters work by transmitting whatever you paste to their server, which is fine for throwaway text but not for a client brief or anything sensitive. On iPhone and iPad, Promptler's built-in MeterMuse tool counts a prompt's tokens locally, with color-coded warnings as you approach common limits, and it's free with no tiers. Because the count happens on-device, you can check a confidential prompt without handing it to a third party — and the prompts you're measuring are already saved in the same app. Keep them tidy so the ones you measure are easy to find — see how to organize AI prompts.

Count tokens on-device, free

Promptler's MeterMuse counts your prompt's tokens locally — no website, no account — alongside the prompts you've saved and organized. Free to start with 15 slots.

Get Promptler on the App Store

Written by Francisco Martinez

Founder of Promptler and former software engineer at LinkedIn. About the author.

FAQ

How many words is 1,000 tokens?

About 750 words in English, because one token is roughly three-quarters of a word. That's an average, not a rule: short common words can be a single token while longer or unusual words split into several, so the same word count can land a little above or below 1,000 tokens. For an exact figure, run the text through a tokenizer rather than relying on the estimate.

Do tokens include the AI's response?

Both directions count. Your prompt's tokens and the model's reply tokens are added together against the context window, and on paid APIs you are billed for input tokens and output tokens separately. So when you are budgeting for a context limit or a cost estimate, count the prompt and leave room for the answer you expect back.

← All Promptler guides