en

AI Token Calculator

Estimate tokens for prompt, history and attachments, check the context window and work out API costs with your own tariff - locally, no upload.

This calculator gives a non-binding, model-based estimate and is not financial, tax or legal advice. More in the disclaimer
  • Bangladesh
  • Brazil
  • Bulgaria
  • China
  • Egypt
  • Euro area
  • France
  • Germany
  • India
  • Indonesia
  • Italy
  • Japan
  • Kenya
  • Malaysia
  • Mexico
  • Netherlands
  • Nigeria
  • Pakistan
  • Poland
  • Portugal
  • Russia
  • South Korea
  • Spain
  • Sweden
  • Taiwan
  • Thailand
  • Türkiye
  • Ukraine
  • United Kingdom
  • United States
  • Vietnam
Token source
  • Own token count (from provider)
  • Estimate from text
Input tokens per request
Image, audio and tool tokens per provider
Output reserve (tokens)
Model context window (tokens)
Number of requests
Of which cached tokens per request
Tariff billing currency
  • USD
  • EUR
  • GBP
  • JPY
  • CHF
  • CAD
  • AUD
  • CNY
  • INR
  • KRW
  • BRL
  • MXN
  • SEK
  • PLN
  • TRY
  • SGD
Input price per 1M tokens
Cached input price per 1M tokens
Output price per 1M tokens
Tax rate
Model and revision (free text)
Tariff region (free text)
Tariff as of (free text)

Result

Incomplete
Cost incl. tax
Incomplete
Cost before tax
Incomplete
Tax amount
Price missing
Input cost
$0.00
Cached input cost
Price missing
Output cost
1,000
Input tokens per request
1,000
Token count range
Own figure
Token count source
1,500 / 128,000
Context used
126,500
Context left (tokens)
Fits
Context window
Own figure
System instruction tokens
Own figure
User message tokens
Own figure
Chat history tokens
Own figure
Attachment text tokens
1,500,000
Tokens across all requests
USD
Billing currency
No conversion
Exchange rate source
0%
Tax assumption
Not specified
Tariff region
Not specified
Tariff as of
Not specified
Price source
Not specified
Model profile
Not available
Comparison with public price data

Context window usage (%)

FitsTightExceeded
Is my file uploaded?

No. Everything runs in your browser - your file never leaves your device. How this is verifiable

No upload100% local
Your content stays with youno third-party access
Hosted in GermanyGlobal Content Delivery
Independently auditedTLS A+ · HTTP headers A+

Language models do not count words but tokens: small pieces of text that differ widely by model, language and script. An English word is often one token, a long German compound several, a Chinese character usually its own. This calculator separates the parts of a chat - system instruction, user message, previous history and text from attachments - and adds image, audio or tool tokens separately, so you can see which part fills the context window.

There are two ways to get the token count. The most accurate is to enter the number your provider's tokenizer or billing reports. Alternatively the tool estimates from the text: it splits it by writing system (Latin, Cyrillic, Arabic, Indic scripts, Han, Kana, Hangul, emoji, digits, punctuation) and shows a range next to the estimate. The upper bound is never larger than the UTF-8 length of the text. The result is explicitly marked as an estimate, because without a model's real tokenizer there is no exact value.

You calculate costs with your own tariff: prices per one million tokens for input, cached input and output, the billing currency, a tax rate and the number of requests. A price of 0 counts as free, an empty field as a missing price - the total then stays visibly incomplete instead of silently showing zero. Currency, tax assumption, tariff region and as-of date appear in the result. There is no conversion and there are no built-in provider prices; your text stays in the browser and is neither uploaded nor stored.

Free, no account - calculate as often as you like; your inputs stay on your device.

Specifications

Specifications
Input formatsForm inputs (no file)
ProcessingLocally in your browser (JavaScript)
File uploadNone

In 3 steps

  1. Choose the token source: enter your own token count or paste the system instruction, message, history and attachment text.
  2. Enter the output reserve, context window, number of requests and your tariff with currency and tax rate.
  3. Read the context usage, token range and costs before and after tax.

Limitations: Without a model's real tokenizer, the token count from text is an estimate with a range; it can differ markedly for Chinese, Japanese, Korean, Arabic, Indic scripts and emoji. Image, audio and tool tokens are only as accurate as the number you enter from your provider. No public price lists are built in and no currency is converted. The result is not a binding invoice.

FAQ

Is my prompt uploaded?

No. Counting and calculating run entirely in the browser; prompt, history and attachment text never leave your device and are not stored.

Why is a token not the same as a word?

Tokenizers split text into frequent character sequences. A short English word is often one token; long words, rare names, numbers or scripts without spaces produce several. That is why the tool estimates by writing system and never from the word count.

How accurate is the estimate?

It is an approximation with a visible range, not the value of a specific model. For a reliable figure, enter the token count your provider reports; the tool then calculates exactly with your number.

What does a price of 0 mean, and an empty price field?

A price of 0 means free and gives zero cost. An empty field means the price is unknown: if tokens fall under it, the result shows "price missing" and the total stays incomplete.

When does a request fit the context window?

When input tokens plus the output reserve are at most the size of the context window. Exactly at the limit it still fits, one token more does not; from 80 percent the calculator shows "tight".

AI Token Calculator: free and without an account?

Yes. Using it is free and needs no account: you can calculate as often as you like, and your inputs stay on your device.

Related tools

Word counter · Currency Converter · Prepare Files for AI · LLM VRAM Calculator · Local AI vs Cloud · FGTS Calculator (Brazil) · Financing Calculator (Brazil) · Fund Fee Calculator · Gross to Net Salary (France) · German Trade Tax Calculator