AI Cost Comparator
Everything runs locally in your browser — your prompt is never sent anywhere, not even to check its cost.
Input Tokens (exact)
0
How to use this AI cost comparator
- Paste the prompt you're planning to send.
- Adjust the expected output length if you have a rough idea.
- See every model's estimated cost for that exact prompt, cheapest first.
Why compare instead of just picking one model?
Per-token prices vary by more than 100x between the cheapest and most expensive mainstream models, and the cheapest option for a short factual question is often not the cheapest for a long creative-writing request, since input and output are priced separately. Comparing your actual prompt against every model at once, instead of assuming a fixed "cheap model," catches cases where a slightly pricier-looking model is actually cheaper for that specific request.
Is the token count exact for every provider?
It's exact for OpenAI's own models (using the o200k_base tokenizer) and a reasonable approximation for Claude and Gemini, since those providers use their own distinct tokenizers not available as a public client-side library.
Why does the cheapest model change depending on my prompt?
Because input and output tokens are usually priced very differently, a short prompt expecting a long answer and a long prompt expecting a short answer can have different cheapest options — this tool recalculates the full ranking for your specific numbers, not a fixed list.
Why the "cheapest" model isn't a fixed answer
A genuinely common mistake is picking one model as "the cheap one" and defaulting to it for every task, without accounting for how differently input and output are priced across providers. A model with cheap input pricing but comparatively expensive output pricing is the right pick for tasks with long prompts and short answers (classification, extraction, yes/no questions), but the wrong pick for tasks with short prompts and long answers (long-form writing, detailed explanations) — the actual ranking flips depending on the specific shape of the request, not just which model has the lowest headline price.
Why comparing models isn't only about picking the cheapest one
Cost is one legitimate factor, but it isn't the only one worth weighing before choosing a model for a specific task — a cheaper model that produces a noticeably worse result on a task requiring nuanced reasoning can easily cost more in the end, once the time spent fixing or regenerating its output is counted. This tool deliberately shows cost as one clear, comparable number precisely so it can be weighed against actual output quality for your specific use case, rather than being the only input to the decision — the cheapest technically correct answer isn't automatically the best business decision if quality genuinely differs enough to matter for that particular task.
Why tokenizer differences make cross-provider estimates approximate
Every major provider trains its own distinct tokenizer, meaning the exact same sentence can split into a meaningfully different number of tokens depending on which provider's vocabulary and merge rules apply, as explained in more detail on this site's Token Counter tool. Because a public, client-side implementation of Claude's or Gemini's specific tokenizer isn't available the way OpenAI's is, this tool applies OpenAI's own token count as a working approximation for those other providers too — usually within a reasonably close range for plain English text, but not an exact match, which is exactly why this comparison is meant for deciding relative cost ordering between options, not for predicting your exact final bill down to the cent.
Why estimating output length matters more than it seems
Because output tokens are typically priced several times higher than input tokens across every major provider, the expected-output-length number you enter has an outsized effect on the final cost estimate compared to the input side, which this tool already calculates exactly. A rough guess based on similar past requests — a one-paragraph answer, a full-page summary, a complete function of code — is usually good enough to get a meaningful relative comparison between models, even without knowing the exact final output length in advance, since that length is fundamentally unknowable until the model actually finishes generating a response.
Limitations of this tool
This tool estimates cost using each provider's standard public list pricing and an approximated cross-provider token count, entirely within your browser — as explained above, exact token counts are only guaranteed for OpenAI's own models, and prices don't account for caching discounts, batch pricing, or volume-tier rates some providers offer high-usage accounts. Treat the ranking as a genuinely useful relative comparison for deciding between models for a specific prompt, not as a precise prediction of your actual final invoice.