AI SaaS Margin Calculator

You charge a flat monthly price, but every user costs you Claude API tokens. Enter your plan and a typical user's usage to see your gross margin per user, how much usage breaks even, and the monthly cap that keeps the margin you want. The link updates as you type, so you can share the result.

Your plan

A typical user's usage

Gross margin per user

0%
$0.00 profit per user / month ·
$0.00
Claude API cost / user
$0.00
payment fees / user
$0.0000
API cost per request
0
requests / month to break even

Usage cap for a 70% margin

0
requests / user / month
0
tokens / user / month (input + output)
$0.00
API spend cap / user / month
0×
cap vs. typical user

Users at or under the cap keep your target margin. A cap below 1× means your typical user already costs more than the target allows: raise the price, cut tokens per request, or move routine work to a cheaper model.

Margin by kind of user

UserRequestsAPI costMargin

Same user on each model

ModelAPI costMarginCap (req.)

Prices updated from the official pricing page.

How the numbers are worked out

API cost per user = requests × (uncached input tokens × input price + cached input tokens × cache-read price + output tokens × output price), with the official per-million-token prices for the model you pick. Haiku 5.5 requests with a prompt over 100,000 tokens use its long-prompt rates.

Gross margin = (price − payment fees − other cost per user − API cost) ÷ price. Payment fees default to 5% + $0.50, which is the standard Lemon Squeezy rate; Stripe alone is usually lower, but you then handle sales tax yourself. Change both fields to match your provider.

Usage cap is the API spend that leaves exactly your target margin: price × (1 − target) − fees − other costs. Dividing it by the cost of one request gives the request cap, and multiplying that by tokens per request gives a token cap you can enforce in code.

Why a flat price needs a cap

Usage in AI products is lopsided. Most users make a few requests; a small share makes ten or twenty times more. With a flat price and no cap, those heavy users can cost more than they pay, and they are also the users most likely to stay. The table above shows what happens at 3× and 10× a typical user's usage.

A monthly cap per plan, checked before each request, keeps every user profitable. When a user reaches it, offer an upgrade or paid overage instead of a hard stop. Our post How to meter Claude API costs per user in a Next.js SaaS shows how to record each call and enforce the cap, and Model prices change. Snapshot them on every usage row explains how to keep those numbers stable when prices change.

What this calculator leaves out

  • Cache-write surcharges (paid once per cache window), extended thinking tokens (add them to output) and tool-result tokens (add them to input).
  • Free-plan users, who cost tokens but pay nothing. Spread their cost over paying users if your free tier is large.
  • Refunds, chargebacks and taxes. With a merchant of record such as Lemon Squeezy, sales tax is handled for you; otherwise budget for it.

For the raw cost of a workload without a plan price, use the Claude API Cost Calculator.

Agentwright Starter is a Next.js codebase for Claude-powered SaaS with per-user metering, plan caps, rate limits and Lemon Squeezy billing already wired, plus a streaming agent loop, MCP tools, evals and auth. Launching December 2026 at $99. FAQ

Join the launch list