Token Cost Estimator (your own prices)
Counts the tokens of a prompt with the exact OpenAI encoding, then works out the cost from input and output prices that you type in. No prices are built in.
Use the tool
Why this tool exists
Before you run a prompt a thousand times, it is worth knowing what it will cost. Pricing pages list rates per million tokens, and turning a prompt into a bill means counting its tokens, adding expected output, and multiplying by the number of calls.
Paste the prompt, pick the encoding, then type the input price, the output price, the expected output tokens per call and the number of calls. You get the cost per call and the total. The tool deliberately has no price list, because rates change and a stale figure would mislead you. Copy the current numbers from your provider's pricing page. Discounts for cached input or batch jobs are not modelled. The counting runs in your browser.
How to use it
- Paste your prompt text into the box.
- Choose the encoding that matches your model.
- Enter input and output prices per 1M tokens, expected output tokens, number of calls and a currency label.
- Read the cost per call and the total for all calls.
Frequently asked questions
Where do I find the prices?
On your provider's own pricing page. Enter the figure per one million tokens for input and for output. This tool assumes nothing and verifies nothing, so the answer is only as good as the numbers you enter.
Is the token count exact?
For OpenAI models, the count of your prompt text is exact for the encoding you pick. The number of output tokens is your own estimate, and message framing for chat requests is not added.
Does it handle cached or batch pricing?
No. It multiplies a flat price by the token count. If your provider discounts cached input or batch requests, adjust the price you enter, or run separate calculations.
Can I use it for non-OpenAI models?
The token count would only be an approximation, because other tokenizers differ. For a rough result, enter your own price anyway, but expect the real count to be somewhat different.