Free tool· No sign-up

Token calculator for AI models

Paste your text and see how many tokens it will consume in ChatGPT, Claude, GPT-4o, Gemini, and other models. Calculated locally in your browser — your text never leaves your device.

100% private · everything computed in your browser

Characters

0

Words

0

Tokens (estimated)

0

Estimated cost per model

GPT-4oinput: $0.00output (same # tokens): $0.00Total estimated: $0.00
GPT-4o Miniinput: $0.00output (same # tokens): $0.00Total estimated: $0.00
Claude Sonnet 4input: $0.00output (same # tokens): $0.00Total estimated: $0.00
Claude Haiku 4input: $0.00output (same # tokens): $0.00Total estimated: $0.00
Gemini 2.5 Proinput: $0.00output (same # tokens): $0.00Total estimated: $0.00

Official public 2026 pricing per 1M tokens. ±5% margin.

What is a token?

A token is the minimum unit AI models process. In English, one token equals roughly 4 characters or 0.75 words. Models charge separately for input and output tokens, with different rates for each.

Why calculate tokens?

To estimate costs before processing long documents, fit prompts within the model's context window, and understand why the same text can cost more or less depending on the tool.

For long documents

Need to generate a 100+ page document?

General-purpose models lose coherence on long documents. Nomos uses multi-agent architecture to maintain coherence across chapters, with predictable per-credit pricing (not per-token).

Try Nomos free

Frequently Asked Questions

Is this calculator exact?

The calculation is an approximation. Each model uses its own tokenizer (BPE in GPT, SentencePiece in Gemini). The estimate has a margin of ±5%. For mission-critical budgets, consult the official tokenizer of the model you'll use.

Is my text sent to any server?

No. All calculation happens in your browser with JavaScript. Your text never leaves your device. This page even works offline once loaded.

Why does Claude charge differently than GPT?

Each provider sets pricing based on inference cost and commercial strategy. Prices shown here are the official public rates in 2026. The most capable models (Opus, GPT-4o) cost more; the fast ones (Haiku, Mini) cost less.

How many tokens fit in a model?

It depends on the model: GPT-4o supports 128k tokens, Claude Sonnet 4 supports 200k tokens, Gemini 2.5 Pro supports 1M tokens. But real performance degrades when the window fills up — models forget information from the middle of the context.