BlogAI Economics
AI Economics10 min read

How to Calculate Your AI Unit Economics in 30 Minutes

Most AI features are margin-negative. Here's the exact framework to calculate whether your AI feature makes money.

By Richard Ewing·
Share:

The Uncomfortable Truth

73% of AI features are margin-negative at the unit level. Every AI interaction has a marginal cost that scales linearly with usage.

The AI Unit Economics Equation

AI Feature Margin = Revenue per Interaction - Cost per Interaction

Cost = Input Tokens × Price + Output Tokens × Price + Embedding + Vector Storage + Orchestration

Step-by-Step (30 min)

Step 1 (10 min): Pull API logs. Average input: 2,000 tokens × $2.50/1M = $0.005. Average output: 800 tokens × $10/1M = $0.008. Total: ~$0.013 per interaction.

Step 2 (10 min): Calculate revenue per interaction. $50/month ÷ 200 requests = $0.25.

Step 3 (5 min): Margin = $0.25 - $0.013 = $0.237 (94.7%). But add fully-loaded costs (salary, fine-tuning, safety) and margin drops to 40-60%.

Model Routing: The Biggest Lever

Most organizations use one model for everything. Implementing model routing reduces costs 60-75%. Send simple Q&A to GPT-4o-mini (90% cheaper), reserve Opus for complex reasoning.


Calculate your AI unit economics →

Like this analysis?

Get the weekly engineering economics briefing - one email, every Monday.

Subscribe Free →

More in AI Economics

Related Canonical Concepts

AI Volatility Tax

The compounding gross margin penalty incurred when variable LLM inference query costs scale faster than subscription revenue, shifting server hosting into variable Cost of Goods Sold (COGS).

Read Concept →

The Product Economist

The executive discipline bridging engineering velocity, financial P&L contribution, and product margin strategy to prevent technical debt and AI COGS from destroying business valuation.

Read Concept →

The Subprime Code Crisis

The systemic financial risk created when high-velocity AI code generation produces massive volumes of un-audited, low-trust technical debt that inflates future maintenance liabilities.

Read Concept →

Vibe Coding Debt

The engineering debt accumulated when developers accept AI-generated code based on superficial execution ("vibes") without understanding underlying architectural assumptions or edge cases.

Read Concept →

Inference Economics

The financial discipline of managing, projecting, and optimizing the per query token costs associated with running large language models in production.

Read Concept →

Technical Insolvency

The critical threshold where the operational cost of maintaining a codebase and resolving technical debt exceeds the engineering capacity available for new feature development.

Read Concept →

The Innovation Tax

The compounding maintenance burden and operational friction incurred when new technology is deployed without decommissioning legacy systems, effectively taxing all future engineering velocity.

Read Concept →

Feature Bloat Calculus

The analytical framework for determining the precise point where the ongoing maintenance cost of a software feature exceeds its marginal revenue value, necessitating immediate deprecation.

Read Concept →

The AI Margin Squeeze

The systemic erosion of traditional SaaS gross margins caused by the integration of generative AI features, as variable compute and API costs scale linearly or exponentially with user engagement, fundamentally altering software unit economics.

Read Concept →

Zombie Code & The Sunset Protocol

Zombie Code refers to deprecated or unused features that continue to run in production, consuming maintenance budget, compute resources, and engineering focus. The Sunset Protocol is the structured mechanism for financial remediation through systematic deletion.

Read Concept →

DORA Metrics Financial Translation

The analytical process of converting standard engineering performance metrics (Deployment Frequency, Lead Time, MTTR, Change Failure Rate) into direct financial liabilities and capitalization impacts on the P&L statement.

Read Concept →

Canonical Frameworks

Cost of Predictivity

The Cost of Predictivity measures the variable cost of AI accuracy. Unlike traditional software with near-zero marginal costs, AI features have significant variable costs that scale with both usage AND accuracy requirements. As AI correctness increases, cost scales exponentially - not linearly. This is the fundamental economic challenge of AI products. Traditional software follows a simple cost model: high fixed development cost, near-zero marginal cost per user. Build the feature once, serve it to millions for pennies. AI products break this model entirely. Every AI query costs compute. Every inference requires GPU cycles. Every improvement in accuracy requires either more sophisticated prompts (more tokens = more cost), retrieval-augmented generation (vector DB queries + embedding generation), or fine-tuned models (massive training costs amortized over queries). The cost structure looks more like a manufacturing business than a software business. The exponential curve is the killer. Moving from 80% accuracy to 90% accuracy might cost 2x. Moving from 90% to 95% might cost 5x. Moving from 95% to 99% often costs 10-20x. This is because the easy cases are solved by the base model, and each additional percentage point of accuracy requires increasingly sophisticated (and expensive) techniques to handle edge cases. This creates what Richard Ewing calls the AI Margin Collapse Point: the usage volume at which AI feature costs exceed the revenue they generate. Many AI features that work beautifully in prototype (low volume, don't need high accuracy) become economically devastating in production (high volume, users demand high accuracy). The AI Unit Economics Benchmark (AUEB) calculator at richardewing.io/tools/aueb helps companies calculate their Cost of Predictivity and identify their specific margin collapse point before it hits their P&L.

Read Definition →

Feature Bloat Calculus

Feature Bloat Calculus is the economic formula for determining when a feature's maintenance cost exceeds its value contribution. It quantifies the hidden tax of feature accumulation - the compounding cost that makes every new feature harder and more expensive to build. The formula considers three cost components: 1. **Direct Maintenance Cost**: The engineering hours spent maintaining the feature (bug fixes, compatibility updates, dependency management, test maintenance). This is typically 2-5% of original development cost per quarter. 2. **Opportunity Cost**: What else could those maintenance engineers be building? If 3 engineers spend 20% of their time maintaining a low-value feature, that's 0.6 FTE that could be building high-value new capabilities. 3. **Complexity Tax**: This is the compounding factor that most organizations miss entirely. Every feature in the codebase makes every other feature harder to maintain and every new feature harder to build. Adding feature #101 to a system doesn't just add feature #101's maintenance cost - it increases the maintenance cost of features #1-100. The Complexity Tax follows a roughly quadratic curve. A system with 50 features has approximately 1,225 potential interaction points (n × (n-1) / 2). A system with 100 features has 4,950 potential interaction points. Doubling features doesn't double complexity - it quadruples it. Feature Bloat Calculus quantifies this by comparing a feature's total cost (direct + opportunity + complexity) against its value contribution (revenue attribution, user engagement, strategic importance). When total cost exceeds value, the feature has "negative carry" - it's costing more to keep than it's worth. Features with negative carry should be evaluated through the Kill Switch Protocol for potential deprecation. The highest-negative-carry features should be killed first, as they free up the most capacity per removal.

Read Definition →
📊

Richard Ewing

The AI Economist - Quantifying engineering economics for technology leaders, PE firms, and boards.

Want to apply this to your organization?

Run a free diagnostic first. If the numbers concern you, book a session to build a remediation plan.

Richard Ewing - AI Economist & Capital Auditor