Gemini 3.1 Pro Token Counter

Estimated token count and cost for Gemini 3.1 Pro, worked out in your browser.

0 characters0 words
Tokens~95% estimate
0
Estimated cost
Input
$0.00
$2/1M tokens
Output
$0.00
$12/1M tokens
Context window0 / 1,000,000
0.00% used

This is an estimate, and here is why

Google does not publish a tokeniser you can run in a browser, so this count uses OpenAI's o200k_base encoding as a proxy. The two are close on ordinary English prose and diverge elsewhere.

Where they diverge most: code, and any language that does not separate words with spaces. If you are working in Chinese, Japanese, Korean or Thai, treat the number as a rough guide rather than a measurement. For English documents it is close enough to plan with.

The million-token window is the actual product

Most people arrive at Gemini Pro because of the context window, not the price. A million tokens is roughly 750,000 words: a long technical manual, an entire codebase of moderate size, hundreds of pages of transcript.

The question this page answers is whether your document fits. Paste it and find out, then decide whether sending it repeatedly is affordable.

More detail

What filling it costs

$2 per million input, $12 per million output. Filling the whole window once is $2 in input, and in a multi-turn conversation you pay that again on every turn unless caching applies.

That is the trap with large-context workloads: the first call looks cheap and the tenth turn of the same conversation has cost twenty dollars. If you are sending a large fixed document repeatedly, caching is not an optimisation, it is the difference between viable and not.

Multimodal input is billed separately and not counted here

Gemini takes images, audio and video, and each is converted to tokens by its own rules. None of that is modelled on this page, which counts text only. A prompt that is mostly a video will bear no relationship to what you see here.

Questions

How accurate is this for Gemini?

Close on English prose, less so on code, and least on Chinese, Japanese, Korean or Thai. Google publishes no local tokeniser, so this uses o200k_base as a stand-in and labels the result an estimate.

Will my document fit in the context window?

Paste it and read the count against one million. Remember the reply and any system prompt also occupy the window, so leave headroom rather than filling it exactly.

Does it count images and video?

No. This counts text only. Gemini tokenises other media by its own rules, so a multimodal prompt will cost substantially more than this page suggests.

Why did my long-context bill grow so fast?

Because a large input is re-sent on every turn of a conversation, and each one is billed again. Caching is what makes repeated large contexts affordable.

Related tools