Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Measure an AI feature by connecting application-level usage events to provider or infrastructure bills, then calculating both direct inference spend and the cost of keeping the feature available. To report gross margin, you also need a defensible revenue figure attributable to the feature. For AI bundled into a subscription, disclose any revenue allocation; without one, report feature costs and customer economics rather than implying that the feature has independently measured gross margin.
Decide what you are measuring
Choose a unit that reflects how customers experience the feature: an inference request, a workflow, a completed task, a generated asset, or another customer-visible result. Define what counts as a successful or usable outcome before calculating its cost. A request that consumes tokens but yields a rejected answer, triggers a retry, or is abandoned is not equivalent to a useful result.
Track several ratios rather than relying on one blended average: cost per request, cost per workflow, cost per successful outcome, and cost per active customer or seat. The last two customer-level measures help reveal who bears the cost, but they are not gross margin.
Instrument the feature and join it to billing
At the feature call site, record stable metadata that lets you connect a user-visible action to its cost. Provider invoices may show consumption only at account, key, or project level, so application instrumentation is often necessary to attribute spend to an individual feature.
#1 Best Overall
- Feature name and, where permitted, tenant or account.
- Request ID, timestamp, environment, model, and model version.
- Input, output, cached, or other token counts available from the provider or serving layer.
- Retries, cache hits, tool calls, latency, and whether the result met the acceptance rule.
Join these events to provider usage exports, cloud billing records, or self-hosted infrastructure allocation data. Normalize model names, usage units, currencies, and reporting periods, while retaining the actual rates and discount assumptions used. Reconcile modeled totals to invoices or allocated cloud costs and flag spend that cannot be attributed.
Separate direct inference spend from delivery cost
Direct inference cost
For the period and feature, sum the actual billable requests using the applicable rate for each model and request category. Where pricing distinguishes input, output, cached, or other usage, apply the correct rate to each category. This is the cost of active inference work, not necessarily the full cost of delivering the feature.
Rank #2
Allocated delivery cost
Add the costs of making the feature available: serving capacity, reserved or warm GPU capacity, and relevant retrieval, gateway, cache, storage, networking, monitoring, and other delivery infrastructure. Include labor or support only if company policy treats it as cost of revenue, and document that policy and its allocation basis.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →For shared infrastructure, choose and document a workload-appropriate allocation driver—for example, measured GPU time, reserved capacity, request volume, or tokens. Avoid counting the same provider or gateway spend twice. Low-traffic self-hosted models can have high allocated cost per token because fixed hosting costs are spread over fewer tokens. The CNCF-published OpenCost 1.121.0 article distinguishes usage-based cost from allocation-based cost, describing the latter as “the cost of having the model available” (CNCF, August 5, 2026).
Rank #3
Calculate unit costs and gross margin
Use one cost basis consistently within each reported measure, and label whether it is direct usage or allocated delivery cost.
- Cost per request = total cost on the selected basis ÷ number of feature requests.
- Cost per successful outcome = total cost on the selected basis ÷ outcomes meeting the defined acceptance or quality rule.
- Gross margin = (feature-attributed revenue − cost of revenue attributed to delivering the feature) ÷ feature-attributed revenue.
The FinOps Foundation gives the corresponding inference-level formula as total inference costs divided by the number of inference requests (FinOps Foundation: AI costs). Its token-economics guidance recommends tracing cost per outcome through cost per inference to cost per token at the relevant goodput level, accounting for retries, abandoned conversations, and low-quality completions (FinOps Foundation: AI token economics). A lower token cost does not necessarily mean a lower cost per useful result.
Rank #4
Choose a revenue basis that matches the product
Separately metered AI usage
When usage is separately sold or metered, use revenue that can be attributed to that usage, then compare it with the cost of revenue associated with delivering it.
AI included in a subscription
A bundled subscription does not automatically provide a directly observable AI-feature revenue figure. You can allocate part of subscription revenue to the feature only if you have a defensible method; label the resulting margin as an allocation-based estimate and disclose the assumption. If you cannot support an allocation, report direct and allocated costs, cost per customer or seat, and usage distribution without claiming standalone feature gross margin. There is no universal allocation policy established for this calculation: the appropriate treatment depends on company accounting policy and its cost-of-revenue boundaries.
Best Value
Compare API and self-hosted options on equivalent terms
A build-versus-buy comparison is useful only when the alternatives deliver comparable workload and service levels. Compare the same model and workload mix, required quality and latency, and useful throughput (goodput). Set the allocation-based cost of self-hosting—including idle or warm capacity and shared infrastructure—against API pricing, rather than comparing an API bill with active GPU compute alone.
| Comparison area | What to include |
|---|---|
| Cost unit | Token or request charges, GPU hours and allocated capacity, per-seat charges, or platform fees. |
| Workload and goodput | Model and version, input/output mix, cache hits, retries, tool calls, successful outputs, and throughput at the required latency and quality. |
| Utilization and demand | Traffic level, peaks and idle periods, capacity reservations, warm capacity, and expected growth. |
| Shared costs | Gateway, cache, retrieval, storage, networking, monitoring, and other delivery components included in the chosen cost basis. |
| Billing visibility | Whether spend can be tagged to a feature, team, or customer and reconciled to usage. |
| Operating constraints | Infrastructure and platform operations, data residency, and vendor or model availability. |
Available options include direct model-provider APIs, cloud marketplace access, self-hosted or open-weight models, AI embedded in SaaS, and AI developer tools. Their billing units, usage visibility, and allocation difficulty differ; self-hosting also brings GPU instance, storage, networking, utilization, and operational costs (FinOps Foundation: SaaS token economics). Use your own workload and contract data rather than a generic token-price or utilization threshold. For example, OpenCost’s $1 usage cost, $4 allocation cost, and $2 external API price per million tokens at 25% utilization describe an illustrative scenario, not an industry benchmark.
Report distributions and keep the model current
Publish the reporting period, cost basis, successful-outcome rule, and any revenue or shared-cost allocation alongside the results. Show distributions as well as averages: heavy-user share, per-customer spread, retries, cache effects, and low-volume fixed-cost effects can disappear in a blended mean. Reconcile calculated costs with provider bills or allocated cloud spend, disclose unattributed amounts, and refresh rates and allocation rules when models, contracts, traffic, or infrastructure change.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

