NumStack

AI Token Cost Calculator

Know your AI spending. Find where you could save. 30+ models. Real pricing. No guessing.

Your Usage

Enter your typical AI usage patterns to see your monthly costs

💡 Avg prompt: ~500 input tokens, ~200 output tokens

Why AI token costs are hard to predict

Every AI model prices input and output tokens differently — and the difference can be 10x between models. GPT-4o, Claude Sonnet, and Gemini Flash all have different sweet spots depending on your prompt length and response size.

NumStack pulls real published pricing from Anthropic, OpenAI, Google, and others so you can compare apples-to-apples before you commit to a model. Enter your typical usage pattern above to see your projected monthly spend across all 30+ models at once.

How to reduce your AI API costs

🔌 Want to automate this? Use the NumStack API to calculate costs programmatically in your own apps.

How this calculator works

This calculator multiplies your input and output token counts by each model's per-token price, then extrapolates that single request out to a day, week, month, and year based on how many requests you enter. It runs the same math against all 30+ models at once so you can see the spread side by side instead of checking one model at a time.

Input and output tokens are priced separately because they cost providers differently to produce. Output tokens — the ones the model generates — are consistently more expensive than input tokens, typically by 3 to 5x depending on the model. Total cost per request is your input tokens divided by one million, times the input price, plus your output tokens divided by one million, times the output price, using the current prices shown in the calculator.

Cost per request

cost = (inputTokens ÷ 1,000,000) × inputPricePerMillion

+ (outputTokens ÷ 1,000,000) × outputPricePerMillion

monthlyCost = cost × requestsPerDay × 30

How to use it

  1. 1.Pick the model you currently use or are considering — or leave the default selection to compare all of them at once.
  2. 2.Enter the average input tokens per request: your prompt, system message, and any context you send.
  3. 3.Enter the average output tokens per request: the length of the response you expect back.
  4. 4.Enter how many requests you expect per day. A rough estimate is fine — you can adjust it later.
  5. 5.Scan the comparison table for the cheapest model that still meets your quality bar for the task.

Common mistakes

Frequently asked questions

What counts as a token?▾

A token is roughly 4 characters, or about three-quarters of a word, in English text — it's the unit AI providers bill by. A short sentence is usually 15-25 tokens; this calculator lets you enter your own counts rather than guessing.

Why do input and output tokens have different prices?▾

Generating output requires the model to run inference for every token it writes, while input tokens are processed once as a batch. That is why output pricing runs 3-5x higher than input pricing across almost every provider.

Does this include volume discounts or prompt caching?▾

No. The totals use each provider's standard published per-token rate shown in the calculator. If you have an enterprise agreement, use prompt caching, or batch requests, your actual bill will typically be lower.

How often is the pricing data updated?▾

We check provider pricing pages regularly and update our model database whenever a provider changes rates or ships a new model. Always confirm current prices with the provider before committing to infrastructure spend.

Can I use this to estimate cost at scale?▾

Yes — per-request cost scales linearly, so multiply by your real request volume. For multi-step pipelines where one user action triggers several model calls, use the Agent Workflow calculator instead, since a single request's cost doesn't capture chained calls.

Which model is cheapest?▾

It changes as providers update pricing, which is exactly why this calculator runs every model side by side instead of naming a fixed "winner" — check the comparison table above for the current cheapest option for your token mix.