AgentMarginBlog

LLM cost per user: why your average is lying to you

A healthy average AI cost per user can hide dozens of customers who cost more than they pay. Here's how to measure cost per user properly, and what to do about the long tail.

Concepts3 min read

Ramp's October AI Index found that 80% of business spend on OpenAI and Anthropic comes from 1% of firms. Usage inside a single AI product is often just as concentrated: a small group of customers drives most of the bill. That's why AI cost per user is the most misleading average in your dashboard.

Pricing is moving the same way. GitHub moved every Copilot plan to usage-based billing on June 1, 2026, counting input, output and cached tokens at each model's API rate, because "agentic usage is becoming the default, and it brings significantly higher compute and inference demands."

A fictional product, a healthy average

Here's a simulated product: 1,000 customers on a $29/month plan, with monthly AI cost drawn from a long-tailed distribution. Every number is fictional.

Metric (fictional)Value
Average AI cost per user$5.01
Median (p50)$1.90
p90$10.86
p99$57.58
Most expensive customer$103.54
Share of AI cost from the top 10% of users55%
Customers who cost more than $2926

Averaged across everyone, AI cost is about 17% of revenue, which looks fine. But 26 customers each cost more than they pay, together about $740 a month in losses, and the mean is 2.6× the median. The average describes nobody.

How to measure it properly

  1. Attribute every call to a customer on your server, from the authenticated session. See how to track OpenAI usage per user.
  2. Price each call at the rate in effect when it ran, including cached input. Prices change, as December 1 shows.
  3. Put revenue on the same customer ID, so you can subtract one from the other.
  4. Look at the distribution, not the mean: median, p90, p99, and the list of customers below zero.
  5. Keep unknown separate. A customer with unpriced events doesn't have a margin yet. Leaving them out is better than guessing.

Contribution, not just cost

Cost per user tells you who's expensive. AI contribution, revenue minus tracked AI inference cost, tells you who's unprofitable. A $40/month customer on your $99 plan is fine. The same $40 on your $29 plan isn't. Measure both, per customer.

AI contribution isn't gross margin: hosting, payment fees and support aren't in it. It's the part of the margin your model choice controls, and the part that changes fastest.

What to do about the tail

  • Cache aggressively. Long-context power users benefit most. Stable prefixes are billed at a fraction of the input rate; see cached input tokens, explained.
  • Route by task. Send routine turns to a smaller model, and keep the big one for the turns that need it.
  • Cap or meter the top of the plan. A fair-use limit, credits or an overage tier, priced from your p95, not your mean.
  • Add a tier above it. If the customers above $29 are getting real value, some of them will pay for a plan that covers it.
  • Watch the trend, not just the month. A customer's cost usually climbs as they adopt agentic features.

See it with fictional customers

AgentMargin's one-command demo seeds three fictional customers (profitable, loss-making and unknown cost) and shows revenue against known AI cost for each, with loss-making customers flagged. It needs Node.js 22.18+ and Docker or OrbStack, and no OpenAI account.

bash
git clone https://github.com/rzkarsyad/agentmargin.git
cd agentmargin
npm ci
npm run demo
All posts