DroidCrunch
  • About
  • Blog
  • Categories
    • Automation
    • Tech
    • SEO
    • WordPress
    • Software
    • Hosting
    • Proxy
  • AI
    • AI Writing
    • AI Image
    • AI Tool
    • AI Video
  • Deals
  • Contact
Subscribe
No Result
View All Result
DroidCrunch
  • About
  • Blog
  • Categories
    • Automation
    • Tech
    • SEO
    • WordPress
    • Software
    • Hosting
    • Proxy
  • AI
    • AI Writing
    • AI Image
    • AI Tool
    • AI Video
  • Deals
  • Contact
Subscribe
DroidCrunch

AI Tokens and Context Windows, Explained With Real Costs 2026

Lokesh Kapoor by Lokesh Kapoor
November 24, 2026
3
0

How many tokens are in a 2,619-word article?

Depends who’s counting. We ran one of our posts through seven AI tokenizers and got answers from 3,632 to 3,893.

That spread is small. On a Hindi document, an older OpenAI tokenizer counted 5.6 times the English total. Our post’s raw HTML hit 47 times.

So what are tokens in AI, and why does identical text cost different amounts? We priced one real job on three APIs and found where the context window runs out.

What are tokens in AI?

Tokens are the chunks of text a language model reads and writes. One token can be a whole word, part of a word, a word with its leading space, or a punctuation mark.

Every model in our generative AI explainer works this way. It never sees letters, only a list of numbers, one per token, and it predicts the next one.

OpenAI’s o200k tokenizer cuts “Tokenization isn’t free.” into five pieces: Token, ization, isn’t, free and the full stop. Common words stay whole. Rare ones get chopped.

Why care? Because tokens are the billing unit. APIs charge per million tokens in and out, and every limit you’ll hit is counted in tokens, not words.

OpenAI and Google both quote the same rule of thumb: about 4 characters, or 0.75 English words, per token. Our test page landed right on it, at 4.04 characters and 0.72 words.

We counted one real page with seven tokenizers

The page was our MCP vs API comparison, stripped to clean Markdown: 14,667 characters and 2,619 words. We counted it locally with two OpenAI tokenizers and five open models that publish theirs.

TokenizerUsed byTokensChars per token
o200k_baseOpenAI GPT-4o to GPT-53,6324.04
cl100k_baseOpenAI GPT-4, GPT-3.53,6384.03
Llama 3.2Meta3,6384.03
Qwen3Alibaba3,7363.93
DeepSeek-V3DeepSeek3,7423.92
Mistral NemoMistral3,7983.86
Gemma 3Google (Gemini 2.0 tokenizer)3,8933.77
Our MCP vs API article as clean Markdown: 14,667 characters, 2,619 words. Counted locally with each tokenizer’s public files.

The gap is 7%. Watch Gemma 3: Google says it uses Gemini 2.0’s tokenizer, so it’s the closest public stand-in for Gemini.

Claude is missing. Anthropic doesn’t publish its tokenizer, and its free counting endpoint needs an API key we didn’t use here. Every Claude figure below is an estimate, flagged as one.

The counting itself takes a few lines:

count_tokens.py Python
import tiktoken
from tokenizers import Tokenizer

text = open("page.md").read()          # the article as clean Markdown

o200k = tiktoken.get_encoding("o200k_base")
gemma = Tokenizer.from_file("gemma-3-tokenizer.json")

print(len(text), "characters,", len(text.split()), "words")
print("o200k_base:", len(o200k.encode(text)))
print("Gemma 3:  ", len(gemma.encode(text, add_special_tokens=False).ids))

Then the surprise. The same article as raw HTML, menus and scripts included, came to 171,750 tokens on o200k: 47 times the clean version.

So convert pages before a model sees them. Our guide to scraping websites for LLMs tests the converters, and Firecrawl is the one we’d pay for at volume. Our Firecrawl pricing breakdown shows the cost per page.

Why does Hindi cost more tokens than English?

Tokenizers learn their vocabulary mostly from English, so other scripts get cut into smaller pieces. How small depends on the tokenizer.

We tested a document published in both languages: the Universal Declaration of Human Rights.

TokenizerEnglishHindiHindi vs English
OpenAI o200k2,0173,3651.67x
OpenAI cl100k2,01611,2295.57x
Llama 3.22,0165,9462.95x
Qwen32,03710,6115.21x
DeepSeek-V32,0016,1663.08x
Mistral Nemo2,0583,9421.92x
Gemma 32,0712,8641.38x
Full text of the Universal Declaration of Human Rights in English (1,747 words) and Hindi (2,128 words).

The old cl100k tokenizer, used by GPT-4 and GPT-3.5, spends about one token per Hindi character. Even the newer o200k splits मनुष्यों (humans) into three tokens.

Gemma 3 was the most even, which matches Google’s claim that the Gemini tokenizer is better balanced for non-English text.

AI tokens in Hindi vs English: the same document needs 1.67x the tokens on o200k, 5.57x on cl100k and 1.38x on Gemma 3
Hindi tokens per English token for the same document. Older tokenizers split Devanagari almost letter by letter.

On a bill, a Hindi chatbot on an o200k model pays about 67% more than the same bot in English. Building for Hindi, Tamil or Bengali speakers? Count a sample in that language first, because English rules of thumb undercount.

What is a context window, and what fills it?

A context window is the most tokens a model can handle in one request. Your input, the answer and, on reasoning models, the model’s thinking all have to fit inside it.

Models remember nothing between requests. Chat apps resend the conversation each time, so every message makes the next request bigger.

A typical request carries far more than your question:

  • System prompt: the instructions an app sends before you type.
  • Tool definitions: in our MCP test, three popular servers added 12,139 tokens before the model read a word.
  • Chat history: every earlier turn, sent again.
  • Documents: the page or PDF you attached, or the chunks a RAG system pulled in.
  • Room for the answer: output comes out of the same budget.

That’s why AI agents hit limits faster than chatbots. Each tool result joins the pile, and the next model call rereads all of it.

In our agent-versus-prompt test, the agent burned five to nine times as many tokens as a single prompt on the same six questions.

What is a context window: one bar shared by the system prompt, tool list, chat history, your document and the answer
Every part of a request draws on the same token budget, including the answer the model hasn’t written yet.

How big are context windows now?

The current top models from all three vendors take about a million tokens.

ModelsContext windowMax output
Claude Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.51M tokens128K tokens
Claude Sonnet 4.5, Haiku 4.5200K tokens64K tokens
GPT-6.2 Astra, GPT-6.2 Sol, GPT-6 Luna1,050,000 tokens (922,000 input max)128,000 tokens
Gemini 4 Carbon, Argon, Neon, Hydrogen1,048,576 tokens, shared with output65,536 by default, up to 1M with long decode
From each vendor’s model documentation.

A million tokens holds about 275 copies of our test page as Markdown. As raw HTML, it holds five.

Anthropic says 1 million tokens is about 555,000 words on Claude’s current tokenizer, down from 750,000 on older models. Same window, fewer words.

What happens when you go over?

Each API fails differently.

  • Claude: if your input alone is too long, you get a 400 error saying the prompt is too long. If the input fits but the answer runs out of room, generation stops with the stop reason model_context_window_exceeded.
  • OpenAI: GPT-6.x models take at most 922,000 input tokens of their 1,050,000 window. Output that runs past the window may be cut off.
  • Gemini 4: the API shrinks your output limit to whatever space is left. Send 1,040,000 tokens and you get a short answer, not an error.

Why output tokens cost five times more

On eight of the nine models we priced, an output token costs five times as much as an input token. Gemini 3.5 Flash-Lite is the outlier, at more than eight times.

In our summary job, the answer was about 5% of the tokens and 21% to 30% of the bill.

Reasoning adds a hidden layer: all three APIs bill thinking tokens as output. Our figures assume a 150-word answer with no thinking, so a reasoning model costs more than the table shows.

The fix is a cap. Ask for a length and set a maximum output.

What does one job cost on OpenAI, Claude and Gemini?

We checked every price on the vendors’ own pricing pages on 24 November 2026. All are standard rates per million tokens, in US dollars.

The job: summarise our test page in 150 words. Input is a 32-word instruction plus the page. Output is a 162-word summary we wrote as a stand-in, counted with each vendor’s tokenizer or its closest public match.

ModelPer 1M tokens (in / out)One summary1,000 summaries
GPT-6.2 Astra$8 / $40$0.037$37.29
GPT-6.2 Sol$2 / $10$0.0093$9.32
GPT-6 Luna$0.10 / $0.50$0.0005$0.47
Claude Opus 5.5*$4 / $20$0.025$24.95
Claude Sonnet 5.5*$2 / $10$0.012$12.47
Claude Haiku 5.5*$0.10 / $0.50$0.0006$0.62
Gemini 4 Neon$3 / $15$0.015$14.91
Gemini 4 Hydrogen$1.50 / $7.50$0.0075$7.45
Gemini 3.5 Flash-Lite$0.30 / $2.50$0.0017$1.70
Tokens per summary: OpenAI 3,671 in and 198 out (o200k); Gemini 3,934 and 207 (Gemma 3 tokenizer); *Claude about 4,777 and 292, estimated from Anthropic’s words-per-token figure. Batch jobs cost half.

The cheap tier is absurdly cheap. GPT-6 Luna and Claude Haiku 5.5 summarise 1,000 articles for under a dollar. Start summaries and tagging there, and move up only when quality fails.

The same sticker price isn’t the same bill. GPT-6.2 Sol and Claude Sonnet 5.5 both list $2 in and $10 out. On our estimate, Sonnet’s bill runs about 34% higher, because Claude’s tokenizer turns the page into roughly 30% more tokens.

Batch is half price. All three vendors take 50% off jobs that can wait, so a nightly summary run shouldn’t pay full rate.

One date matters for Gemini. Gemini 4 Carbon and Argon cost $2 in and $10 out until 30 November 2026, then double to $4 and $20 on 1 December.

Claude API pricing in 2026: every current model

Claude Sonnet 5.5 costs $2 per million input tokens and $10 per million output tokens. Here’s the full current lineup.

ModelInputOutputCache read
Claude Fable 5.2$8$40$0.20
Claude Opus 5.5$4$20$0.20
Claude Sonnet 5.5$2$10$0.10
Claude Haiku 5.5 (prompt up to 100K)$0.10$0.50$0.01
Claude Haiku 5.5 (prompt over 100K)$0.50$2.50$0.05
Claude Opus 4.5 to 4.8, Opus 5$5$25$0.50
Claude Sonnet 4.6$3$15$0.30
Claude Haiku 4.5$1$5$0.10
Per million tokens, standard rates. A 5-minute cache write costs 1.25x the input price, a 1-hour write 2x. Batch API: 50% off.

Claude Mythos models cost the same as Fable but are limited to verified organisations.

Mind the Haiku 5.5 threshold. Once one prompt passes 100,000 tokens, that whole request costs five times more. Every other current Claude model bills its full 1 million window at the standard rate.

The upgrade maths has a catch. Anthropic says Claude Opus 4.7 and later produce about 30% more tokens for the same text than earlier models.

So Opus 5.5 at $4 looks 20% cheaper than Opus 4.6 at $5. Add the extra tokens and the same text costs about $5.20, so upgrade from 4.6 for quality, not savings. Coming from Opus 4.7 or 4.8, which already use the new tokenizer, the 20% saving is real.

Sonnet comes out ahead. Moving from Sonnet 4.6 at $3 to Sonnet 5.5 at $2 still saves about 13% after the tokenizer change, and cache reads fall from $0.30 to $0.10.

Three more items show up on real Claude invoices:

  • Tools add tokens. Any request with tools carries a hidden 286-token system prompt on Sonnet 5.5, Opus 5.5 and Haiku 5.5.
  • US-only processing costs 10% more. Setting inference_geo to us applies a 1.1x multiplier on Claude 4.6 and later.
  • Batch halves everything. Sonnet 5.5 drops to $1 in and $5 out.

Our take: start API work on Sonnet 5.5. Haiku 5.5 handles high-volume extraction and tagging for pennies. Opus 5.5 earns its price on long, hard tasks where a wrong answer costs more than the tokens.

Prompt caching: the discount with a minimum size

Caching charges a fraction of the input price for text you resend, like a long system prompt or a document users keep asking about.

Our second job: 20 questions about the same page, each sending the full page plus a short question.

ModelNo cachingWith cachingSaving
GPT-6.2 Sol$0.186$0.05770%
Claude Sonnet 5.5*$0.249$0.08168%
Gemini 4 Hydrogen$0.149$0.149None: page under the 4,096-token minimum
20 questions about our test page, each sending the full page plus a 21-word question and getting a 150-word answer. *Claude tokens estimated.

Caching cut the OpenAI and Claude bills by about 70%. Gemini’s didn’t move.

Why not? Gemini 4 models only cache prompts of 4,096 tokens or more, and our page came to 3,893. Claude’s newest models cache from 512 tokens and OpenAI’s from 1,024, so the same page qualified on both.

That’s the rule missing from every price list: a cache has a floor. Under it, you pay full price and no error tells you. On Claude, if both cache fields in the response read zero, nothing was cached.

Writing to the cache costs extra: 1.25 times the input price for five minutes on Claude, and for 30 minutes on OpenAI’s current models. It pays off only if you read it again before it expires.

How to cut your token bill

Most savings come from sending less, not from a cheaper model.

Six ways to spend fewer tokens

In the order we'd try them on a real project.

  1. 1
    Step 1 of 6

    Send clean text, not raw pages

    Strip menus, scripts and footers before a page reaches the model. Our test page fell from 171,750 tokens to 3,632.

  2. 2
    Step 2 of 6

    Send the relevant part, not the whole library

    Retrieval finds the few paragraphs that answer the question and sends only those, instead of the whole document.

  3. 3
    Step 3 of 6

    Turn off tools you don't use

    Every connected tool’s description rides along on every message. Three MCP servers cost 12,139 tokens in our test.

  4. 4
    Step 4 of 6

    Put fixed text first so it caches

    System prompt, tools and reference documents go at the top, the changing question at the bottom. Make sure the fixed part clears your model’s cache minimum.

  5. 5
    Step 5 of 6

    Cap the answer and batch what can wait

    Ask for a length, set a maximum output, and send overnight jobs through the batch API at half price.

  6. 6
    Step 6 of 6

    Route each job to the cheapest model that passes

    Let a cheap model tag and summarise, and send only the hard cases to a bigger one.

If those jobs run inside an automation, n8n lets you pick a different model for each step. Our Make vs n8n vs Zapier pricing comparison covers what the automation itself costs.

Frequently asked questions

Disclosure: the n8n and Firecrawl links on this page are affiliate links. If you sign up through one, we may earn a commission at no extra cost to you.

How many tokens is 1,000 words?

About 1,390 tokens on OpenAI’s o200k tokenizer, based on our 2,619-word test page. Google’s rule of 60 to 80 words per 100 tokens gives 1,250 to 1,670. Claude’s current tokenizer runs higher, at roughly 1,800 by Anthropic’s own words-per-token figure.

Do images and PDFs count as tokens?

Yes. Images and PDF pages are converted to tokens and billed like text, but a local tokenizer can’t count them. Use the vendor’s token-counting endpoint, which takes the same request you’d send and returns the input total, including images and files.

Do thinking tokens use up the context window?

Yes. On OpenAI, the context window covers input, output and reasoning tokens. Gemini 4 shares one 1,048,576-token budget across input, thinking and output. Thinking tokens are billed at the output rate on all three APIs, so a model that reasons longer costs more and leaves less room for the answer.

Is tokens per minute the same as the context window?

No. The context window caps one request. Tokens per minute is a rate limit on everything your account sends in a minute, set by your usage tier. GPT-6 Luna, for example, allows 2,000,000 tokens per minute on OpenAI’s entry tier, while one request still tops out at 1,050,000.

Does a bigger context window mean the AI remembers my old chats?

No. The window only covers one request. Chat apps resend recent history each turn, and memory features save notes separately. Once a conversation outgrows the window, the app drops or summarises older turns, which is why long chats lose details from the start.

Why is my API bill higher than my token estimate?

Local counts miss several things. The API adds formatting tokens for message roles, tools add a hidden system prompt of a few hundred tokens, chat apps resend the whole history, and reasoning tokens bill as output. Compare your estimate with the usage figures in each API response.

Is the Gemini API free to use?

Partly. Gemini 4 Hydrogen and the Flash models have a free tier, but Google may use free-tier content to improve its products. Gemini 4 Carbon, Argon and Neon aren’t on the free tier at all. On the paid tier, Google says your content isn’t used that way.

The bottom line

Tokens are what you pay for, and every vendor counts them differently. On clean English text, the counts land within 7% of each other. In Hindi, or on raw HTML, they don’t.

Before you pick an API, count a real sample of your text, check it against the context window you need, and price the output as carefully as the input. For most jobs, a cheap model with caching and batch beats a premium model at full price.

Weighing Claude API pricing against OpenAI? Compare the bill for your own text, not the price per million. Next step: run your longest prompt through a token counter today and multiply it by a month of traffic.

Summarize this article with AI

Get the key points in seconds. Pick an assistant and it opens in a new tab, ready to go.

ChatGPTClaudePerplexityGoogle AIGrokMistral

Opens in a new tab. Nothing is shared until you pick an assistant.

Share4Tweet2Share1Share
Previous Post

What Is an AI Agent? How Agents Work, With Real Examples 2026

Lokesh Kapoor

Lokesh Kapoor

I am Lokesh Kapoor who loves to write blogs, create videos and watch sci-fi movies on Netflix and Jio Cinema. DroidCrunch is my first love and a crucial part of my life.

Related Posts

What is web scraping title card: a web page turning into rows of a data table

What Is Web Scraping? How It Works, What It’s Used For, and Its Limits 2026

November 23, 2026
300
How does a VPN work: a laptop sends data through an encrypted tunnel to a VPN server, and the website sees the VPN's IP address

How Does a VPN Work? What Happens to Your Data 2026

November 23, 2026
301
What is an AI agent: title card with a chat window connected to a loop of model, tools, memory and stop rule

What Is an AI Agent? How Agents Work, With Real Examples 2026

November 23, 2026
298
miniOrange MCP review title card with a role and ability grid, an Allow access button and a deny by default chip

miniOrange Secure MCP Server Review 2026: Tight Control, One Catch

Load More

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

DroidCrunch

Tested first. Then written.

Independent software reviews since 2016. Search the archive, or start with a topic.

WordPressAI toolsHostingVPNSEO
  • 630+reviews, comparisons and guides
  • 243product reviews
  • 36topics covered
  • 2016publishing since
home

An independent tech blog and YouTube channel. We use every tool before we rate it, and we always tell you the catch.

Topics

  • WordPress
  • AI tools
  • Hosting
  • SEO
  • VPN
  • Proxies
  • Automation

Company

  • About DroidCrunch
  • Editorial policy
  • Affiliate disclaimer
  • Write for us
  • Contact

Explore

  • All articles
  • Reviews
  • Deals and coupons
  • Black FridayLive
  • Facebook group
  • Help and support

Recently scored

  • miniOrange Secure MCP Server75%
  • Royal MCP80%
  • WPVibe76%
  • Zapier82%
All reviews

Reader-supportedWhen you buy through our links, we may earn a commission at no extra cost to you. It never changes our verdicts. Read our affiliate disclaimer.

© 2026 DroidCrunch. Independent since 2016.

  • Privacy policy
  • Terms
  • Cookie policy
  • Your GDPR rights
  • RSS
Back to top

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

No Result
View All Result
Subscribe
  • About
  • Blog
  • Categories
    • Automation
    • Tech
    • SEO
    • WordPress
    • Software
    • Hosting
    • Proxy
  • AI
    • AI Writing
    • AI Image
    • AI Tool
    • AI Video
  • Deals
  • Contact

© 2026 DroidCrunch - Best Place for Tech NomadPrivacy PolicyTerms & ConditionsCookie PolicyGDPR RightsAffiliate Disclosure

DroidCrunch Giveaway

Amazon Gift Card worth $15

Participate now and get a chance to become a lucky winner to receive the reward.​

Join Giveaway