AI Token Calculator

Paste any text to instantly count tokens for ChatGPT, Claude, and Gemini. Free, no signup, runs in your browser.

0
Tokens
0
Characters
0
Words
0
Sentences

Estimated API cost

What are AI tokens?

Tokens are the units AI models use to process text — roughly 1 token ≈ 4 characters or ¾ of a word in English. API pricing is based on how many tokens you send (input) and receive (output).

How accurate is this calculator?

We use a cl100k-style approximation (4 chars/token) which matches GPT-4o and Claude within ~5% for typical English text. For exact counts, use the official tiktoken library.

Why does token count matter?

Context windows (how much text a model can "see") are measured in tokens. Staying under the limit avoids truncation — and estimating cost before a large API call saves money.

How many tokens is 1000 words?

Approximately 1,300–1,500 tokens for standard English prose.

AI model pricing comparison (June 2026)

All prices per 1 million tokens. Output tokens cost more than input tokens across all models.

Model Input /1M Output /1M Context
GPT-4o$2.50$10.00128K
GPT-4o mini$0.15$0.60128K
GPT-3.5 Turbo$0.50$1.5016K
Claude Sonnet 4$3.00$15.00200K
Claude Haiku 4.5$0.80$4.00200K
Gemini 2.0 Flash$0.10$0.401M
Gemini 2.0 Pro$1.25$5.001M

Prices change frequently. Verify at openai.com/pricing and anthropic.com/pricing.

How to use this AI token calculator

This tool gives you an instant token count estimate for any text. Here is how to get the most out of it:

  1. Select your model — Different models use slightly different tokenizers. Pick the model you are using or testing.
  2. Paste your text — Include your full prompt: system message, context, and user input. The calculator counts everything.
  3. Read the token count — This tells you how many tokens your input uses. Compare against the model's context window limit.
  4. Check the cost estimate — The cost table shows what sending this text as input would cost across all major models.

For a deeper guide on token counting strategies, see AI Token Calculator: Complete Guide.

Tips for reducing token count

  • Remove unnecessary preamble such as "Please" or "I would like you to"
  • Use bullet points instead of full sentences in prompts
  • Summarize long documents before sending
  • For code: strip comments and blank lines when they are not needed

See our full guide: How to Reduce AI API Costs.

Related tools & guides

→ Prompt Generator
→ What Are AI Tokens? (Full explainer)
→ ChatGPT vs Claude: Which handles long context better?