AI Engineer Interview Questions / Tools / LLM cost calculator
Free tool

LLM API cost calculator

What will this feature cost per day and per month? Pick a model, enter tokens and traffic, turn on prompt caching. 30 models from OpenAI, Anthropic, Google, DeepSeek and Mistral, list prices as of Nov 1, 2026, each linked to the provider page.

$19.99 on Gumroad, instant download40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Your workload

System prompt, history, retrieved context and the user message.

Reasoning tokens count as output on most providers.

Estimate
Per request$0
Per day$0
Per month (30 days)$0

Prices as of 2026-11-01, check provider page before you budget. Standard on-demand rates in USD. Taxes, batch discounts, cache writes and tool fees are not included.

Same workload on every model

Sorted from cheapest to most expensive per month, with your current settings. Caching applies only where the provider publishes a cached-input price.

#ModelProviderPer dayPer month

How the math works

  1. Uncached input cost = input tokens × (1 − cache share) × input price ÷ 1,000,000.
  2. Cached input cost = input tokens × cache share × cached-input price ÷ 1,000,000.
  3. Output cost = output tokens × output price ÷ 1,000,000.
  4. Per day = cost per request × requests per day. Per month = per day × 30.

Worked example: GPT-6.1 Terra at $1.00 input and $5.00 output per 1M tokens, 2,000 input and 500 output tokens, 10,000 requests a day, no caching. Per request is 2,000 × 1.00 ÷ 1M + 500 × 5.00 ÷ 1M = $0.0045. Per day is $45.00 and per month is $1,350.00.

The PlaybookWant the full method?

The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, LLM system design walkthroughs including cost and latency, and an 8-week plan. $19.99 on Gumroad.

Get the AI engineer playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Interviewing for PM or TPM instead? See the PM direction bundle, $59 on Gumroad: PM, TPM and PGM interview handbook, resume system and 1:1 cheat sheet. PM content, not AI engineer prep.

How to explain cost trade-offs in an interview

Cost questions show up in LLM system design rounds as soon as you propose a model. Interviewers want to see that you can turn a design into a number and then defend the levers you would pull.

  1. State the unit economics. Tokens in, tokens out, price per million, requests per day. Say the monthly number out loud.
  2. Find the biggest term. Long system prompts and retrieved context usually dominate input; long answers or reasoning dominate output.
  3. Pull the cheapest lever first. Prompt caching for repeated prefixes, shorter retrieved context, capped output length.
  4. Route by difficulty. Send easy requests to a small model and escalate hard ones, and say how you would measure that quality holds.
  5. Name the risk. Every saving trades something: freshness for caching, accuracy for a smaller model, latency for batching.

Practice the three questions where this comes up most:

Then score your answer to the cost question in the free self-check, or build a day-by-day study plan to your interview date.

Prices and sources

Prices as of 2026-11-01, check provider page. Every rate on this page was read from these official pages on that date. If a page could not be read, its models are left out rather than estimated.

ProviderModelsOfficial pricing page and notes
OpenAI10developers.openai.com/api/docs/pricing
Standard tier. Short context is up to 272K input tokens; above that the page lists long-context rates, applied here automatically. Cache-write prices are not modeled.
Anthropic8platform.claude.com/docs/en/about-claude/pricing
Cached price is the cache hit and refresh rate. Cache writes cost more than base input (1.25x for 5 minute writes) and are not modeled. Haiku 5.5 prompts over 100,000 tokens use its higher rates.
Google Gemini7ai.google.dev/gemini-api/docs/pricing
Paid tier, standard. Context caching storage per hour is not modeled. Some rates are introductory and the page lists the date they change.
DeepSeek2api-docs.deepseek.com/quick_start/pricing
Peak-hour rates. The page says off-peak rates are half of these. Cached price is the cache-hit input rate.
Mistral3mistral.ai/pricing/api
Standard tier, USD, global inference.

Questions

Where do the prices come from? Each price was read on Nov 1, 2026 from the provider's own pricing page, linked in the sources table on this page. Prices change often, so check the provider page before you commit to a budget.
How is the monthly cost calculated? Cost per request is input tokens times the input price plus output tokens times the output price, divided by one million. With caching on, the cached share of input tokens is billed at the cached-input price. Daily cost is cost per request times requests per day, and monthly cost is daily cost times 30.
What does the cache-hit toggle do? It bills a share of your input tokens at the provider's published cached-input or cache-hit price. Set the share to how much of each prompt is a repeated prefix, such as a long system prompt or shared documents. Cache-write premiums and cache storage fees are not included.
Does it include batch discounts or off-peak rates? No. The calculator uses standard on-demand rates. Batch APIs and DeepSeek off-peak hours are cheaper, and the notes under each source say by how much where the page states it.
Why are long prompts more expensive on some models? Some providers charge a higher rate once a single request passes a context threshold, for example 272K input tokens on several OpenAI models and 200K on some Gemini models. The calculator switches to those rates automatically when your input tokens pass the threshold.
How do I use this in an interview? Show the unit economics first: tokens per request, price per million tokens, requests per day. Then name the levers that change the number, such as a smaller model for easy requests, prompt caching and shorter outputs, and say what each one risks for quality.
The PlaybookWant the full method?

The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, LLM system design walkthroughs including cost and latency, and an 8-week plan. $19.99 on Gumroad.

Get the AI engineer playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Interviewing for PM or TPM instead? See the PM direction bundle, $59 on Gumroad: PM, TPM and PGM interview handbook, resume system and 1:1 cheat sheet. PM content, not AI engineer prep.

Free answer self-check · Study plan · Mock round · Question deep dives