LLM Token Counter

Estimate tokens and API cost for LLM prompts.

No upload

Loading tool…

Processing happens on your device using your browser's CPU/GPU. Results are kept only in this tab's memory and are wiped when you click “Clear” or close the page.

About LLM Token Counter

The LLM Token Counter estimates how many tokens a prompt will use and what that costs, in dollars and in rupees. Enter your own per-million input and output prices, the expected reply length and your monthly call volume, and it works out the cost of a single call and of a month's usage. Everything is calculated in your browser as you type.

How to use LLM Token Counter

  1. Paste the prompt, document or chat history you plan to send to the model.
  2. Enter the current input and output prices per 1M tokens from your provider's pricing page.
  3. Set Expected output tokens, Calls per month and the USD to INR rate you want to apply.
  4. Read the tiles for estimated tokens, words, characters, cost per call in $ and ₹, and the monthly total.

What people use it for

  • Budgeting an API feature before writing code, in rupees your finance team recognises.
  • Checking whether a long system prompt or a pasted document fits a model's context window.
  • Comparing two providers' prices on your real prompt rather than on a sample.
  • Deciding whether to trim a prompt that gets sent thousands of times a month.

Good to know

Token counts approximate BPE tokenizers and are usually within about 10% for English prose; code, long URLs and Devanagari or other Indic scripts drift further, generally upwards. This is not the exact tokenizer any one model uses. The default prices are placeholders only, and model pricing changes often, so copy the current rates from your provider before relying on a figure.

Frequently asked questions

How exact is the token count?
It is an estimate, typically within about 10% for English text. Each model family has its own tokenizer, so for billing-critical numbers use the provider's official counting endpoint or library.
Are the default prices correct?
They are placeholders, not live rates. LLM pricing changes often and differs by model and region, so open your provider's pricing page and type the current input and output prices in yourself.
Why does Hindi text cost more tokens?
Devanagari and other Indic scripts are split into far more tokens per character than English, often two to three times as many, so the same sentence in Hindi costs noticeably more to process.
Is my prompt sent anywhere?
No. The counting is done by JavaScript inside the page and no API is called, so you can safely size confidential prompts, contracts or customer data here.