How to Calculate Unit Economics for an AI Product
If you want to know how to calculate unit economics for an AI product, start with one question: when one unit of your product is used, how much do you earn and how much do you spend? Everything else is arithmetic built on that answer. This guide gives you the steps, the formulas and a worked example you can copy into a spreadsheet.
How to calculate unit economics for an AI product: what it means
Unit economics is the revenue and cost of one unit of your business, measured on its own. The unit might be a customer, a seat, a finished task or a thousand tokens. If each unit makes more than it costs, growth helps you. If each unit loses money, growth makes the loss bigger.
You need three numbers to start:
- Revenue per unit: what a customer pays for that unit.
- Variable cost per unit: what you spend each time that unit is used.
- Cost to acquire the customer: what you spent to win them.
The lesson Revenue, Costs and Unit Economics, in the course Business Basics for Builders on Age of AI Entrepreneur, covers this same ground in a short hands-on format. This post goes deeper on the AI-specific parts.
In classic software, serving one more user costs almost nothing. You write the code once and the margin per user stays high. AI products break that pattern, because every request can trigger a paid call to a model.
That means your cost scales with usage, not with sign-ups. Two customers on the same plan can have very different costs. One sends ten requests a month. The other sends ten thousand. If you charge both the same flat price, the heavy user may cost you more than they pay.
If you build on a model you do not own, a supplier also sets your biggest cost. The lesson Building on Someone Else's Model in the course Distribution and Moats looks at what that dependence means for a business. Keep it in mind as you read the cost section below.
Choose your unit: user, seat, task or token
Pick the unit that matches how you charge and how you spend. A mismatch is where most errors start.
- User or seat: good when you charge a flat monthly fee. Watch for heavy users.
- Task: good when the customer cares about an outcome, such as one document summarized or one support ticket resolved.
- Token: good for your own cost tracking, since model providers usually price by input and output tokens. It is rarely what the customer sees.
A practical approach is to track cost per task internally, then roll it up to cost per user per month. Tasks tell you what is efficient. Users tell you whether the plan makes money.
Calculate your variable costs per unit (inference, retrieval, support)
Add up every cost that rises when usage rises. For most AI products that is three buckets.
Inference
This is the model call itself. Take the tokens in, the tokens out and the price per token from your provider's current price page. Do not guess. Then use:
inference cost per task = (input tokens x input price) + (output tokens x output price)
Count the whole chain. If one task makes three model calls (plan, draft, check), add all three. Retries and failed calls cost money too, so include a share for them.
Retrieval and other infrastructure
If your product searches documents, you may pay for embeddings, a vector database, storage and hosting. Divide the monthly bill by the number of tasks to get a per-task figure. Pull the real figures from your invoices.
Support and payment fees
Payment processors take a cut of each charge. Support takes human time. Estimate minutes of support per customer per month, multiply by the hourly cost, and add it in. Early on this number is rough, and that is fine. Write down your assumption so you can correct it later.
Work out revenue per unit and gross margin
Revenue per unit is what you collect for the same unit you costed. If you charge $X a month and a user runs N tasks, revenue per task is X divided by N.
Then calculate gross margin:
gross margin = (revenue per unit - variable cost per unit) / revenue per unit
Run this for an average user, and then for your heaviest ten percent of users. The gap between the two shows whether a flat price is safe. If the heavy group has a negative margin, you need usage limits, tiers or pay-per-use pricing.
Add CAC, LTV and payback period
Gross margin says whether a sale is worth making. These three numbers say whether the business is worth running.
- CAC (customer acquisition cost): total sales and marketing spend in a period divided by new customers won in that period.
- LTV (lifetime value): monthly gross profit per customer multiplied by the number of months they stay. Use gross profit, not revenue, or you will overstate it.
- Payback period: CAC divided by monthly gross profit per customer. It tells you how many months until a customer has repaid what it cost to win them.
A short payback period lets you reinvest sooner. A long one means you need cash to carry the gap. How you find customers matters here, which is why distribution is worth studying alongside cost. The blog on this site has a longer read on distribution channels at aientrepreneur.vlvd.net/blog.
Worked example: an AI writing assistant
These numbers are invented for illustration. They are not benchmarks, so replace them with your own.
Say you sell an AI writing assistant at $20 a month. Assume the average user runs 100 tasks a month.
- Inference per task: 1,500 input tokens and 700 output tokens. Suppose your provider charges $2 per million input tokens and $8 per million output tokens. Input costs $0.003 and output costs $0.0056, so about $0.0086 per task. Add 15 percent for retries and extra calls, giving about $0.0099, or roughly $0.01.
- Monthly inference per user: 100 tasks x $0.01 = $1.00.
- Retrieval and hosting: $300 a month shared across 1,000 users is $0.30 per user.
- Payment fees: assume 3 percent of $20, which is $0.60.
- Support: assume 3 minutes per user per month at $30 an hour, which is $1.50.

The worked example on one page. The numbers are invented.
Total variable cost per user: $1.00 + $0.30 + $0.60 + $1.50 = $3.40.
Gross profit per user: $20 - $3.40 = $16.60. Gross margin: 16.60 / 20 = 83 percent.
Now test the heavy user. Suppose they run 2,000 tasks a month. Inference is $20, so total variable cost is about $22.40 against $20 of revenue. That user loses you money. The average looks healthy while the tail does not.
Now add acquisition. If you spend $1,000 on marketing and win 25 customers, CAC is $40. Payback is $40 / $16.60, about 2.4 months. If the average customer stays 10 months, LTV is $166, and LTV divided by CAC is about 4.
Check the churn assumption hardest. If customers leave after 3 months, LTV falls to about $50 and the picture changes quickly.
How to improve AI margins and link them to product-market fit
You have a few levers, and each one maps to a line in your calculation:
- Cap or tier usage so heavy users pay in proportion to what they cost.
- Shorten prompts and outputs to cut tokens per task.
- Cache repeated work so you do not pay twice for the same answer.
- Route simple tasks to cheaper models and keep expensive ones for hard tasks.
- Price on value, not only on cost. The blog covers pricing an AI product in a separate post at aientrepreneur.vlvd.net/blog.
Cutting cost only helps if customers stay. Healthy margins on a product nobody keeps are not a business. Retention and repeat use are signals of product-market fit, so track them alongside your unit numbers. And if you are leaning on a thin layer over a general model, the blog post on thin wrappers around ChatGPT is worth reading before you set your price.
For the demand side, read What Is Product-Market Fit and How Do You Measure It?, which shows how to tell whether customers really keep using what you built.
Frequently asked questions
What is a good gross margin for an AI product?
There is no single number that fits every product. Compare your margin to your own payback period and retention: the margin is good enough if you recover CAC quickly and customers stay.
Should I use cost per token or cost per task?
Use tokens to calculate cost, then convert to cost per task, because tasks are what your customer understands and what you can price. Cost per task also captures retries and multi-step calls.
Why use gross profit instead of revenue in LTV?
Revenue ignores what it costs to serve the customer. With AI products that cost can be large and vary by user, so revenue alone overstates the value.
How often should I recalculate?
Recalculate whenever your model provider changes prices, you change models or prompts, or you change your plans. Checking monthly is a sensible habit, and your own invoices are the source of truth.
Get started
Unit economics is a skill you build by working through examples. Age of AI Entrepreneur teaches it in short lessons of about nine minutes, with questions and hands-on activities, and each lesson lists its sources. Every lesson is free to anyone with an account, as set out on the terms page. You sign in with your email and an emailed code.
Start Age of AI Entrepreneur: short hands-on lessons on how to build a business in the age of AI, with every side of the debate and the sources to read next.
Comments
No comments yet.
Sign in or make an account to comment.