BroadRouter

Prompt token diff

Updated

In short: A prompt edit changes your bill by token delta × requests per day × days ÷ 1,000,000 × input price per million. Cutting 500 tokens from a system prompt sent 10,000 times a day removes 150 million input tokens a month, $26.25 on DeepSeek V4.1 Flash. Paste two versions for changed lines, exact token counts and the monthly difference.

Free, no sign-up, runs in your browser: nothing you type is sent anywhere.

Two prompts

Tokens in A—
Tokens in B—
Difference—
Cost change a month—

What changed

Get started

The link keeps the model and numbers, never your prompts.

Prompt input cost only, before tax. BroadNet prices synced 2026-11-14; other models use the cheapest standard price listed on a provider's own page in our database. Until you count exact tokens, the counts are estimates from measured characters per token for the text's script, labelled as such.

Report a wrong price or number (email to info@broadnet.ai, with this page's link and your inputs filled in).

How it works

  1. Paste the current prompt on the left and the new version on the right, or edit the example.
  2. Choose the model you call. The matching tokenizer is selected; press Count tokens to download it once (it is cached).
  3. Enter requests per day, days per month and your measured cached-input share.
  4. Read the exact token counts, the difference, the monthly cost change and the highlighted lines that changed.

The formula

token delta     = tokens(B) − tokens(A)
monthly tokens  = token delta × requests per day × days
monthly change  = monthly tokens × (1 − cache share) × input price ÷ 1,000,000
                + monthly tokens × cache share × cached price ÷ 1,000,000

A negative change is a saving. When the model publishes no cached price, the cache share is ignored and every token is billed at the input price.

Worked example

The example above trims a support assistant's system prompt: polite filler goes, and each rule becomes one short line. Press Count exact tokens to see the real difference with each tokenizer. At 10,000 requests a day, every 500 tokens removed is 150 million input tokens a month, $26.25 on DeepSeek V4.1 Flash.

Where prompt tokens hide

  • Filler and repetition. "Please make sure that you always" carries no instruction. Say each rule once.
  • Examples. Few-shot examples can be the largest block. Keep the one or two that change behaviour.
  • Tool definitions and schemas. Long descriptions and unused tools are sent on every call.
  • Language. The same instruction in Arabic usually takes more tokens than in English; see the Arabic token counter.

Test a shorter prompt on real inputs before you ship it: fewer tokens is only a saving if the answers stay as good.

Questions

How do I count the token difference between two prompts?

Tokenize both versions with the tokenizer of the model you call and subtract. Character or word counts are only estimates, and the gap differs by language and tokenizer. This tool runs the real tokenizer in your browser and shows both counts, the difference and the lines that changed.

How much does removing prompt tokens save?

Monthly saving = tokens removed × requests per day × days ÷ 1,000,000 × input price per million. 500 tokens fewer on 10,000 requests a day for 30 days is 150 million input tokens, $26.25 a month on DeepSeek V4.1 Flash at its uncached input price.

Does prompt caching change the saving?

Yes. If the system prompt is a cached prefix, most of it is billed at the cached price, so shortening it saves less. With 80% of input cached on DeepSeek V4.1 Flash, the same 500 tokens save $5.91 a month. Enter your measured cache share. Editing the start of a prompt also invalidates the cache until the new prefix is cached.

Why do two tokenizers give different counts for the same prompt?

Each model family trains its own vocabulary, so the same text splits into different pieces. Arabic, code and numbers vary most. Count with the tokenizer of the model you actually call; for Gemma the tool uses Google's base-model tokenizer and says so.

Are chat template tokens included?

No. The counts are for the text alone. Chat formatting adds a few tokens per message, the same for both versions, so the difference between them is unaffected.

Is my prompt sent anywhere?

No. The tokenizer file downloads once from Hugging Face (or the GPT bundle from this site) and runs in your browser. Your prompts never leave the page and are not stored in the page address.

Go deeper

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity