GPT-4o: token counter & pricing
OpenAI · exact (uses official tokenizer) · pricing as of 2026-04-26.
- Provider
- OpenAI
- API model ID
gpt-4o-2024-08-06- Context window
- 128,000 tokens
- Input price
- $2.50 per 1M tokens
- Output price
- $10.00 per 1M tokens
- Tokenizer accuracy
- exact (uses official tokenizer)
- Pricing as of
- 2026-04-26
Open the counter to count tokens for GPT-4o in real time.
What is GPT-4o?
GPT-4o ("o" for omni) is OpenAI's flagship general-purpose model — the workhorse for chat, coding, RAG, and most production AI workloads. Faster and cheaper than the older GPT-4 Turbo, with comparable or better quality on most benchmarks.
How tokens are counted here
GPT-4o uses OpenAI's o200k_base tokenizer. We compute counts in your browser via js-tiktoken — your prompt never leaves your device for OpenAI counts. Counts are exact.
Pricing notes
OpenAI charges separately for input and output tokens, with output ~4× the input rate. The "Per call" column above assumes the input/output split you set with the slider. The default 80/20 split reflects typical chat workloads where the prompt and history are large but the model's reply is short.
When to use GPT-4o over GPT-4o mini
- Tasks requiring strong reasoning (multi-step, multi-constraint).
- Code generation where structure matters.
- Anywhere quality has measurably mattered in your A/B tests.
For high-volume classification, extraction, or short Q&A, GPT-4o mini is ~17× cheaper with a small quality gap that's invisible for most workloads.
Common questions
Is the o200k tokenizer the same as cl100k (used by GPT-4 Turbo)?
No. o200k_base has a larger vocabulary (~200,000 tokens vs ~100,000) and produces fewer tokens for the same English text — usually 5-10% fewer. That's a real cost difference. We use the right tokenizer per model automatically.
How much does a typical chat exchange cost?
A 1,000-token prompt with a 200-token reply on GPT-4o: $0.0025 input + $0.002 output = $0.0045 per call, or $4,500 per million calls. Use the calculator above with your actual prompt to get the real number.
Why are some prompts cheaper on Claude than GPT-4o?
Different per-token prices and different tokenizers. Claude Sonnet is $3/$15 per million; GPT-4o is $2.50/$10. For input-heavy workloads with a short reply, GPT-4o usually wins on cost. For balanced or output-heavy workloads, Sonnet often wins. The calculator above shows the exact split for your prompt.
Compare GPT-4o to other models
- GPT-4o mini (OpenAI, $0.15/$0.60)
- GPT-4 Turbo (OpenAI, $10.00/$30.00)
- Claude Sonnet 4.6 (Anthropic, $3.00/$15.00)
- Mistral Large (Mistral, $2.00/$6.00)
- Llama 3.1 405B (Meta, $3.50/$3.50)