aiapicostcalcUnit economicsPricesBrandsCompareBenchmarksAI tool costsFind my modelGuidesChanges

Token calculator: paste text, count tokens, price it

Short answer: A 10,000-character English article is 2,602 tokens on OpenAI’s o200k tokenizer. Paste yours into the token calculator below: it estimates the count for five model families and prices that exact text per send, from $0.000745 on DeepSeek Flash to $0.006766 on Claude Sonnet 5.5.

Last verified 2026-11-06 · Method: tiktoken 0.14.0 (o200k_base) plus four published provider rules, explained below · Sources: src/prices.json and the official provider pricing pages it links · Report an error · By Shangyi Duan

1

Counted in your browser; the text is not uploaded. A support prompt is often 300-800 characters.

2

A send is one pass of this text as input. Output tokens are a separate charge, priced on the token cost calculator.

Text size170 characters · 31 words

Estimates from the rules below, not bills.

FamilyModelEst. tokensPer sendPer month
OpenAI43$0.000032$0.0323
Anthropic56$0.000112$0.1120
Google43$0.000032$0.0323
xAI43$0.000054$0.0538
DeepSeek42$0.000013$0.0126

Prices are each model’s standard input rate; caching, batch and long-context tiers are not applied. Estimates are not bills.

Token calculator or token cost calculator: which one you need

This page starts from text. Paste a prompt, a document or a paragraph and it counts what that text costs to send, per model family, with your monthly send volume applied. The token cost calculator starts from token counts instead: it converts 1,000, 100,000 or 1,000,000 tokens into dollars for all 51 models in the catalog and prices a per-call input/output workload. Use this page when you have the text and not the count; use that one when you have the count and want a bill, a cache rate or a wider model list. Both read the same price catalog, so a model shows the same rate on either page. If you already know the count and want a monthly figure, the main calculator adds users and calls per day.

Same 10,000 characters, five ways to count and price

The sample is 10,000 characters of English prose: the visible text of our token estimation guide followed by the batch API guide, retrieved 2026-11-06. Each row counts it the way that family counts, then applies the model’s standard input rate. Output tokens are a separate charge and are not in these numbers.

FamilyModelCounting ruleTokensInput /1MPer sendPer 1,000 sends
OpenAIGPT-5.4 minimeasured, tiktoken o200k_base2,602$0.75$0.001952$1.95
AnthropicClaude Sonnet 5.5measured count + 30%3,383$2$0.006766$6.77
GoogleGemini 3.8 Flashcharacters ÷ 42,500$0.75$0.001875$1.88
xAIGrok 4.3characters ÷ 4 (no published xAI rule)2,500$1.25$0.003125$3.13
DeepSeekDeepSeek Flash (V4.1)0.3 × English characters2,482$0.3$0.000745$0.7446

Cost = tokens × input rate ÷ 1,000,000. OpenAI: measured with tiktoken 0.14.0 and the o200k_base encoding on 2026-11-06; the page estimator returned 2,591 tokens for the same text, 0.4% below the measurement. Anthropic: its pricing documentation states that the tokenizer in Claude 4.7 and later produces about 30% more tokens for the same text than the earlier one (docs.anthropic.com, checked 2026-11-06), so the row applies +30% to the measured count. Google: a token is about 4 characters (ai.google.dev, checked 2026-11-06). xAI publishes no character-to-token rule, so the same 4-character planning rule is used and its row is the least certain. DeepSeek: about 0.3 token per English character and 0.6 per Chinese character (api-docs.deepseek.com, checked 2026-11-06), applied to the 8,275 non-space characters and no CJK characters in this sample.

Rates and check dates come from the catalog behind the model price table: GPT-5.4 mini, Claude Sonnet 5.5, Gemini 3.8 Flash, Grok 4.3 and DeepSeek Flash (V4.1). Every model page carries the date its rate was last checked and links the official pricing page it was copied from.

Measured: 1,000 characters of English, Chinese and code

Token counts are not a property of length. We measured the same three kinds of text with the same tokenizer, then compared the generations. Three samples, three counts:

SampleSourceCharacterso200k tokensCharacters per tokencl100k tokens
English prosetoken estimation guide6,2291,3174.731,321
Chinese proseWikipedia: 词法分析 (CC BY-SA)9296611.41848
JavaScriptthis site’s app.js2,0006063.30586

Per character, the Chinese sample carries 3.4 times the tokens of the English sample (0.712 against 0.211). A 2,000-character Chinese brief is about 1,423 tokens; the same length of English prose is about 423. JavaScript sits between them at 0.303 tokens per character, 43% above English, because punctuation and identifiers split into short chunks.

The tokenizer generation matters more than most budgets assume. The older cl100k_base encoding returned 848 tokens for the Chinese sample, 28% more than o200k_base’s 661, and 1,321 against 1,317 for English, 0.3% apart. Switching model families without re-measuring moves the count in exactly this way; it is the effect Anthropic describes for its newer Claude tokenizer.

To reproduce a count: pip install tiktoken==0.14.0, then len(tiktoken.get_encoding("o200k_base").encode(text)). The English sample is the visible text inside the guide page’s main element with tags and whitespace runs collapsed; the JavaScript sample is the raw first 2,000 characters of /app.js; the Chinese sample is the body paragraphs of the linked article with citation marks removed. Dates and sources are on each row.

The estimator behind the tool was fitted on a separate set of eight texts, then tested on six it had never seen (three English pages, two JavaScript files and the Chinese article). Its mean absolute error was 3.4% against tiktoken, from 0.8% on the Chinese sample to 6.2% on a page dense with percentages and figures.

How the token calculator counts tokens

The tool counts five things in the text: Latin letters, digits, CJK characters, other non-space symbols, and whitespace. It multiplies each count by a weight fitted to tiktoken’s o200k_base output (letters 0.1663, digits 0.8591, CJK 0.7906, other symbols 0.6407, whitespace 0.318) and rounds the total. Plain English lands at about 4 characters per token, the Chinese sample at 1.41 characters per token, and the JavaScript sample at 3.30.

The other four families are derived from those counts, not from their real tokenizers. Anthropic’s row adds 30% for the newer Claude tokenizer; Google’s and xAI’s rows divide the character count by 4; DeepSeek’s row applies its published 0.3 and 0.6 tokens per character. Anthropic, Google and xAI document planning rules rather than a tokenizer you can run offline for the models in this catalog, so their counts are estimates and say so. Even the OpenAI row is a measurement with a fallback encoding: tiktoken 0.14.0 ships o200k_base, which is what we ran, while the model generations in the catalog do not each publish their own public tokenizer file.

When the estimate is wrong

Errors run high on JSON and minified JavaScript, where braces, quotes and short variable names each take a token; on URLs and long numbers; on emoji; and on scripts outside Latin and CJK that the five counts do not model. Tool and function definitions are not in the text you paste, yet they are billed on every call, so a production request is usually larger than this box suggests. Retrieved context and conversation history add to it too. The exact number is the usage field the API returns for a real request, and the estimation guide shows how to log it and average it across 50-100 calls.

One limit is deliberate: this page prices the text you paste, not the answer. Output tokens are generated by the model and charged at the output rate, which across this catalog runs from 1× to 8× the input rate. Price both sides on the token cost calculator, or turn a paste into a per-user budget with the unit economics calculator.

Questions

How many tokens is a 1,000-word English article?

About 1,250-1,350 tokens of plain prose. Our measured sample of 1,051 words came to 1,317 tokens, 4.73 characters per token. The common planning rule of four characters per token puts 1,000 words near 1,300 tokens, so both estimates agree within 10%. Code and non-Latin scripts move the number much further than prose does.

Why does the same text need more tokens on Claude than on GPT?

Because each provider splits text with its own tokenizer. Anthropic documents that the tokenizer used by Claude 4.7 and later produces about 30% more tokens for the same text than its earlier tokenizer, so a fixed piece of text can carry more tokens on Claude at the same per-token rate. This page applies that 30% on top of the measured OpenAI count for its Claude row and labels the result as an estimate.

Does the token calculator count output tokens?

No. It counts the text you paste, which is the input side of a call. Output tokens are generated by the model and billed at the output rate, which is usually several times the input rate. To price a call with both sides, put the input and output counts into the token cost calculator; to get the real output count, read the usage field the API returns.

How accurate is the estimate?

On six texts kept out of the estimator's calibration set, the mean absolute error was 3.4% against tiktoken's o200k_base count, from 0.8% on the Chinese sample to 6.2% on a page dense with percentages and figures. Errors are larger on JSON, minified code, URLs, emoji and scripts the estimator does not model. The exact number is always the usage field the API returns for a real request.

Is the text I paste sent anywhere?

No. The counting and the arithmetic run in your browser, in the page's own script, and the text never leaves the page. The site's counters record anonymous events such as page views, without the text you type.

Which family is cheapest for the same text?

On the 10,000-character sample in the table, DeepSeek Flash came to $0.000745 per send, $0.7446 per 1,000 sends, because it both counted the sample at 2,482 tokens and has the lowest input rate at $0.30 per 1M. Claude Sonnet 5.5 was the priciest row at $6.77 per 1,000 sends, 9 times DeepSeek. A cheaper count does not always mean a cheaper bill: rate and count move together.

Next step → Turn a token count into a monthly bill

Price data last checked 2026-11-18 against official sources · how we verify

Price-change alerts

One short email when a provider changes a price or a promo ends. No spam, unsubscribe any time.