🤖 LLM Token Counter and Cost Estimator

Estimate tokens and API cost for GPT, Claude, Gemini, and Llama before you send the request.

Last updated: November 8, 2026 · By the BoltQuickTools team

Expected output tokens: (used for cost estimate; many requests produce ~10x more output than input)

Per-model breakdown (2026 pricing)

ModelInput tokensInput costOutput costTotal

Token counts are estimates based on character-to-token ratios per model family. Real counts differ by 5-10% from exact tokenizer output. Prices updated May 2026; refer to provider docs before billing decisions.

Sizing a prompt before you pay for it

If you are planning a batch job or comparing models, you need a rough cost before sending anything, and each provider counts tokens differently. This page gives a quick estimate from the length of your text. It does not run a real tokenizer, so use it for planning and not for billing.

Getting an estimate

  1. Paste your text into Paste your prompt or document. The results update as you type.
  2. Set Expected output tokens to the response length you expect. It starts at 500.
  3. Read the cards (Characters, Words, Lines, Detected) and the Per-model breakdown table, which lists input tokens, input cost, output cost and total for each model.

How the numbers are calculated

The page divides your character count by a fixed characters-per-token ratio for each model and rounds up:

ModelsCharacters per token
GPT-5, GPT-4o, GPT-4o-mini4.0
GPT-4 Turbo3.8
Claude rows4.5
Gemini rows4.3
Llama row3.5

The Detected card then adjusts that ratio. code multiplies it by 0.78, which raises the token count. nonlatin replaces it with 1.5 for every model. prose leaves it alone.

Cost is estimated tokens times the input price, plus your expected output times the output price. Prices are per million tokens and hard-coded into the page, and a comment in its code dates them to May 2026.

Worked example: the text the page opens with

The starter prompt is 207 characters and is detected as prose. With 500 expected output tokens, some of the rows read:

ModelInput tokensInput costOutput costTotal
GPT-4o52$0.13 /1k$5.00 /1k$5.13 /1k
GPT-4 Turbo55$0.55 /1k$0.0150$0.0155
Claude Sonnet 446$0.14 /1k$7.50 /1k$7.64 /1k
Llama 4 405B60$0.16 /1k$1.35 /1k$1.51 /1k

The /1k suffix is easy to misread. Any amount under one cent is displayed as the cost of 1,000 such requests. So $5.13 /1k means about half a cent for this one request, and $0.0155 is the actual cost of one request. Mixed rows like these are not on the same scale, so convert before comparing.

Where the estimate goes wrong

The article on controlling LLM token costs covers ways to bring these numbers down. If you only need a plain word count, the word counter is simpler, and the JSON Schema tool helps when you are designing structured output.

Reading the results

Why do the models show different token counts for the same text?

Each row uses its own fixed ratio, as in the table above. The differences come from those ratios and are not the result of tokenizing your text with each model.

What should I enter for expected output tokens?

The most you expect the model to write. For a batch job, use the max_tokens limit you plan to set, which gives a worst case. Output is priced above input on most rows, so this field often decides the total.

Is my prompt sent to any of these providers?

No. The estimate is arithmetic on your text's length inside the page, and the script does not call any model provider.