AI Unit Economics

LLM API Cost & AI SaaS Margin Calculator

Compare OpenAI, Claude, Gemini & DeepSeek token bills with Prompt Caching, Batch API discounts, and live gross margin impact.

Quick presets:

Workload & Revenue Inputs

Monthly Volume

60,000 reqs

108M in · 36M out

Lowest Monthly Cost

$21.23

DeepSeek V4-Flash (99.8% margin)

Projected MRR

$10,000

Spread: up to $1,129/mo saved via routing

Provider & Model Cost Matrix (Sorted Lowest to Highest)

ModelMonthly CostCost / UserGross MarginRelative Cost
DeepSeek V4-Flashbudget

DeepSeek · $0.14/$0.28 per 1M · 128K ctx

$21.23saved $3.97$0.04299.8%
Gemini Flash-Litebudget

Google · $0.1/$0.4 per 1M · 1M ctx

$22.37saved $2.84$0.04599.8%
GPT-5.6 Minibudget

OpenAI · $0.25/$1.5 per 1M · 200K ctx

$73.91saved $7.09$0.14899.3%
Gemini 3.5 Flashbalanced

Google · $0.75/$3.75 per 1M · 1M ctx

$194.74saved $21.26$0.38998.1%
Claude Haiku 4.5budget

Anthropic · $1/$5 per 1M · 200K ctx

$253.98saved $34.02$0.50897.5%
Claude Sonnet 5balanced

Anthropic · $2/$10 per 1M · 200K ctx

$507.96saved $68.04$1.0294.9%
Gemini 3.1 Proflagship

Google · $2/$12 per 1M · 2M ctx

$591.30saved $56.70$1.1894.1%
GPT-5.4 Balancedbalanced

OpenAI · $2/$12 per 1M · 200K ctx

$591.30saved $56.70$1.1894.1%
Claude Opus 5flagship

Anthropic · $4.5/$22.5 per 1M · 200K ctx

$1,142.91saved $153.09$2.2988.6%
GPT-5.6 Flagshipflagship

OpenAI · $4.5/$22 per 1M · 400K ctx

$1,150.43saved $127.57$2.3088.5%

Vetted tools founders use to lower costs and automate compliance. Some links may be partner links at zero extra cost to you.

Optional Pro Templates · $19 one-time

Founder Unit Economics Pack (Notion + Excel + Sheets)

Download the investor-ready 3-year AI SaaS financial model, cohort churn tracker, and agency pricing templates.

Get the Pro Pack

How This Calculator Works & Key Benchmarks

Data refreshed: November 2026

Estimating real-world AI API costs requires looking beyond headline per-million-token pricing. Output tokens typically cost 4x to 6x more than input tokens, while prompt caching and asynchronous Batch APIs can cut monthly token spend by 50% to 85%. Use this interactive matrix to model your exact Monthly Active Users (MAU), request volume, and subscription gross margin before shipping AI features.

Token Billing Formula

Monthly Cost = [(Input Tokens / 1M) × Input Rate × (1 - Cache Hit % × Cache Discount) + (Output Tokens / 1M) × Output Rate] × Batch Multiplier

Actionable Founder Takeaways

  • Output tokens dominate AI COGS: cutting verbose completions by 30% often saves more than switching providers.
  • Prompt caching works best when you reuse long system instructions, tool schemas, or RAG context blocks across turns.
  • Target at least 75%–80% gross margin after LLM costs so you still have room for payment fees, infra, and customer acquisition.
  • Use model routing: send 80% of lightweight extraction/classification tasks to budget models and reserve flagship models for complex reasoning.

Frequently Asked Questions

How many tokens is 1,000 English words?
As a standard rule of thumb, 1,000 English words equals roughly 1,300 to 1,400 tokens (about 4 characters or 0.75 words per token). Code, JSON, and non-English languages generally consume more tokens per word.
Why are LLM output tokens much more expensive than input tokens?
Generating output tokens is memory-bandwidth bound and sequential (one token at a time per user), whereas input prompt tokens are processed in parallel during prefill. That is why output rates are usually 4x to 6x higher.
When should I use Batch API pricing?
Batch APIs offer a 50% discount in exchange for asynchronous completion (typically within 24 hours). They are ideal for nightly summarization, bulk dataset classification, SEO content generation, and offline evaluations.
What is a healthy gross margin for an AI SaaS startup?
Traditional B2B SaaS achieves 80%–85% gross margins. For AI-native SaaS, investors generally look for 65%–75%+ gross margins at scale after accounting for LLM inference, embeddings, and payment processing fees.