← Free AI tools

Token Counter

Paste any text to count tokens and see what it costs across every major OpenAI, Google Gemini, and Anthropic model. Pricing updated March 2026.

Try a sample:
0 tokens·0 chars·0 words·0 lines

Cost at 0 tokens — across all models(paste text above to see costs)

ModelInput $/1MOutput $/1MCost as input
OpenAIGPT-5.4Popular
$2.50$15.00
OpenAIGPT-5 mini
$0.25$2.00
OpenAIGPT-4.1
$2.00$8.00
OpenAIGPT-4.1 mini
$0.40$1.60
OpenAIGPT-4o
$2.50$10.00
OpenAIGPT-4o mini
$0.15$0.60
OpenAIo3
$2.00$8.00
OpenAIo4-mini
$1.10$4.40
GoogleGemini 3.1 ProPopular
$2.00$12.00
GoogleGemini 2.5 Pro
$1.25$10.00
GoogleGemini 2.5 Flash
$0.30$2.50
GoogleGemini 2.0 Flash
$0.10$0.40
AnthropicClaude Opus 4.6Popular
$5.00$25.00
AnthropicClaude Sonnet 4.6
$3.00$15.00
AnthropicClaude Haiku 4.5
$1.00$5.00
AnthropicClaude Opus 4.1
$15.00$75.00
AnthropicClaude Sonnet 4
$3.00$15.00
AnthropicClaude Haiku 3
$0.25$1.25

“Cost as input” is what you pay to send this text as a prompt. Output tokens (the model's reply) are billed separately at the Output $/1M rate.

Know your total. Now find out which customers are driving it.

PerUnit breaks down AI spend by customer, feature, and pricing tier — so you know exactly who is consuming the most tokens.

Get early access to PerUnit

Frequently asked questions

What is a token in AI models like GPT-4o and Claude?
A token is a chunk of text — roughly 4 characters or 0.75 words in English. The word "hamburger" is 3 tokens. A 1,000-word document is approximately 1,300 tokens. Both your prompt (input) and the model's reply (output) consume tokens and are billed separately — usually at different rates, with output costing 3–6x more.
How many tokens is my prompt?
Paste your prompt into the box above to get an instant estimate. As a rule of thumb, 1 token ≈ 4 characters of English text. A typical system prompt of 500 words is roughly 650–700 tokens. Longer system prompts that repeat every request significantly increase your costs.
Do different AI models count tokens differently?
Yes. OpenAI models use the tiktoken BPE tokenizer, while Anthropic's Claude models use a different tokenizer. Token counts for the same text can differ by 5–15% between providers. This counter uses the 4-characters-per-token approximation, which is accurate enough for cost estimation across both providers.
How much does 1,000 tokens cost on GPT-4o?
At standard pricing, 1,000 input tokens on GPT-4o costs $0.0025 (that's $2.50 per 1 million tokens). Output tokens cost $0.01 per 1,000 tokens ($10.00 per 1M). The table above shows the cost for your specific text across all major models.
What is the maximum context length for GPT-4o and Claude?
GPT-4o supports up to 128,000 tokens of context. Claude Sonnet 4.6 and Claude Opus 4.6 support up to 200,000 tokens. This means Claude can process significantly longer documents in a single request — useful for tasks like contract review or long-form summarisation.
How can I reduce token usage in my AI application?
The most effective strategies are: (1) shorten your system prompt — every token in your system prompt is charged on every single request, (2) use prompt caching for static context that repeats across requests, (3) truncate conversation history rather than sending the full thread, and (4) route simpler tasks to smaller models with lower token limits. Identifying which features and customers generate the most tokens is the first step — that's what PerUnit provides.