Counting happens on this device. Your text is never uploaded.
Exact and estimated counts
OpenAI publishes its tokenizers, so GPT counts here are exact for the text itself: o200k for GPT-4o, GPT-4.1, GPT-5 and the o-series, and cl100k for GPT-4 and GPT-3.5. Other model families use tokenizers that aren't published in a form that can run here, so their counts are estimates, marked as such, based on about 3.5 to 4 characters per token for English. Code, numbers and other languages usually use more tokens per character.
Working out the cost
Each request costs its input tokens times the input price, plus its output tokens times the output price, with prices given per million tokens. The total multiplies that by the number of requests. Add extra input tokens for anything sent with every request, such as a system message or chat history.
Questions
Why are there no prices filled in?
Prices change often and differ by model size, region, batch discounts and caching. Entering the current price from your provider's page keeps the figures right. The example uses round made-up prices only to show how it works.
How close are the estimates?
For ordinary English prose they're usually within about 10 to 20 percent. Treat them as a planning guide, not a bill. Check your provider's usage page or token counting endpoint for exact figures.
Can I add another model?
Yes. Add a model, give it a name, a characters-per-token figure and its prices. It's saved on this device with your other prices.
What isn't included?
Formatting tokens added by chat APIs, images, audio, tool definitions, cached-input discounts and reasoning tokens that some models use while thinking. Add an allowance with extra input tokens or output tokens.