AI contribution margin is the percentage of observed revenue left after refunds, payment processing fees, and attributable AI model cost. First choose and label the revenue basis, then use costs from the same period and population. Divide contribution profit by that revenue basis, and keep unpriced usage or unlinked customers outside the result instead of treating missing data as zero.
The AI contribution margin formula
Net observed revenue = gross payments − refunds − processor fees
AI contribution profit = net observed revenue − attributable AI cost
AI contribution margin = AI contribution profit ÷ net observed revenue × 100
This article uses processor-net revenue as the denominator.
Stripe’s official balance transaction object provides
amount, fee, and net.
Lemon Squeezy’s official order object exposes order totals,
discounts, tax, status, and refunded fields. Whatever provider you
use, record the basis in the metric name so readers know whether
fees and taxes are included.
Choose one revenue basis before calculating
| Revenue basis | Formula | Use it when | Do not call it |
|---|---|---|---|
| Gross observed revenue | Successful payments | You need a top-line payment view. | Cash kept after refunds or fees |
| Revenue after refunds | Payments − successful refunds | Refund behavior materially changes revenue. | Processor-net revenue |
| Processor-net revenue | Payments − refunds − fees | The payment source exposes observed fees. | Company net revenue or profit |
Taxes require an explicit policy. If a payment total includes tax
that the business collects for a tax authority, subtract it before
treating the remainder as product revenue. Do not assume every
payment provider’s total field has the same tax
treatment; follow that provider’s object definition.
Worked example: calculate one month of AI contribution margin
This hypothetical example demonstrates the arithmetic. It is not a benchmark and does not represent a Grow or Die customer.
| Line item | Observed amount | Evidence |
|---|---|---|
| Gross successful payments | $12,000 | Payment orders |
| Successful refunds | −$500 | Refund objects |
| Processor fees | −$350 | Balance transactions |
| Net observed revenue | $11,150 | Payments − refunds − fees |
| Attributable AI cost | −$1,650 | Priced provider usage events |
| AI contribution profit | $9,500 | Net observed revenue − AI cost |
$9,500 ÷ $11,150 × 100 = 85.2% AI contribution margin
The result means 85.2% of this defined revenue basis remains after the included payment and AI costs. It does not mean the company has an 85.2% net profit margin.
Apply coverage rules before trusting the percentage
- Match the period. Do not subtract model calls from July from payments collected in June unless that is an intentional accrual policy.
- Match the currency. Convert each item using a documented exchange-rate policy before adding amounts.
- Keep missing prices out. If the model or tool price is unknown, label the cost as unpriced and the margin as incomplete.
- Count retries and failures. A retried request may incur usage more than once. Record provider-reported usage for every observed application attempt.
- Reconcile the bill. Compare SDK-priced usage with provider organization cost reports before calling the cost complete.
Provider response objects expose usage counts, while prices may change by model, cache state, service tier, region, or effective date. Store the price version used for each event instead of inserting a current price into an old period.
What AI contribution margin cannot prove
- It does not include payroll, general cloud infrastructure, support, sales, or other costs unless you explicitly add them.
- It does not prove that model usage caused revenue. It measures amounts observed in the same defined scope.
- A site-wide margin does not reveal which customers are profitable. That requires a reliable customer identity link.
- A high margin does not prove product-market fit, retention, or future lifetime value.
- A complete-looking percentage can still be wrong if refunds, fees, unpriced calls, or missing event coverage are hidden.
If you need the denominator at the user level, continue with AI cost per user. For the broader revenue-cost framework, read what AI unit economics means .