Skip to content

Token Cost Estimator From Pasted Text

Paste the text you are about to send, set your rate per 1M tokens, and get the cost of one request and of a thousand.

How the estimate is made

Your rates

Cost of one request with this text
$0.0047

1,000 of them come to $4.75. The text above is an estimated 83 tokens.

Characters
332
Words
54
Characters per token used
4.00
Estimated input tokens
83
Input cost per request
$0.00025
Output cost per request
$0.0045
Cost per 1,000 requests
$4.75
Implied cost per 1M input tokens
$3.00
What this assumes: the token count is a character heuristic, not a tokenizer. It divides the character count by the ratio you set, and it will be wrong — usually by five to fifteen per cent on English prose, and by much more on code, JSON, or any script that is not Latin. A real BPE tokenizer merges frequent sequences and splits rare ones, so identical character counts can differ substantially in tokens. If you need the exact number, count with the tokenizer of the model family you are calling. The chat template, the system message and any tool schemas are billed too and are not in the box above unless you pasted them. Rates are yours, per 1,000,000 tokens.

The useful thing about pricing a specific piece of text is that it turns an abstract per-million rate into a number with a decimal point you can reason about. A rate of a few dollars per million tokens sounds like nothing until you notice you are sending a 40,000-token document on every one of a hundred thousand requests, at which point the same rate is a five-figure line on a monthly invoice.

The characters-per-token ratio is the whole accuracy story here, and it is deliberately a field rather than a constant. English prose sits near four characters per token for most modern tokenizers. Code sits lower, because punctuation and indentation fragment into single tokens. Languages written in non-Latin scripts sit lower still — often dramatically — because the tokenizer's vocabulary was built mostly from English text, so the same sentence costs more tokens, and therefore more money, in Japanese or Hindi than in English. If you serve a multilingual product, run this once per language before you assume one average.

What the estimate leaves out is everything wrapped around your text. The chat template adds role markers and separators. Tool definitions are serialised into the prompt and can be larger than the prompt itself. On a multi-turn conversation, the entire history is resent on every turn, so the cost of the tenth message includes the first nine. None of that appears in a character count of the box above, and all of it appears on the bill.

Token Cost Estimator From Pasted Text · Multigrid