Pricing data last verified 2026-10-21. How we verify
How it works
These formulas use your example inputs and the selected model's published token prices. A median user means the request count you enter; the tool does not infer a measured usage distribution.
- Cost per request
- Input tokens × uncached share × input price, plus input tokens × cache hit ratio × cached-input price, plus output tokens × output price; divide by one million and multiply by one plus retry overhead. If no cached-input price is listed, use the input price for cache reads.
- Median and heavy users
- Median-user cost is monthly median requests × cost per request. Heavy-user cost is median-user cost × the heavy-user request multiplier.
- Paying-user blend
- Multiply median-user cost by one minus heavy-user share, then add heavy-user cost × heavy-user share.
- Free-user load
- Free users per paying user × their request share × median-user cost. Add that load to the paying-user blend to obtain AI cost per paying user.
- Monthly totals
- Monthly AI cost is AI cost per paying user × paying users. Monthly revenue is monthly plan price × paying users.
- AI gross margin and cost share
- AI gross margin is (plan price − AI cost per paying user) ÷ plan price × 100. AI cost share is AI cost per paying user ÷ plan price. Heavy-user margin replaces the blended cost with heavy-user cost and excludes free-user load. These ratios are undefined when plan price is zero.
- Plan price for your target
- AI cost per paying user ÷ (one minus target margin divided by 100). The chosen target must be below 100 percent.
- Request count at your target
- Plan price × (one minus target margin divided by 100), divided by cost per request × (one minus heavy-user share + heavy-user share × heavy-user multiplier + free users per paying user × free-user request share). Other inputs remain fixed; no positive solution is shown when the allowance or cost factor is zero.
Only modeled AI token costs are subtracted. Hosting, payment fees, support, taxes, cache writes, tool calls and other business costs are excluded. This is AI gross margin, not total business gross margin.
Heavy users change the paying-user blend
In the example, 10% of paying users make 5 times the median request count. Median-user AI cost is $1.4325 and heavy-user cost is $7.1625 monthly. The blend costs $2.0055 per paying user, compared with $1.4325 if everyone uses the median request count. Heavy-user margin is 64.19%; AI gross margin is 89.97%. Raising the request count or multiplier can turn that margin negative; try your own values above.
Inputs you can change
- Plan price and usage caps: compare your proposed price and median request allowance with the tool's target price and request count; retain room for your other costs.
- Model choice: use price comparisons and model pricing pages to examine costs, then assess suitability for your application separately.
- Prompt caching: estimate supported repeated-input savings with the prompt caching calculator and review cache hit rate. Unlisted cache-read pricing receives no discount here.
- Retries: extra paid attempts increase cost; use the retry cost calculator and read about retry and fallback cost. This model repeats the same token mix; it does not price a different fallback model.
Related planning tools and guides
Read the OpenAI API cost scenario for a user base or the guide to forecasting AI API spend before launch. Continue with the AI Budget Planner, the AI API Cost Calculator, or the Claude Code, Codex and Cursor cost comparison.
Frequently asked questions
How do I calculate AI cost per user?
Multiply model cost per request by monthly requests, blend median and heavy paying users, then add the free-user cost attributed to each paying user. The calculator prices input, cached input, output and retry attempts separately.
What is a good AI gross margin?
It depends on the business, its other costs and its pricing choices. This tool shows the plan price needed for the AI gross margin you choose; it does not prescribe a margin target.
How much should I charge for my AI app?
Start with your modeled AI cost per paying user and divide it by one minus your chosen margin as a decimal. The result is the plan price for that AI margin; assess hosting, payment fees, support, taxes and other costs separately.
How do free users affect margin?
Free users generate no plan revenue but add AI cost. Their count per paying user and request share determine the free-user load attributed to each paying user; increasing that load reduces AI gross margin when request cost is positive.
Does this include hosting and other costs?
No. AI gross margin here subtracts only the modeled AI token charges, including the entered retry overhead. Hosting, payment fees, support, taxes, cache writes, tool calls and other costs are excluded. It is not total business gross margin.