← Back to Blog

How to Count Tokens in GPT, Claude & Gemini

Every AI model charges based on tokens — small pieces of text that models process. Understanding token counting is essential for managing API costs and optimizing your prompts.

What Is a Token?

A token is a chunk of text that the AI model processes as a unit. In English:

  • 1 token ≈ 4 characters (about 3/4 of a word)
  • 1 word ≈ 1.3 tokens
  • 1 sentence ≈ 15-20 tokens
  • 1 paragraph ≈ 100-150 tokens

For example: "Hello, how are you today?" = 6 tokens. "The quick brown fox jumps over the lazy dog" = 9 tokens.

Non-English text, code, and special characters may use more tokens per character. Chinese characters typically use 1-2 tokens each, while code often tokenizes into smaller pieces.

Token Pricing by Model (2026)

AI models charge different rates for input tokens (your prompt) and output tokens (the response). Here are prices per million tokens for these models:

Prices change often. Our Token Counter and Model Comparator fetch live pricing for the latest models every time you open them.

ModelInputOutput
GPT-4o$2.50$10.00
Claude 3.5 Sonnet$3.00$15.00
Gemini 1.5 Pro$1.25$5.00
Gemini 1.5 Flash$0.075$0.30
GPT-4o Mini$0.15$0.60
DeepSeek V3$0.27$1.10
Llama 3.1 405B$0.80$0.80

Example cost: A 500-token prompt + 1,000-token response on GPT-4o costs: (500 × $2.50 / 1M) + (1,000 × $10.00 / 1M) = $0.01125 per request. For 1,000 daily requests, that's ~$34/month.

How to Count Tokens Accurately

There are three ways to count tokens:

  1. Use tiktoken (Python): OpenAI's official tokenizer library. Most accurate for GPT models.
  2. Use our AI Token Counter: Browser-based, instant, supports 8+ models. Great for quick estimates.
  3. Use the API response: Most APIs return token counts in the response metadata.

Our AI Token Counter uses multi-factor estimation achieving ~95% accuracy for English text — perfect for cost planning without writing code.

Tips to Reduce Token Usage

  • Be concise: Remove filler words. "Can you please help me with..." → "Help me with..."
  • Use bullet points: Structured input uses fewer tokens than paragraphs.
  • Set max_tokens: Limit response length to avoid paying for unnecessary output.
  • Use system prompts wisely: A well-crafted system prompt reduces back-and-forth.
  • Batch requests: Process multiple items in one prompt instead of one at a time.

Try our Prompt Optimizer to see specific suggestions for reducing token count in your prompts.

Count your tokens instantly — no sign-up required.

Try AI Token Counter →

Frequently Asked Questions

How many tokens is 1,000 words?

For English prose, 1,000 words is roughly 1,300 to 1,400 tokens, because one word averages about 1.3 tokens. Code, URLs, emoji, and non-English text tokenize differently, so check your model’s tokenizer when you need an exact number.

How do I count tokens exactly for GPT-4o?

Use the official tokenizer for your model: tiktoken for OpenAI models (o200k_base for GPT-4o, cl100k_base for GPT-4o and GPT-3.5), or the official Anthropic and Google counting utilities. For quick cost planning, the AI Token Counter estimates in your browser at about 95% accuracy.

Why do token counts differ between AI models?

Every model ships its own tokenizer trained on its own data, so the same sentence can be 40 tokens in one model and 45 in another. That is why you should estimate costs per model instead of assuming one count fits all of them.

Does counting tokens cost money?

No. Tokenization runs locally on your machine and is completely free. You only pay when you send a request to an AI API, and the charge is based on the tokens in that request.