LLM cost-to-revenue ratio calculator
One number tells you whether your AI feature is a margin problem: the share of revenue it consumes. Enter your monthly LLM spend, revenue, and total COGS, and this tool returns the cost-to-revenue ratio, the cost-to-COGS share, and — with the target slider — the exact spend reduction needed to hit your goal.
How it works
cost_to_revenue = llm_spend / revenue
cost_to_cogs = llm_spend / total_COGS
target_spend = revenue x target_ratio
reduction = current_spend - target_spend
The revenue ratio is the headline metric investors and finance teams watch. The COGS ratio reveals how much of your delivery cost is inference — if LLM spend is 60% of COGS, model optimization is your single biggest margin lever. The target slider converts a goal into an action: a dollar amount of spend you must remove through cheaper models, caching, shorter outputs, or smarter routing.
What the two ratios tell you
Cost-to-revenue tells you the margin impact: how many cents of every dollar of revenue go straight to your AI provider. This is what investors examine when evaluating AI-native businesses, and it is the ratio most analogous to food cost percentage in a restaurant — it determines whether scale helps or hurts you.
Cost-to-COGS tells you the leverage point: if inference is 80% of your cost of goods sold, optimizing inference is far higher leverage than optimizing any other delivery cost. If it is 10%, infrastructure or headcount may be bigger targets.
What drives the ratio up
- Inefficient prompts that are longer than they need to be, paid on every call
- Using a frontier model for tasks a smaller model handles equally well
- Generating long completions when short ones would suffice
- No prompt caching on stable system prompts
What drives it down
- Routing simple requests to cheaper models (model tiering)
- Prompt caching for repeated prefixes (available on several major providers)
- Constraining output length with
max_tokensor explicit instructions - Raising the product price — pricing power often improves the ratio faster than technical optimization
Benchmarks and guidance
- Under 10% of revenue is a reasonable target for AI-native products; 5% or less is comfortable
- Above 20% is a warning sign — revisit model choice, caching strategy, and output length
- Raise price before cutting quality — if the feature drives genuine value, pricing power often fixes the ratio faster than micro-optimizing prompts
Using the target slider
The target slider converts your goal into an actionable dollar reduction rather than an abstract percentage. Set it to your target ratio and the tool shows exactly how many dollars per month you need to remove from LLM spend. This makes the next step concrete: you can assess whether the required reduction is achievable through caching and model changes, or whether the pricing side of the equation needs to move.