AI Token Cost Calculator

A free AI token & LLM cost calculator to estimate your OpenAI, GPT, Claude and Gemini API pricing. Pick a model or enter your own price per 1,000 tokens to forecast cost per request and monthly spend.

$
$

How the AI token cost calculator works

Every large language model (LLM) API — whether it's OpenAI's GPT, Anthropic's Claude or Google's Gemini — bills you by the token. A token is a small chunk of text, roughly 4 characters or about ¾ of a word. Both the text you send (input tokens) and the text the model generates (output tokens) are charged, and output almost always costs more than input.

This LLM cost calculator uses a simple formula to estimate your spend:

Cost per request = (input tokens ÷ 1,000 × input price) + (output tokens ÷ 1,000 × output price)
Monthly cost = cost per request × requests per month

Because providers publish prices per 1 million tokens but this tool works per 1,000 tokens, just divide the per-million price by 1,000. For example, GPT-4o at $2.50 per 1M input tokens is $0.0025 per 1,000 input tokens. Pick a model preset above to fill these in automatically, or type your own numbers to act as an OpenAI API cost calculator, a ChatGPT API pricing calculator, a Claude API cost estimator, or a general AI inference cost calculator.

A worked example: monthly ChatGPT API cost

Imagine a support chatbot running on GPT-4o that handles 10,000 requests a month, with about 1,000 input tokens and 500 output tokens per request. Input costs 10,000 × 1,000 ÷ 1,000 × $0.0025 = $25, and output costs 10,000 × 500 ÷ 1,000 × $0.01 = $50 — a total of about $75 per month, or roughly $0.0075 per request. Switching the same workload to GPT-4o mini would drop it to just a few dollars a month. Change any number in the calculator above to model your own scenario instantly.

LLM API price comparison (per 1M tokens)

Approximate 2026 list prices to help you compare models before you commit. Always confirm current pricing on the provider's site — AI prices change often.

ModelProviderInput / 1MOutput / 1M
GPT-5OpenAI$1.25$10.00
GPT-4oOpenAI$2.50$10.00
GPT-4o miniOpenAI$0.15$0.60
GPT-4 (classic)OpenAI$30.00$60.00
Claude Opus 4.5Anthropic$5.00$25.00
Claude Sonnet 4Anthropic$3.00$15.00
Claude Haiku 3.5Anthropic$0.80$4.00
Gemini 2.5 ProGoogle$1.25$10.00
Gemini 2.5 FlashGoogle$0.30$2.50

Estimates only — check each provider's current pricing page before budgeting.

Tips to lower your AI API bill

Cutting your cost per 1,000 tokens is usually about model choice and prompt discipline: use a cheaper tier (GPT-4o mini, Claude Haiku or Gemini Flash) for simple tasks, keep prompts short, cap the maximum output length, cache repeated answers, and batch requests when your provider offers a discounted batch mode.

Frequently asked questions

How are AI API costs calculated?

Input tokens ÷ 1,000 × input price, plus output tokens ÷ 1,000 × output price, multiplied by your number of requests.

What is a token in AI?

A token is about 4 characters or 0.75 words. Both your prompt and the model's reply consume tokens, and you pay for both.

How much does the GPT-4 API cost?

Classic GPT-4 is about $30 / $60 per 1M input/output tokens; newer GPT-4o and GPT-4.1 are far cheaper (~$2.50 / $10). Enter your token counts above for an exact figure.

What is the cost per 1,000 tokens?

Divide the per-1M price by 1,000. So $2.50 per 1M input tokens = $0.0025 per 1,000 input tokens. Output is usually priced higher.

How can I reduce my token costs?

Use smaller models for simple tasks, shorten prompts, cap output length, cache repeated responses, and use batch pricing where available.

Which is cheaper — GPT, Claude or Gemini?

Lightweight tiers like Gemini Flash and GPT-4o mini are among the cheapest; frontier models like GPT-4, Claude Opus and Gemini Pro cost more. See the comparison table above.