Skip to main content
ModelTerms

Tool

Tokenizer & LLM cost calculator

Paste any text and see how many tokens it becomes — and what it would cost — across GPT-4o, Claude, Gemini, and Llama. Runs entirely in your browser.

290 characters49 words

Adjust to estimate completion cost. Set to 0 to see input cost only.

Cost per provider

ModelInput tokensInput costOutput costTotal
GPT-4o
OpenAI
73$0.0002$0.0050$0.0052
GPT-4o mini
OpenAI
73<$0.0001$0.0003$0.0003
GPT-4 Turbo
OpenAI
73$0.0007$0.015$0.016
Claude Opus 4
Anthropic
82$0.0012$0.037$0.039
Claude Sonnet 4
Anthropic
82$0.0002$0.0075$0.0077
Claude Haiku 4
Anthropic
82<$0.0001$0.0020$0.0021
Gemini 1.5 Pro
Google
73<$0.0001$0.0025$0.0026
Gemini 1.5 Flash
Google
73<$0.0001$0.0001$0.0002
Llama 3 70B (Groq)
Meta / Groq
73<$0.0001$0.0004$0.0004
Llama 3 8B (Groq)
Meta / Groq
73<$0.0001<$0.0001<$0.0001

Pricing as of 2026-05-29. Token counts are character-based approximations (~3.6–4.0 chars/token depending on model). For exact counts, see each provider's official tokenizer.

How LLM token pricing works

Every modern LLM provider bills you per token, not per word or per request. Token counts run roughly 3.6–4.0 characters per token in English; non-English languages and code can use more tokens for the same meaning. Tokenization happens before the model sees your text — the model only ever processes tokens.

The maximum tokens you can fit in one call is the context window. GPT-4o offers 128K tokens; Claude offers 200K; Gemini 1.5 Pro offers 1M+. Larger contexts cost linearly more on the input side, and longer outputs cost more (usually at a higher per-token rate than input).

About these estimates

Token counts shown are character-based approximations tuned per provider. For exact counts use each provider's official tokenizer (OpenAI, Anthropic). For long documents the approximation is typically within 5–10% of the exact count.