Build with AI

How do you compare AI model prices per million tokens?

· By Robert Scales · 4 min read

Short answer

Never compare the headline price alone: multiply each model's input price by the input tokens your task uses, multiply its output price by the output tokens, and add the two. Run that calculation on one realistic workload for every model you are considering, and the cheapest choice is often different from the one with the lowest number on the pricing page.

When you use an AI model through an API, the programming interface developers connect their apps to, you pay per token. A token is a small piece of text: a short word, part of a longer word, or a punctuation mark. Providers count tokens in two directions. Input tokens are everything you send: your instructions, the user's question, any document you paste in. Output tokens are what the model writes back. Prices are quoted in dollars per million tokens, often shortened to "per 1M" or "per MTok."

The catch is that every provider charges a different price for input and for output, and output usually costs several times more. A model that looks cheap on input can be expensive for a task that produces long answers, and the reverse.

The prices, side by side

Here are the official list prices for four popular models, in US dollars per million tokens, as published by OpenAI, Anthropic and Google this month for their paid API tiers:

ModelInputOutputOutput ÷ input
GPT-4o (OpenAI)$2.50$10.004×
GPT-4o mini (OpenAI)$0.15$0.604×
Claude 3.7 Sonnet (Anthropic)$3.00$15.005×
Gemini 2.0 Flash (Google)$0.10$0.404×

Prices for text input. Google charges more for audio input, and some providers add other line items, such as cached input or search.

A worked comparison on one workload

Suppose a small online shop wants to draft replies to customer emails. Each request sends about 1,500 input tokens (instructions, the customer's email and a few order details) and gets back about 300 output tokens (the draft reply). It handles 1,000 emails a day, or about 30,000 a month. These workload figures are illustrative; yours will differ.

Monthly volume: 30,000 × 1,500 = 45 million input tokens, and 30,000 × 300 = 9 million output tokens.

The formula for each model is:

monthly cost = (input millions × input price) + (output millions × output price)
ModelInput costOutput costMonthly totalPer email
GPT-4o45 × $2.50 = $112.509 × $10.00 = $90.00$202.50$0.0068
GPT-4o mini45 × $0.15 = $6.759 × $0.60 = $5.40$12.15$0.0004
Claude 3.7 Sonnet45 × $3.00 = $135.009 × $15.00 = $135.00$270.00$0.0090
Gemini 2.0 Flash45 × $0.10 = $4.509 × $0.40 = $3.60$8.10$0.0003

Two lessons stand out. The spread is huge: the most expensive option here costs more than thirty times the cheapest for the same work. And the shape of the task matters. This workload is input-heavy, so input prices drive much of the bill. Flip it to short questions with long answers, such as writing articles from a one-line brief, and output prices dominate instead.

Try it: Put the table above into a spreadsheet with four input cells: tokens in, tokens out, requests per month, and price pairs per model. Then change the output to 1,500 tokens per request and watch how the ranking of the models and the gaps between them change.

What the price table doesn't tell you

Price is only one column. A cheaper model that gets 20% of replies wrong can cost more in staff time than an expensive model that gets them right, so test quality on real examples before you choose. Context window size, the amount of text a model can take in at once, also differs: 128,000 tokens for GPT-4o and GPT-4o mini, 200,000 for Claude models, and one million for Gemini 2.0 Flash, according to the providers.

Discounts change the math too. OpenAI's Batch API cuts input and output prices by half for jobs that can wait up to 24 hours. Cached input, text the provider has seen recently in an identical prompt, is cheaper on several platforms. And Google's free tier comes with lower rate limits, and Google lists free-tier content as used to improve its products, which rules it out for private customer data.

Finally, prices change. Pin the date next to every number in your spreadsheet and check the official pricing pages before any decision.

How do you estimate a monthly bill?

Start from measurements, not guesses. Run 20 to 50 real requests through each candidate model and read the token counts the API returns with every response; every major provider reports input and output tokens used. Average them to get your tokens per request.

Next, estimate volume honestly: requests per day times working days, plus growth. Add the hidden extras. Conversations resend earlier messages each turn, so a five-turn chat costs far more than five single questions. Retries after errors, system instructions sent with every call, and documents attached for context all count as input.

Then calculate with the formula above and add a safety margin; 20 to 30% is a reasonable starting assumption until you have a month of real usage. Compare the result with what the work is worth: if a draft reply saves a staff member two minutes, even the most expensive row in the table may be a bargain.

Last, protect yourself from surprises. Set monthly spending limits in each provider's console, log token use per feature so you can see what drives cost, and review the bill after the first week rather than at the end of the month.

Sources

  1. API Pricing — OpenAI, March 12, 2025
  2. All models overview — Anthropic (documentation), March 11, 2025
  3. Gemini Developer API Pricing — Google AI for Developers, March 12, 2025

Get the free Guide to Artificial Intelligence

Sign up for the weekly newsletter and receive the free guide: what changed in AI this week, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement