Browser calculation · Planning estimate

Rough LLM Token & Cost Estimator

Estimate a rough token budget from text and calculate costs with your own input and output USD rates. A planning heuristic, not a provider token count.

A rough heuristic: round up UTF-16 character count ÷ 4. This is not a provider tokenizer or billing count. Limit: 1,000,000 characters; do not paste credentials or private records.

0Rough input tokens
0Characters (UTF-16 units)
0Whitespace-separated groups

Your rate assumptions

No model prices are preloaded or fetched. Check your provider's current plan and enter your own USD rates per 1 million tokens. Leave them blank to use only the rough token estimate.

Rates must be finite, non-negative numbers. Zero is allowed. These are your assumptions, not a current pricing recommendation.

Output tokens must be a non-negative safe whole number written with digits only. This is your hypothetical response budget, not a prediction of the generated response.

Enter both rates and expected output tokens to calculate a rough cost.

Estimated input cost—
Assumed output cost—
Rough total (USD)—

Input estimate ÷ 1,000,000 × input rate + assumed output tokens ÷ 1,000,000 × output rate. Excludes cache discounts, batch rates, reasoning or tool-specific billing, media, and other charges.

What does this estimator do?

It divides the pasted text's UTF-16 length by four and rounds up. This deliberately simple heuristic is a quick planning aid, not a measurement of model tokens. Words, code, punctuation, languages, and emoji do not share a constant token-to-character ratio; the error can be substantial.

How is cost calculated?

The calculator multiplies the rough input count by your input rate, and your assumed output count by your output rate. Both rates are in USD per million tokens. All three fields start blank: there are no built-in model prices, model rankings, or context-window claims.

For a purely hypothetical example, 1,000 estimated input tokens at $2 per million and 500 assumed output tokens at $8 per million produce $0.002 + $0.004 = $0.006. Those are invented arithmetic examples, not any provider's advertised rates.

Is this an exact token count?

No. This page does not run a provider tokenizer. Use the tokenizer or token-counting method documented for your exact model, including its message formatting, before checking context capacity. This estimate also omits system or chat wrappers, tool definitions, attachments, and other content you did not paste. API usage and billing records are the source for actual billed usage.

Are the prices current?

No provider prices are supplied. You enter the applicable current rates yourself and should recheck them when a model, plan, region, or discount changes. A rough total is not a billing quote.

Privacy and limitations

Prompt engineers and developers use token counts to stay under context limits, compare model costs, and budget API usage. Token counts vary with the model tokenizer, language, and formatting. This tool provides an estimate, not a provider billing count. The estimate uses local browser code without uploading your text; site analytics are separate.

See the privacy policy. No text, token counts, rates, or budget values from this calculator are included in custom analytics events. The page does not submit a prompt to a model or verify provider billing.

Need another small browser utility? Visit all browser tools or the token budget workflow guide.