#tHow Many Tokens?

← All models

GPT-5 Nano: token counter & pricing

OpenAI · exact (uses official tokenizer) · pricing as of 2026-05-31.

Provider
OpenAI
API model ID
gpt-5-nano
Context window
400,000 tokens
Input price
$0.05 per 1M tokens
Output price
$0.40 per 1M tokens
Tokenizer accuracy
exact (uses official tokenizer)
Pricing as of
2026-05-31

Open the counter to count tokens for GPT-5 Nano in real time.

What is GPT-5 Nano?

GPT-5 Nano is the smallest, cheapest, fastest member of OpenAI's GPT-5 family. Designed for high-volume cost-sensitive workloads where you want GPT-5's tokenizer and ecosystem at near-throwaway prices.

At $0.05 per 1M input tokens, GPT-5 Nano is the cheapest exact-tokenizer model on this counter, cheaper than Gemini 2.5 Flash-Lite ($0.10), Gemini 3.1 Flash-Lite Preview ($0.25), GPT-4.1 Nano ($0.10), and any open-source model.

How tokens are counted here

Like the rest of the GPT-5 family, GPT-5 Nano encodes text with o200k_base. This page runs js-tiktoken in your browser, so the count is exact and your text never leaves your device. Exactness matters more at Nano's end of the market than anywhere else: at tens of millions of calls per month, the roughly 3% error typical of character-ratio estimators stops being a rounding artifact and becomes a real line on the invoice. When the whole point of the model is squeezing cost, measure with the real encoder, not a heuristic.

When to use GPT-5 Nano

When not to use it:

Pricing notes

$0.05 input / $0.40 output per 1M tokens. Cached input is $0.005/M, effectively free.

For comparison, a 1,000-token prompt with a 200-token reply on GPT-5 Nano:

The same workload on GPT-5.5 costs $4,300. Per-million-call savings: $4,170.

What GPT-5 Nano costs in production

Take the canonical Nano workload: high-volume classification. Each call sends 500 input tokens (the text plus a labeling instruction) and returns a 50-token structured answer, at 1 million calls per month. That is 500M input tokens and 50M output tokens.

Nothing exact-tokenized undercuts that. The nearest budget rival, Gemini 2.5 Flash-Lite ($0.10 / $0.40), runs $50 + $20 = $70 per month on the same traffic. A pricier small model like Claude Haiku 4.5 ($1.00 / $5.00) costs $500 + $250 = $750 per month, nearly 17x Nano. At this scale the question is never whether Nano is cheap enough; it is whether its accuracy clears your bar.

Migrating from GPT-4.1 Nano

Swap the apiId from gpt-4.1-nano to gpt-5-nano. Both models use o200k_base, so token counts carry over exactly; no prompt re-measurement needed. Input price halves, $0.10 down to $0.05 per 1M tokens, while output stays at $0.40, so input-heavy classification gets cheaper and output-heavy work costs the same. One regression to check: context shrinks from 1M tokens to 400K. If you were feeding GPT-4.1 Nano whole long documents, add a length check before cutover or those calls will start erroring.

GPT-5 Nano vs the obvious alternative

Gemini 2.5 Flash-Lite is the model most teams shortlist against Nano. On the classification scenario above, Flash-Lite's bill is $70 per month to Nano's $45, entirely down to the 2x input rate ($0.10 vs $0.05). Flash-Lite answers back with a 1M context window and multimodal input, neither of which matters for short text labeling. For that core workload, Nano wins on price; pick Flash-Lite when the inputs are images or very long.

Common questions

Is GPT-5 Nano good enough for production?

For the workloads it's designed for, yes. Run a labeled eval set; if it hits your accuracy bar, the savings are massive.

What's the difference between GPT-5 Nano and GPT-5.4 Nano?

Same tokenizer and ballpark capability tier. GPT-5 Nano ($0.05/$0.40) is cheaper. GPT-5.4 Nano ($0.20/$1.25) is incrementally better on hard reasoning. The gap is narrow; default to GPT-5 Nano unless you measure the upgrade winning.

How does GPT-5 Nano compare to Gemini 2.5 Flash-Lite?

Both target the same workloads. GPT-5 Nano: $0.05/$0.40. Gemini 2.5 Flash-Lite: $0.10/$0.40. Nano is half the input price and tied on output. Gemini Flash-Lite has a 1M context window and multimodal input, both advantages over Nano's text-only 400K context. Choose by what your workload actually needs.

Compare GPT-5 Nano to other models