AI Token Counter Tool

Enter text to estimate token counts per GPT-4o, Claude, and Gemini models, and project API costs in USD and JPY.

Last updated: 2026/10/16 Developer Feedback & bug reports
Input Text
0 Tokens (est.)
0 Characters
0 Words

* Based on GPT-4o family (o200k) estimate

All models estimated via character-class heuristic

Tokens by Model (estimate)

* Based on GPT-4o family (o200k) estimate
Model Tokens Precision

API Cost Estimate

Pick a model, set input/output prices (per 1M tokens), expected output tokens, and the exchange rate to see an estimated cost.

Estimated cost (USD) $0.000000
Estimated cost (JPY) ¥0.00

* Token counts and costs are estimates only. Actual tokenization, billed amounts, prices, taxes, discounts, and caching may differ. Always verify the latest pricing in each provider's official documentation before relying on these figures for budgeting or contracts.

How to Use

1

Enter Text

Type or paste (Ctrl+V / Cmd+V) the text you want to measure into the text area.

2

Check Tokens by Model

Token counts for GPT-4o, GPT-4/3.5, Claude, and Gemini families are estimated automatically.

3

Estimate API Cost

Set input/output prices, expected output tokens, and the exchange rate to view an estimated cost in USD and JPY.

What is the AI Token Counter?

LLMs process text in units called "tokens", and API pricing is calculated per token. This developer tool estimates token counts for GPT-4o, Claude, and Gemini families and projects API costs. When possible, GPT models are measured with a high-precision tokenizer; otherwise (and for other models) a character-class heuristic is used. Everything runs in your browser and your text is never sent to any server.

Features

  • Major Models SupportedEstimate token counts for GPT-4o, GPT-4/3.5, Claude, and Gemini families at once.
  • Instant Cost EstimateSet input/output prices, output tokens, and exchange rate to estimate cost in USD and JPY.
  • Fully In-BrowserYour text is never sent to a server, so even confidential prompts can be measured safely.
  • Real-time CountingCharacters, words, and tokens update instantly as you type, with no waiting.

Use Cases

  • Trim prompt tokens to reduce API costs
  • Check whether input fits within the context (token) limit
  • Compare token efficiency across GPT, Claude, and Gemini
  • Estimate input size for long-text summarization or RAG
  • Roughly project monthly API budgets from usage

FAQ

How accurate are the token counts?
They are estimates. GPT models use a high-precision tokenizer (gpt-tokenizer) when available; otherwise a character-class heuristic is used. For exact values, check each provider's official tokenizer or the usage field in the API response.
What is a token?
A token is the smallest unit an AI uses to process text. As a rough guide, English is about 4 characters per token and Japanese about 1 to 1.5 characters, though it varies by word and context. API billing is based on this token count.
Is my text sent anywhere?
No. All counting happens locally in your browser, and neither your text nor your pricing settings are sent to any server. Even sensitive prompts can be measured safely.
How accurate is the cost estimate?
It is an estimate only. Actual bills vary with each provider's latest pricing, taxes, volume discounts, prompt caching, and non-text inputs such as images or audio. Always confirm current pricing on the official pricing pages.
Why do token counts differ between models?
Each model uses a different tokenizer. For example, the newer GPT-4o tokenizer splits Japanese more efficiently, so the same text often yields fewer tokens than older models.
Are costs shown in JPY or USD?
Both. You enter prices in USD (per 1M tokens), and once you set an exchange rate the estimate is also shown in Japanese yen. The rate is fully editable.