How We Calculate Every Number
Full documentation of the formulas, assumptions, and data sources behind every LLM Economics calculator.
AI Cost Formula (Token-Based Models)
All AI cost calculators use the following formula per API request:
fresh_input = input_tokens × (1 − cache_hit_ratio)
cached_input = input_tokens × cache_hit_ratio
cost_per_request = (fresh_input ÷ 1,000,000 × input_price)
+ (cached_input ÷ 1,000,000 × cached_input_price)
+ (output_tokens ÷ 1,000,000 × output_price)
if batch: cost_per_request × (1 − batch_discount)
monthly_cost = cost_per_request × monthly_requests
Cache hit ratio represents the fraction of input tokens served from prompt cache (e.g. a shared system prompt). Cached tokens bill at approximately 10× less than fresh tokens depending on the provider.
Batch discount applies when using async Batch API endpoints. Currently 50% across all supported providers.
AI Agent Infrastructure Formula
Monthly infrastructure cost is decomposed into four components:
- LLM inference = (DAU × requests/day × days/month × tokens/request ÷ 1M) × model_price_per_MTok
- Tool calls = DAU × requests/day × days/month × tool_calls/request × cost_per_call
- Vector queries = DAU × requests/day × days/month × queries/request ÷ 1000 × cost_per_1k
- Memory storage = DAU × memory_tokens/user × bytes/token ÷ 1GB × storage_cost_per_GB
Unit costs for tool calls, vector queries, and storage are estimates based on typical cloud pricing. Verify against your actual provider bills before using in financial projections.
Creator Revenue Formula (YouTube / AdSense)
Revenue estimates are based on effective RPM (Revenue Per 1,000 views), adjusted for niche and country:
effective_rpm = niche_rpm × country_multiplier
monthly_revenue = (monthly_views ÷ 1000) × effective_rpm
after_tax = monthly_revenue × (1 − tax_rate)
RPM values are estimates sourced from creator economy studies (vidIQ, TubeBuddy industry reports). Actual RPM varies significantly based on audience geography, advertiser demand, and content category. Always verify against your actual YouTube Studio or AdSense dashboard.
SaaS Metrics Formulas
ARR = MRR × 12
LTV = ARPU ÷ monthly_churn_rate
LTV:CAC ratio = LTV ÷ CAC
CAC payback = CAC ÷ (ARPU × gross_margin)
SEO ROI = ((seo_traffic × conversion_rate × deal_size) − seo_cost) ÷ seo_cost × 100
Benchmark values (healthy LTV:CAC > 3×, payback < 12 months, Rule of 40 ≥ 40) are sourced from ChartMogul SaaS Benchmarks, Bessemer Cloud Index, and David Skok's SaaS Metrics framework.
Pricing Data Update Policy
All pricing data is stored in versioned JSON configuration files. Each file includes ameta.versionand meta.updatedAtfield. When a provider changes their pricing, we update the JSON, bump the version, and display the new date in the calculator footer.
We aim to update AI model pricing within 48 hours of official provider announcements. Creator and SaaS benchmark data is reviewed quarterly.
Benchmark Percentiles
Where benchmarks are shown, the percentile is calculated relative to the industry average value using a simplified distribution:
percentile = clamp(50 − ((value − avg) ÷ avg) × 50, 1, 99)
This is an approximation. It does not represent a true statistical distribution and should be interpreted as a directional signal, not a precise ranking.
Currency and Rounding
All costs are denominated in USD. Token prices are expressed per million tokens ($/MTok) to match provider billing conventions. Displayed values are rounded to 2 significant digits for readability; internal calculations use full floating-point precision.