Browser tool + paid API

Token Calculator for LLMs

Count tokens locally, price prompts across major LLMs, and add the same count service by API.

Paste text to count tokens(Loading calculator...)

Your text stays in this browser.0 total characters

Token visualization

Pieces appear as the local tokenizer reads your text.

0 tokens
Paste text and the token visualization appears here.

Token summary

Tokens
0
Words
0
No-space chars
0
All chars
0

Cost snapshot

Lowest input rate
Gemini 2.5 Flash-Lite$0.1/1M
Providers covered
Major LLM APIs3 providers

Paste text to turn the pricing table into exact estimated costs for your prompt.

Need token counts in your app?

Use the Token-Calculator.net API for metered token, character, and word counts with key-based access.

POST /api/v1/tokenize$1.99/month or $9.99/year

Compare Token Costs

Compare input, cached-input, and output pricing across major LLM providers. Long-context tiers are applied automatically when your token count crosses a provider threshold.

Full model pricing table

Rates update the estimates above as soon as you paste text.

Token Calculator FAQ

Quick answers for token counts, local browser processing, model price comparisons, and API access.

Learn how token counts affect cost

The detailed guide covers tokenization, word-to-token ratios, cached input pricing, context windows, and prompt optimization without crowding the calculator page.