Skip to main content
ilovecalcs logoilovecalcs.

Dev · Live

AI Token Cost Calculator — GPT, Claude, and Gemini, compared instantly.

Estimate the cost of a prompt or API workload across GPT, Claude, and Gemini models — enter your text or token count and compare pricing instantly.

How it worksVerified 2026-08-23

Interactive

Token Cost

Model

OpenAI

Anthropic

Google

Input tokens, from…

Prompt text0/200,000 chars

0 input tokens (~4 chars/token estimate)

Expected output tokens

Output length can't be estimated from your prompt — it depends on what the model generates.

GPT-5

Input cost$0.00
Output cost$0.005
Total$0.005

List-price rates, verified 2026-08-23. Excludes caching/batch discounts.

0 input + 500 output tokens, compared across every model.
ModelInput rateOutput rateEstimated cost
Gemini 2.5 Flash-Lite
$0.1/M$0.4/M$0.0002
GPT-4o mini
$0.15/M$0.6/M$0.0003
GPT-5 mini
$0.25/M$2/M$0.001
Gemini 2.5 Flash
$0.3/M$2.5/M$0.00125
Claude Haiku 4.5
$1/M$5/M$0.0025
GPT-4.1
$2/M$8/M$0.004
o3
$2/M$8/M$0.004
Gemini 3.5 Flash
$1.5/M$9/M$0.0045
GPT-5
$1.25/M$10/M$0.005
GPT-4o
$2.5/M$10/M$0.005
Claude Sonnet 5
$2/M$10/M$0.005
Gemini 2.5 Pro
$1.25/M$10/M$0.005
Gemini 3.1 Pro Preview
$2/M$12/M$0.006
Claude Opus 5
$5/M$25/M$0.0125
Claude Fable 5
$10/M$50/M$0.025

Rates shown are each provider's standard list price, verified against their official pricing pages on 2026-08-23. This is one of the fastest-moving price categories in software — always confirm against OpenAI, Anthropic, or Google's official pricing page before a purchasing decision.

Field guide

How the AI Token Cost Calculator works.

Every major AI API — OpenAI, Anthropic, Google — bills by the token, not the character or the word. A token is roughly a chunk of a word (English averages about 4 characters or ¾ of a word per token), and providers charge separately for input tokens (what you send) and output tokens (what the model generates) — almost always at a higher rate for output.

Estimating your token count

Paste your prompt (or enter a token count directly if you already know it), and the calculator estimates tokens using the standard character-based approximation. This is accurate enough for cost planning, but each provider's real tokenizer differs slightly — for a billing-critical estimate, use that provider's own token-counting endpoint on your exact text.

The cost formula

cost = (input tokens ÷ 1,000,000) × input price + (output tokens ÷ 1,000,000) × output price

Prices are quoted per million tokens industry-wide. Select a model and the calculator applies its current input/output rates to your estimated or entered token counts.

Tips for cutting real costs

  • Right-size the model. Don't run simple classification or extraction on a flagship model — a cheaper tier is often just as accurate at a fraction of the cost.
  • Use prompt caching for repeated context. If the same system prompt or reference document is sent on every request, caching can cut that portion's cost by up to ~90%.
  • Batch non-latency-sensitive work. Async/batch processing is roughly half price on most providers when you don't need an instant response.
  • Trim your prompt. Shorter, more focused prompts reduce input token cost directly — and often improve output quality too.

Pricing note: Rates are each provider's standard list price, checked against OpenAI's, Anthropic's, and Google's official pricing pages on 2026-08-23. AI API pricing is one of the fastest-moving categories in software — confirm current rates before a purchasing decision.

Last reviewed: 2026-08-23

Pricing is checked directly against each provider's official page rather than a single authority — no one company's pricing page covers all three. For comparison, see the pricing comparison above.