New blogMaking an AI Agent You Can Trust With Money

★ Gemini · token counter

Gemini Token Counter

Google runs a free countTokens endpoint for Gemini. When this site's server has a Gemini key configured, your text is sent to it and you get Google's exact count per model. Without it, you get a labelled estimate from Google's own rule of thumb.

  • Runs in your browser
  • No signup
306
Characters
54
Words
—
Tokens / word

Tokens per word uses the o200k_base count. Characters count emoji and accented letters as one each.

Tokens

77

≈ Estimate

Estimated with Google's rule of thumb: about 4 characters per token.

Context window used

<0.1%

1.05M tokens window on Gemini 4 Argon.

Input cost per call

$0.00015

Per 1,000 calls

$0.1540

Every model, same text

ModelTokensAccuracyInput / call
Claude Fable 5.1Anthropic…≈ Estimate—
Claude Opus 5.5Anthropic…≈ Estimate—
Claude Sonnet 5.5Anthropic…≈ Estimate—
Claude Haiku 5.5Anthropic…≈ Estimate—
GPT-6 AstraOpenAI…✓ Exact—
GPT-6.1 SolOpenAI…✓ Exact—
GPT-6 LunaOpenAI…✓ Exact—
Gemini 4 ArgonGoogle77≈ Estimate$0.00015
Gemini 3.8 FlashGoogle77≈ Estimate$0.00006
Gemini 3.1 Flash-LiteGoogle77≈ Estimate$0.00002
Mistral Large 4Mistral…≈ Estimate—
Mistral Small 4Mistral…≈ Estimate—
DeepSeek V4.1 FlashDeepSeek92≈ Estimate$0.00003
DeepSeek V4 ProDeepSeek92≈ Estimate$0.00012
Llama (open weights)Meta…≈ Estimate—

OpenAI rows use o200k_base, exact for that tokenizer. tiktoken hasn't mapped GPT-6 model names yet, so OpenAI hasn't confirmed GPT-6 uses it. Input cost is list price for your text alone, before system prompts, caching or output.

See the tokens

o200k_base

Loading the tokenizer…

77 tokens on Gemini 4 Argon.

Prompts eating your context window? I build RAG and prompt pipelines that use a fraction of the tokens.

Shrink my prompts
01

How Gemini tokenizes

Gemini uses its own tokenizer, which Google doesn't ship as a small browser library. The Gemini API exposes a countTokens method that returns totalTokens for a given model and input.

Google's docs give the rule of thumb: about 4 characters per token, and 100 tokens is roughly 60 to 80 English words. Images, audio and video have their own token rates.

02

Exact or estimate?

Exact when the server key is set: the number comes from Google's countTokens endpoint for that model. Your text is sent to Google for counting and is not stored by this site.

Estimate otherwise: characters divided by 4, Google's published rule of thumb. The page labels which one you are seeing.

03

Current Gemini models

Context windows and input prices from the pricing data used across these tools.

Gemini models
ModelContext windowInput / 1M
Gemini 4 Argon1.05M tokens$2
Gemini 3.8 Flash1.05M tokens$0.75
Gemini 3.1 Flash-Lite1.05M tokens$0.25
04

Quirks worth knowing

  • Google documents images up to 384 px on both sides as 258 tokens, with larger images tiled into 768 x 768 tiles of 258 tokens each.
  • System instructions and tool definitions count toward input tokens too.
  • Non-English text and code usually differ from the 4-characters rule, which is why the exact endpoint matters.

Sources: Gemini API: Understand and count tokens · Gemini API: Gemini 4 Argon · Gemini API: Gemini 3.1 Flash-Lite

05

Questions people actually ask

Is the Gemini count exact?
When the page shows Exact, yes: it comes from Google's countTokens endpoint. If the server has no Gemini key or the call fails, the page falls back to Google's 4-characters-per-token rule and labels it Estimate.
Is my text stored?
No. For exact Gemini counts the text is sent to Google's countTokens endpoint through this site's server, and nothing is logged or stored here.
How many tokens is an image in Gemini?
Google's docs say an image up to 384 px on both sides counts as 258 tokens, and larger images are tiled into 768 x 768 tiles of 258 tokens each.
Which counts on this page are exact?
OpenAI rows are exact for o200k_base, OpenAI's published tokenizer, counted in your browser. Gemini rows are exact when this site's server has a Gemini key and Google's countTokens endpoint answers. Claude, Llama, DeepSeek and Mistral rows are estimates, and each says how it was made.
Is my text sent anywhere?
The o200k_base count runs entirely in your browser. Only if you edit the text (or ask for it) is the text sent to Google's countTokens endpoint through this site's server for exact Gemini counts, and nothing is stored or logged here.
06

Count by model family

07

More from the workbench

Fine print

Tools: on the house.
Engineer: by the hour.

Counting tokens was free. Spending fewer of them is a project.

I'm Himanshu, an AI and full-stack engineer. I build MVPs, AI agents and the growth plumbing around them for early-stage startups.