Token + Cost Calculator
Paste a prompt once and compare estimated token counts and API cost across GPT, Claude, and Gemini models before you run it.
What does the Token + Cost Calculator do?
The Token + Cost Calculator is a free web tool that estimates token counts and API costs across GPT-4o, Claude 3.5 Sonnet, and Gemini 1.5 Pro models simultaneously. Paste your prompt once to compare input, expected output, and total costs in USD. All token calculations run locally in your browser without uploading your text to any server.
How do I estimate GPT, Claude, and Gemini API costs?
Paste your prompt into the text box, optionally set expected output tokens, and view the automated cost table. The calculator applies model-specific tokenizers (js-tiktoken for GPT, local approximations for Claude and Gemini) against per-million token API rates to output precise USD cost estimates.
Optional. Add a rough output size when estimating full request cost, not just prompt cost.
Model cost comparison
Prices are manually maintained per one million tokens and should be checked against provider pricing pages before budget-critical use.
| Model | Provider | Tokenizer | Input tokens | Output tokens | Input cost | Output cost | Total cost |
|---|
Pricing notes
Prices are manually maintained per one million tokens and should be checked against provider pricing pages before budget-critical use.
- Prices are manually maintained. Verify against provider pricing pages before making budget-critical decisions.
- Gemini token counts use the provider's public rough estimate of about four characters per token.
- Claude token counts use cl100k_base as a browser-side approximation because official Claude tokenization is provider-side.
Privacy note
This calculator runs in your browser. Prompt text is tokenized locally and is not uploaded to AI Tools Pro or any server.