Saved
AI & LLM tools·Token Tools

LLM Token Counter

Count tokens and see context window usage for GPT-5, Claude 4, and Gemini 3. Paste text for token count, cost per request, and cost per 1,000 requests across.

Added May 3, 2026 · Updated May 27, 2026

Quick examples

Input

Result

Enter a value for your text or prompt to see your result.

How it works

Paste any prompt or document to estimate token count, see how much of the model's context window you're using, and compare API cost per 1,000 requests across GPT-5, Claude 4, Gemini 3, and more — all in your browser.

Step by step

  1. 01Paste your prompt, system message, or document into the text area.
  2. 02Select the AI model you plan to use.
  3. 03Review context window used — how much of the limit your input (and optional output estimate) consumes.
  4. 04Optionally enable estimated output tokens for a fuller per-request cost.
  5. 05Compare cost per 1,000 requests across all hosted models in the table; switch models in the dropdown for per-request detail.

Examples

100-word prompt on GPT-5.4

A ~100-word prompt costs a fraction of a cent at GPT-5.4 input pricing and uses a tiny slice of a 1M-token context window.

Inputs

Model:
gpt-5-4
Your text or prompt:
Write a detailed analysis of renewable energy trends in Europe over the last decade, covering solar, wind, and hydro power. Include data from major economies and compare growth rates. Discuss policy impacts and investment levels. Conclude with projections for 2030 and key challenges remaining.

Result

Input token count:
74
Cost per request (selected model):
0.000185
Note: Token estimates use a character-and-word approximation that is accurate to ±10% for English text. Non-English or code-heavy text may differ from provider tokenizers. Context window sizes are published limits; providers may update them. See our guide on context windows for details. Pricing figures are refreshed on each production build. Always verify at the provider's pricing page before budgeting.

Frequently asked questions

What is a token in AI models?

A token is roughly 4 characters or 0.75 words in English text. The word 'hamburger' is typically 3 tokens; a space and short word like ' is' is 1 token. AI models process text as sequences of tokens, not characters.

How accurate is this token count?

The estimate uses a character-to-token ratio (÷4) and a word-to-token ratio (÷0.75), taking the higher value. For typical English prose this is accurate to within ±10%. For code, non-English text, or heavy punctuation the actual count may differ.

How is context window used calculated?

We add your estimated input tokens plus optional output tokens and divide by the model's published context limit. Input and output both count toward the window for a single API call.

Why does GPT-5.4 cost more than GPT-5.4 mini?

GPT-5.4 is a larger, more capable model. GPT-5.4 mini is optimized for lower cost on simpler tasks. For many chatbots and classification tasks, mini can be cheaper while still meeting the quality bar.

Is my text sent to any server?

No. All computation runs in your browser. Your text never leaves your device when using this tool.