How to Calculate AI SaaS Margin
What is AI SaaS Margin?
The AI SaaS Margin Calculator helps AI-powered software companies calculate their gross margin by comparing subscription revenue against variable AI inference costs. It reveals the critical relationship between pricing tiers, per-user API consumption, and profitability at scale.
Formula
- R
- Subscription Revenue ($/month) — Monthly recurring revenue from subscriptions
- C_ai
- AI Inference Cost ($/user/month) — Average LLM API cost per active user
- COGS
- Other COGS ($/user/month) — Non-AI cost of goods sold (hosting, support, payments)
- GM
- Gross Margin (%) — Gross margin percentage after all variable costs
Step-by-Step Guide
- 1Enter your subscription pricing tiers and user counts per tier
- 2Input average AI API cost per user per month (from your token usage data)
- 3Add other costs of goods sold (hosting, support, payments processing)
- 4View gross margin per tier, blended margin, and breakeven analysis
Worked Examples
Common Mistakes to Avoid
- ✕Not segmenting AI costs by user tier — power users may consume 10-20x more tokens than average, destroying margin on unlimited plans
- ✕Setting prices based on average usage without accounting for the variance and heavy-tail distribution of AI consumption
- ✕Forgetting that AI inference costs scale with users while traditional SaaS COGS are largely fixed
Frequently Asked Questions
What is a good gross margin for an AI SaaS company?
Traditional SaaS targets 70-80%+ gross margins. AI SaaS companies often start at 40-60% due to inference costs, which is concerning for investors. To be competitive for venture funding, aim for 65%+ through model optimization, caching, and usage-based pricing. Companies like GitHub Copilot reportedly operated at negative margins initially.
How do I prevent power users from destroying my margins?
Implement usage-based pricing with tiered token/query limits, use smaller models for routine tasks (saving frontier models for complex queries), cache common responses, set per-user rate limits, and offer premium tiers for heavy users. Monitor the distribution of per-user AI costs weekly.
Ready to calculate? Try the free AI SaaS Margin Calculator
Try it yourself →