AI Token Counter

Paste any text, such as a system prompt, user message, or model output, and instantly see how many tokens it contains plus what it will cost per API call.

Prices verified June 2026

Paste your text

0 characters
-
tokens

Cost per API call, across major models

Ways to reduce your token count

✂️Cut filler phrases from system prompts. Every word removed multiplies across every call.
📋Use bullet points over paragraphs. Structured instructions are usually clearer and shorter.
🔄Cache long system prompts. Prompt caching can reduce repeated prompt costs significantly.
📏Set max_tokens on every API call. Capped output prevents runaway costs.
🗂️Trim conversation history with a sliding window. Summarize older turns instead of resending everything.
Use cheaper models for simple tasks. Route extraction, classification, and basic summarization to low-cost models.

What Is a Token in AI?

A token is the basic unit of text that language models process. It is not exactly a word or a character. It sits somewhere in between. In English, one token is roughly 4 characters or about 0.75 words. The phrase "Hello, how are you?" is approximately 5 tokens.

Common short words like "the", "is", or "and" are usually single tokens. Longer or uncommon words get split into multiple tokens. Numbers, punctuation marks, and whitespace each count separately toward your total. This is why a 1,000-word document is not exactly 1,000 tokens. It typically comes out to around 1,300.

Understanding your token count matters because every AI API charges separately for input tokens and output tokens. A long system prompt that you send with every API call multiplies in cost across every request your application makes.

Why Token Counts Differ Between Models

Different AI providers use different tokenization methods. OpenAI uses tiktoken. Anthropic uses a similar tokenizer for Claude. Google uses SentencePiece for Gemini. The same text will produce slightly different token counts across models, typically varying by 5 to 10%.

The counter on this page uses a universal approximation: character count divided by 4. This works accurately to within about 10% for standard English text across major models. For production systems where exact counts matter, use the official tokenizer for your specific model.

Code, JSON, and non-English text tokenize differently from plain English prose. Code is usually more token-dense because variable names, brackets, and indentation each consume tokens.

Frequently Asked Questions

1,000 words in English is approximately 1,300 to 1,400 tokens. The ratio is roughly 1.3 tokens per word on average because spaces, punctuation marks, and common word fragments each count separately.
A minimal system prompt of 50 to 100 words uses roughly 65 to 130 tokens. A detailed system prompt with persona, instructions, and examples spanning 500 to 1,000 words uses around 650 to 1,300 tokens.
Yes. Spaces, punctuation marks, newline characters, and special characters all contribute to your token total. Code tends to be especially token-dense because variable names, brackets, semicolons, and indentation whitespace each register separately.
This counter uses a universal approximation based on characters divided by 4. It is usually accurate to within 5 to 10% for standard English text. For exact counts, use the official tokenizer or model API.
Context windows vary by model. Many current premium and long-context models support very large context windows, while cheaper or faster models may support smaller windows. The context window includes your system prompt, conversation history, user message, and model response.
Rewrite instructions in direct language, remove filler phrases, use structured bullet points, delete repeated instructions, and test the shorter prompt against your quality checks before shipping.
Pricing varies widely by model and provider. Budget models can cost cents per million tokens, while premium pro models can cost tens or hundreds of dollars per million output tokens. Always verify pricing at official provider websites before making financial decisions.
Scroll to Top