Skip to main content
Calkulon

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

Gross Margin = (Subscription Revenue - AI Inference Cost - Other COGS) / Subscription Revenue × 100%
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

  1. 1Enter your subscription pricing tiers and user counts per tier
  2. 2Input average AI API cost per user per month (from your token usage data)
  3. 3Add other costs of goods sold (hosting, support, payments processing)
  4. 4View gross margin per tier, blended margin, and breakeven analysis

Worked Examples

Input
$49/mo plan, 1,000 users, avg $8/user/mo in AI API costs, $3/user/mo other COGS
Result
Revenue: $49,000. AI costs: $8,000. Other COGS: $3,000. Gross profit: $38,000. Gross margin: 77.6%. Healthy AI SaaS margin.
Input
$19/mo plan, 5,000 users, avg $12/user/mo in AI costs (heavy usage), $2/user/mo other
Result
Revenue: $95,000. AI costs: $60,000. Other COGS: $10,000. Gross profit: $25,000. Gross margin: 26.3%. Below sustainable threshold — need to reduce AI costs or raise price.

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 →

Settings

PrivacyTermsAbout© 2026 Calkulon