How to calculate an AI feature's monthly cost
Estimate an AI feature's monthly cost from model calls, retries, hosting, and human review, then compare that spend with completed work and revenue.

On this page
To forecast an AI feature's monthly cost, start with what customers will complete and how often they will use it. A model's token price is one input. It does not tell you how many calls, retries, tool requests, or human corrections a completed task will need.
We would cost a representative set of tasks end to end, separate fixed charges from usage, and compare the result with revenue. That produces a budget you can update as traffic changes.
TL;DR Count every call, retry, tool charge, and review step. Separate fixed costs from usage, then divide the total by completed tasks to see what useful work costs.
Choose the unit before doing the arithmetic
A chat message, a drafted reply, and a resolved support ticket are different units. Pick one that reflects the feature's value and define what qualifies as completion.
Track both cost per attempted task and cost per completed task. The first helps diagnose the system. The second tells you what useful output costs, including the attempts that failed.
For the same reporting period:
Cost per completed task =
total attributed workflow cost / successfully completed tasksIf no tasks completed, report that outcome directly. Do not turn the missing denominator into an attractive cost figure.
Build the monthly cost from billed units
For each model, multiply each billed token category by its applicable price. Rates are often quoted per million tokens, so divide token counts by one million before multiplying. Keep each charge in one category: do not count a cached token again as ordinary input, or add reasoning tokens twice when they are already included in billed output.
Monthly model cost =
sum of (billed units in each category x price per unit)
Monthly operating cost =
model cost + tools + infrastructure + review + supportUse your provider's usage fields and the rate sheet for the exact model. OpenAI's prompt-caching documentation shows why a single caching discount is insufficient: behavior and billing differ across model generations and caching modes.

Keep implementation costs separate from ongoing operations. Include them in the investment decision, but do not confuse a one-time build cost with the recurring bill.
Measure variation between tasks and customers
An average is useful when paired with the distribution behind it. A short lookup and a long research session can have very different costs. Group usage by workflow, customer plan, and task complexity before deciding what to optimize.
Report total spend, cost per active user, the most expensive task types, and the customers responsible for the largest charges. A few expensive tasks do not by themselves mean your pricing is broken. A product can deliberately subsidize occasional expensive use while remaining profitable overall.
Forecast growth using observed usage patterns and explicitly stated assumptions about new users. Include bursts, concurrent requests, longer histories, and provider limits. Multiplying an average by a larger user count will miss costs that change when infrastructure or contract tiers change.
Change the largest measured cost first
| What the traces show | Change worth testing | What must still hold |
|---|---|---|
| Repeated eligible input | Prompt caching | Correct context and measured cache hits |
| Simple requests on an expensive model | A cheaper route | Quality on the routed request types |
| Repeated failures | Fix the failing step | Fewer retries and successful completion |
| Unnecessary generation | Shorter output or structured fields | Enough information for the user |
| Large irrelevant context | Better selection of source material | Evidence needed for a correct answer |
Reasoning settings are another experiment, not a universal surcharge with a fixed multiplier. Compare the supported settings on your tasks and include their billed usage. A slower, more expensive call can still reduce total cost if it avoids repeated failed attempts.
For routing, include the cheap call and the fallback call on requests that escalate. Jev and other classifiers should earn their place through that complete comparison.
Set pricing and limits together
Flat subscriptions, included allowances, credits, and usage pricing can all work. The choice depends on customer expectations, the spread of usage, and the margin you need.
Define customer-visible limits before launch. Limit task duration, tool calls, output size, and retries where appropriate. Budget alerts help operators, but an alert alone does not stop runaway spending.
Review whether the feature creates enough value before optimizing a small invoice. Reducing model cost will not rescue a workflow customers do not use or trust.
Build a cost sheet from one recorded task: every billed call, the final result, any review time, and the revenue assumption. Scale that evidence into a monthly forecast, then reconcile it with the invoice after launch.

Sources
- OpenAI: API pricing
- OpenAI: Prompt caching
- OpenAI: Evaluation best practices
Common questions
What should an AI cost forecast include?
What should an AI cost forecast include?
Model calls, tools, retrieval, storage, observability, retries, human review, and allocated operating costs. Separate variable usage from fixed monthly charges.
Does prompt caching always reduce the bill?
Does prompt caching always reduce the bill?
Only input that meets the provider's caching rules receives its caching rate. Check the rules for your model and confirm how much input was actually cached in the usage records.
Can an AI feature use flat subscription pricing?
Can an AI feature use flat subscription pricing?
Yes, if the price, expected usage mix, and limits support the intended margin. Model heavy usage and abuse separately before deciding whether allowances or overages are needed.
What is cost per completed task?
What is cost per completed task?
It is the total cost attributed to a workflow divided by the number of tasks that met its completion criteria in the same period. Include the cost of failures and retries in the numerator.


