GPT Token Counter

Exact GPT token counts using OpenAI's real o200k_base and cl100k_base encodings — run in your browser, nothing uploaded — plus a side-by-side cost comparison across 14 models.

…tokens exact
0characters
0words

What this text would cost, per model

Sorted cheapest first. Assumes 0 input tokens and 500 output tokens. Counts for non-OpenAI rows are estimates.

ModelInput / 1MOutput / 1MEst. costWith cache hits
Gemini 2.5 Flash-Lite · Google$0.1$0.4$0.0002—
GPT-6 Luna · OpenAI$0.1$0.5$0.00025$0.00025
DeepSeek-V4.1 Flash · DeepSeek$0.15$0.6$0.0003$0.0003
DeepSeek-V4 Pro · DeepSeek$0.66$1.98$0.00099—
Gemini 3.8 Flash · Google$0.75$3.75$0.001875—
Claude Haiku 4.5 · Anthropic$1$5$0.0025$0.0025
GPT-6 Sol · OpenAI$2$10$0.005$0.005
Claude Sonnet 5 · Anthropic$2$10$0.005$0.005
Claude Sonnet 5.5 · Anthropic$2$10$0.005—
Gemini 3.1 Pro Preview · Google$2$12$0.006—
Claude Opus 5.5 · Anthropic$4$20$0.01$0.01
Claude Opus 5 · Anthropic$5$25$0.0125$0.0125
GPT-6 Astra · OpenAI$10$50$0.025—
Claude Fable 5.1 · Anthropic$10$50$0.025$0.025

“With cache hits” assumes all input tokens hit the prompt cache, where the provider publishes a cached-input rate. DeepSeek rows use off-peak rates; peak hours cost 2×.

Prices change frequently — last verified 2026-09-30. Rates below are USD per 1M tokens from public pricing pages. Always confirm on the provider's official pricing page before budgeting.

About GPT token counting

OpenAI publishes its tokenizers, which is why GPT counts can be exact: the number you see here is the number OpenAI's API would bill you for. Roughly speaking, 1 token ≈ 4 characters of English, but code, non-English text, and special characters tokenize very differently — which is why measuring beats guessing.

Comparing providers? The main LLM token counter puts GPT side by side with Claude, Gemini, and DeepSeek pricing, and the full API pricing table lists every model's rates. Need one-click OpenAI math? Try the OpenAI pricing calculator.

Frequently asked questions

Is this GPT token count exact?

Yes. This page runs the same o200k_base (GPT-6 / GPT-5) and cl100k_base (GPT-4 and older) encodings OpenAI uses, entirely in your browser via the tiktoken library. It matches what OpenAI's own tokenizer page and API billing would count for the same text.

Which encoding should I choose?

o200k_base for GPT-6 and GPT-5 models; cl100k_base for GPT-4, GPT-3.5, and older. The two encodings usually differ by only a few percent on English text, but for exact billing math use the one matching your model.

Does my text leave my browser?

No. Counting and cost math run locally in JavaScript — nothing is uploaded or logged.

How is the cost table calculated?

Your exact input token count × the provider's public per-million-token rates, plus your expected output length × output rates. The “with cache hits” column uses the published cached-input discount where one exists.

What about ChatGPT (the app), not the API?

ChatGPT Plus/Pro subscriptions are flat-rate, so token counting matters less there. This tool is for API usage, where you pay per token — and for comparing what the same prompt would cost on Claude, Gemini, or DeepSeek instead.