$ tokens --count --cost
Token Counter — with API Cost in Brazilian Reais
Paste a text to estimate the tokens and simulate how much it costs per month on the GPT, Claude, Gemini and DeepSeek APIs — in Brazilian reais, with the day's exchange rate, IOF and spread.
- 100% in your browser
- free
- no sign-up
0 estimated tokens
Estimate calibrated for Portuguese (≈ 3.5 characters per token); English text usually lands closer to 4. Every model has its own tokenizer — the official count is the API’s. Your text never leaves your browser.
API cost simulation
Paste some text above (or enter the input tokens) to simulate the cost per model.
What a token is (and why you pay for it)
Language models do not read words: they read tokens — text fragments defined by each model's tokenizer. A common word may be 1 token; long or rare words are split into several. This is the unit APIs charge in, with separate prices for input (what you send: prompt, context, documents) and output (what the model generates) — and output usually costs 4 to 8 times more. That is why estimating tokens is the first step to forecasting the cost of any AI app, agent or automation.
Portuguese “spends” more tokens than English
Tokenizers are trained on far more English text, so they break Portuguese into smaller pieces: the same content typically costs 20-40% more tokens in Portuguese. In practice, this means budgets made with English examples underestimate the real cost of a Brazilian product — a detail that rarely shows up in foreign calculators.
From dollars to reais: exchange rate, IOF and spread
Price tables are in dollars, but your bill arrives in Brazilian reais. Between the commercial exchange rate and what a Brazilian card actually charges there are two layers: the IOF tax on international purchases and the spread of the card network or account. Combined, they usually exceed 8% — our simulation already builds both in (with editable values) so the number you see is what actually leaves your pocket. About the quote: we use the live commercial exchange rate, and you can override it manually.
Tricks to pay less
- The right model for the right task: a “mini” handles classification and extraction for a fraction of the flagship price — compare in the table above and see our guide on which AI to use.
- Prompt caching: if every request repeats the same context (instructions, knowledge base), caching cuts input cost by up to 90% with some providers.
- Batch API: for jobs that can wait (overnight reports, backfill), batch queues typically come out at half the price.
- Lean context: sending the whole document when the relevant section would do is the most common waste — and the easiest to cut.
## faq
Frequently asked questions
What is a token?
A token is the unit in which AI models "read" and charge for text: a piece of a word, a short word or a punctuation mark. "Computer" may become 2-3 tokens; "of" is usually 1. AI APIs charge per million tokens processed — with separate prices for what you send (input) and what the model generates (output), which is usually more expensive.
How many tokens does a Portuguese word have?
On average, 1 Portuguese word becomes between 1.3 and 1.8 tokens — more than in English, because tokenizers are trained predominantly on English text and break Portuguese words into more pieces. In practice, the same text in Portuguese costs on the order of 20-40% more tokens than the English version.
Is this tool’s count exact?
It is an honest estimate: each model has its own tokenizer (the algorithm that splits the text), so the exact count varies between GPT, Claude, Gemini and DeepSeek. We use ≈3.5 characters per token, a good middle ground for Portuguese, and show the likely range. For billing purposes, the official count from the provider’s API is always the one that counts.
How is the cost in Brazilian reais calculated?
Official API price (US$ per million input and output tokens) × tokens in your request × number of requests per month, converted at the day’s commercial exchange rate and, if you leave it checked, increased by IOF (Brazil’s tax on international purchases) and the typical card spread — which is the real cost of paying in dollars from Brazil and can exceed 8% over the commercial rate.
Is the text I paste sent to any server?
No. The count and the simulation run 100% in your browser — the text never leaves the page. The only request made is for the dollar exchange rate, fetched from our own endpoint (/api/cambio), with none of your data attached.
How can I pay less on AI APIs?
Four proven levers: use "mini" models for simple tasks (they can cost 10-20x less); enable prompt caching when repeating the same context (up to 90% discount on input with some providers); use batch APIs for jobs that can wait (typically 50% cheaper); and trim the context — sending the whole document when an excerpt would do is the most common waste.
## other tools