# AI COGS, and what actually belongs in it > An AI COGS calculator totals model spend, retries and cache behaviour per customer. What belongs in cost of goods sold, and what doesn't. URL: https://getculpa.com/ai-cogs-calculator Last reviewed: 2026-08-01 ## Answer AI cost of goods sold is the model spend required to serve a paying customer, including retries and discarded output, excluding research and evaluation runs. Most teams under-count it by leaving waste out. Culpa, a local-first LLM cost, margin, and forecast ledger, meters every call including failures, so your COGS reflects spend rather than intent. ## Why this happens COGS goes wrong in two directions at once. Teams exclude retries and discarded responses, which understates the real cost of serving, and they include evaluation and development traffic, which overstates it by charging research to the customer line. The result is a number that's wrong in both directions and reconciles with nothing. Getting it right needs per-call attribution that separates customer-serving traffic from everything else. ## What this usually looks like - Your COGS figure doesn't reconcile with your provider invoice in either direction. - Evaluation runs and background jobs are folded into the same bucket as customer traffic. - Retries are excluded because they felt like errors rather than costs. - Nobody can state COGS for a single named customer without a manual exercise. ## Common mistakes - Excluding retries and discarded responses from COGS. Why it hurts: Both bill in full, so COGS reads low by exactly your waste ratio and worst during incidents. Do instead: Count every billed token, then track separately how many you actually used. The ratio is the metric. - Including evaluation and development traffic in COGS. Why it hurts: That's research spend, not cost of serving, and it makes your unit economics look worse than reality. Do instead: Tag eval and background runs as their own features so they sit outside the customer-serving line. - Computing COGS once and reusing the figure. Why it hurts: Model mix, prompt length and provider rates all drift, so a stale COGS misprices every decision built on it. Do instead: Recompute monthly from the ledger at the rates in effect for that month. ## Self-check - Sum every billed token attributable to customer-serving traffic last month, retries included. - Subtract anything tagged as evaluation, development or background work. - Divide by paying customers. That's your COGS per customer, and it will exceed your estimate. - Express COGS as a percentage of revenue. That single number is your gross margin. - Check what share of spend has no attribution at all. That gap is the honesty of the whole figure. ## The same month, COGS counted two ways (illustrative) A month with $1,000 of total provider spend on GPT-5.4 at $2.50 and $15.00 per million. The split below is modelled but the rates are real. Naive COGS, successful customer calls only = $700 Add retries and discarded responses on customer traffic, +$180 = $880 Subtract eval and background runs wrongly included, -$140 = $740 of true customer COGS The two errors partly cancelled, hiding a $320 gross misattribution At $4,000 revenue: naive margin 82.5%, true margin 81.5%, but the composition is completely different The headline margin barely moved while $320 was misattributed in both directions. The number looked stable precisely because two errors offset, which is the worst way to be right. ## Cost figures Every figure carries its confidence and its source. No figure on this site is provider-reported. - $700 to $880 — modelled customer COGS range, naive count versus corrected, against a $1,000 month [estimated] Source: Modelled split of a $1,000 month priced at real GPT-5.4 rates from the price book, effective 2026-07-02. Published as a scenario because no customer data backs it. - $140 to $320 — modelled misattribution range hidden by two offsetting errors, one leg alone versus both [estimated] Source: The $180 excluded retries plus the $140 wrongly included eval spend, from the teardown arithmetic. ## FAQ Q: Do retries belong in AI COGS? A: Yes. A retried call bills in full and it happened in the course of serving a customer. Excluding it makes COGS read low by exactly your waste ratio, and the understatement is worst during the incidents you most want to understand. Q: Should evaluation runs count as COGS? A: No. Eval and development traffic is research spend, not cost of serving. It belongs in its own line, tagged at capture, or it inflates your unit economics and hides how much you spend on testing. Q: How do I get COGS for one named customer? A: Attach a customer identifier to every outbound call at request time. Without it the calls are anonymous afterwards and no analysis recovers the mapping, so per-customer COGS becomes impossible rather than merely difficult. ## Sources - OpenAI API pricing: https://developers.openai.com/api/docs/pricing Run the free Cost Leak Scan: https://app.getculpa.com/scan?source=pseo&slug=ai-cogs-calculator&cluster=margin Machine-readable index of every guide: https://getculpa.com/api/pages Human-readable index of every guide: https://getculpa.com/guides Site overview: https://app.getculpa.com/llms.txt Privacy: Culpa runs on your infrastructure. Your prompts and responses never leave it. Culpa counts calls to run your plan, and it fails open, so if it ever breaks your app keeps running.