- Published on
Estimate the Monthly Cost of an AI Feature Before Building It
- Authors

- Name
- Mehdi Akiki
Article · Measurement
The request usually comes in one sentence: "We want AI to sort our support messages. What will it cost per month?"
It is a fair question. But one number is the wrong answer. One number hides its inputs, and the inputs are exactly what changes after launch: the volume, the length of the prompt, the price list, how often a call fails, and how much human time the wrong answers take.
So I prefer a range, with every input written down. Then a CTO can check each line, and a founder can change one input and see what moves.
I had real measurements for exactly this task. In my routing experiment, I sent 200 bank support messages to Claude models, one call per message, and I saved the token counts of every call. Here I turn them into a monthly estimate in six steps. You can redo each step with a calculator.
Step 1: write the feature as one call
First, describe one unit of work. Here it is one customer message in, one intent name out. The intent is the reason why the customer writes, chosen from a list of 77.
Then split the call into parts, because each part has a different price. A token is a piece of a word; models are priced per million tokens.
| Part of one call | Tokens | Where the number comes from |
|---|---|---|
| Instructions and the list of 77 intents | about 804 | the same in every call; measured as the difference between two test calls |
| The customer message, in a short wrapper | about 29 on average (17 to 84) | estimated from the measured counts |
| The answer, with the model's thinking | 33.2 for Haiku 5.5, 12.1 for Sonnet 5.5 | measured, mean of 200 calls |
The instructions are 96% of the input. Keep this in mind for step 3.
My calls went through Claude Code (claude -p), which adds its own text to each call. I measured it with a one-line system prompt and the one-letter message "x": the call still had 644 input tokens. So a direct API call would be smaller than what I measured. I use both numbers below.
Step 2: put a list price on each part
These are list prices from Anthropic's pricing page, as I read it on November 14, 2026, in USD per million tokens:
| Model | Input | Cache write (5 min) | Cache read | Output |
|---|---|---|---|---|
| Haiku 5.5 | 0.10 | 0.125 | 0.01 | 0.50 |
| Sonnet 5.5 | 2.00 | 2.50 | 0.10 | 10.00 |
The Haiku prices are for prompts up to 100,000 tokens.
Prices change. Write the date next to every price in your estimate.
Step 3: the shared prefix and the cache
Every call starts with the same 804 tokens. With prompt caching, the API keeps this shared beginning (the "prefix") for a while, and the next call reads it at a tenth of the input price or less. The documentation says the default cache lives 5 minutes, and "the cache is refreshed for no additional cost each time the cached content is used".
So one call costs one of three things:
cache warm: 804 x cache read + 29 x input + output x output price
cache cold: 804 x cache write + 29 x input + output x output price
no caching: 833 x input + output x output price
With the prices above, per call:
| Model | Cache warm | Cache cold | No caching | Measured through Claude Code |
|---|---|---|---|---|
| Haiku 5.5 | USD 0.0000275 | USD 0.0001200 | USD 0.0000999 | USD 0.0001513 |
| Sonnet 5.5 | USD 0.0002594 | USD 0.0021890 | USD 0.0017870 | USD 0.0026473 |
For Sonnet, a warm cache makes the call almost 7 times cheaper. For Haiku the input is so cheap that the output, 33 tokens with some thinking, is the biggest part of a warm call.
The last column is higher because Claude Code writes about 600 tokens per call to a one-hour cache, at twice the input price. That is a property of my test tool, not of the task. I keep it as the top of the range, because it is the cost Claude Code reported for my real calls, at list prices.
Will the cache be warm? It depends on how the traffic arrives. 10,000 messages a month, spread evenly, is one message every 4.3 minutes. That is just inside 5 minutes. But real traffic is not even: after a quiet night, the first call pays the cache write. So the low end of my range assumes a warm cache, and the high end assumes none.
Step 4: retries
A failed call is paid again. I measured two kinds of failure.
- Answers that fail the format check. My code accepted only an exact intent name from the list. Haiku failed this check on 8 of 200 first answers, and Sonnet on 2. Each one got one more call. So Haiku needs 1.04 calls per message, Sonnet 1.01.
- Errors. None in these 410 calls.
The retries were cheap, because the whole prompt was already in the cache: a Haiku retry cost USD 0.0000406, about a quarter of a first call. I still count a retry as a full call. It is simpler, and it errs on the high side.
Step 5: batch at half price
If nobody waits for the answer, the Message Batches API is an option. I did not measure it. The documentation says "All usage is charged at 50 percent of the standard API prices", most batches finish within 1 hour, and a batch can take up to 24 hours. Caching works with batches, but "cache hits are provided on a best-effort basis". So I use batch only for the lowest line.
Step 6: multiply by the volume
Model cost per month, in USD:
| Volume per month | Model | Batch and warm cache | Warm cache | No caching | Measured through Claude Code |
|---|---|---|---|---|---|
| 10,000 | Haiku 5.5 | 0.14 | 0.29 | 1.04 | 1.53 |
| 10,000 | Sonnet 5.5 | 1.31 | 2.62 | 18.05 | 26.55 |
| 100,000 | Haiku 5.5 | 1.43 | 2.86 | 10.39 | 15.30 |
| 100,000 | Sonnet 5.5 | 13.10 | 26.20 | 180.49 | 265.50 |
Each cell is the per-call cost from step 3, times the calls per message from step 4, times the volume. The batch column is half of the warm-cache column. The last column uses the cost per message that Claude Code reported, retries included.
So the AI bill is between about 14 cents and 265.50 dollars a month. Hmm, that is small. What is missing?
The cost that is not on the AI bill
The model is not right every time. In my test, Haiku chose a wrong intent for 60 of 200 messages (30%), and Sonnet for 38 (19%). Some of these are debatable, because the labels in the data are strict. But each wrong route costs somebody time: a support agent opens the message, sees it is not for them, and sends it on. The few answers that stayed invalid after the retry also need a person (6 of 200 for Haiku, 2 for Sonnet).
I did not measure this time. These are my assumptions, and you should replace them with yours:
- Assumption: a wrongly routed message costs 1 to 3 minutes of a person's time.
- Assumption: a message that the system could not route costs 30 seconds.
- Assumption: one hour of support time costs USD 30.
people cost = volume x (wrong share x minutes per wrong route + invalid share x 0.5) / 60 x 30
| Volume per month | Model | People cost, low (1 min) | People cost, high (3 min) |
|---|---|---|---|
| 10,000 | Haiku 5.5 | USD 1,575 | USD 4,575 |
| 10,000 | Sonnet 5.5 | USD 975 | USD 2,875 |
| 100,000 | Haiku 5.5 | USD 15,750 | USD 45,750 |
| 100,000 | Sonnet 5.5 | USD 9,750 | USD 28,750 |
Now the picture is different. At 100,000 messages, Sonnet costs up to 250 dollars more per month in tokens than Haiku. Under my assumptions, it saves 6,000 to 17,000 dollars of human time, because it is wrong less often.
The same logic goes further. Opus 5.5 was right on 175 of 200 messages in the same test, at USD 5.88 per 1,000 messages through Claude Code. A plain search over labeled examples, with no model at all, was right on 171. And Haiku with ten similar labeled examples in its prompt was right on 187, at USD 0.21 per 1,000 messages. When the human time is the big number, the price per token is the wrong thing to optimize first.
A range you can defend
For 100,000 messages a month with Sonnet 5.5, my numbers give this range:
- Model cost: USD 13 to 265.50 per month. The low end needs batch and a warm cache. The high end is what I measured through my test tool.
- Human time for wrong routes: about USD 10,000 to 29,000 per month, based on assumptions, not measurements.
- Accuracy behind it: 160 of 200 messages right in one test run on November 14, 2026.
Say clearly that the second line decides the project, not the first.
Redo it with your own numbers
- Write one call: what goes in, what comes out, what is the same in every call.
- Measure the tokens on 100 to 200 real items. Do not guess them from word counts. My Haiku answers were 33 tokens on average because of thinking, not about 10.
- Put a dated list price on each part, with and without the cache.
- Measure how often an answer fails your check, and count those calls twice.
- Multiply by low and high volumes.
- Measure the error rate on the same items, and put a time and a price on one error. Write down that it is an assumption.
The limits of my numbers: one run per model, 200 messages, one dataset (banking77 from PolyAI, CC BY 4.0), Claude Code 2.1.325, and list prices from November 14, 2026. The message size and the size of my instructions come from comparing token counts of test calls, so they are estimates within a few tokens. The batch price and the cache behaviour come from the documentation. The human time is an assumption.