Skip to main content
aibizhub
Hand-written methodology As of 2026-04-24

How AI Stack Cost Calculator works

What the tool assumes, what data it pulls from, and what it cannot tell you.

Education · General business information, not legal, tax, or financial advice. Editorial standards Sponsor disclosure Corrections

1. Scope

The AI Stack Cost Calculator estimates the fully-loaded monthly infrastructure cost of an AI-powered application at four user scales (100, 1K, 10K, 100K). It prices six categories — hosting, database, auth, AI inference, email, monitoring — plus domain and any custom line items. It does not model negotiated enterprise rates, committed-use discounts, prompt caching, or usage-spike smoothing. It is a snapshot, not a live pricing feed.

2. Inputs and outputs

Inputs: hosting provider, database, auth, AI model (with average input/output tokens and API calls per user per day), email, monitoring, annual domain cost, and any custom monthly line items. Outputs: per-user monthly cost and total monthly cost at each of four user scales, plus the dominant-cost-driver insight at the 10K tier.

Engine source: src/lib/ai-stack-cost-calculator/engine.ts. Catalogs for provider tiers (HOSTING_OPTIONS, DATABASE_OPTIONS, AUTH_OPTIONS, AI_MODEL_OPTIONS, EMAIL_OPTIONS, MONITORING_OPTIONS) live in the same file and carry the as-of-date on each refresh.

3. Formula / scoring logic

# AI inference cost (the usual dominant driver)
calls_per_month = api_calls_per_user_per_day * users * 30
input_cost      = avg_input_tokens  * input_price_per_million  / 1_000_000
output_cost     = avg_output_tokens * output_price_per_million / 1_000_000
ai_monthly      = (input_cost + output_cost) * calls_per_month

# Usage-scaled hosting
hosting_monthly = base_cost + max(0, users - included_users) * per_user_cost

# Auth: MAU-scaled above the free threshold
auth_monthly    = base_cost + max(0, users - free_threshold) * per_mau_cost

total = hosting + database + auth + ai_monthly + email + monitoring + domain/12 + other

4. Assumptions

  • 8 API calls per user per day is the default. This reflects a typical chat-style product with 1–3 sessions per day and some background calls. Heavy agentic products (10× higher) and notification-only products (10× lower) require overriding this input.
  • Token counts are user-entered point estimates. There is no internal distribution; a product whose prompt size varies widely across calls should enter a usage-weighted average.
  • Pricing is list-price only. Anthropic, OpenAI, and Google publish enterprise and committed-use discounts that can cut inference cost 20–50%. The tool does not apply these.
  • Scale tiers are linear — no step-function jumps for dedicated instances, reserved capacity, or on-prem deployment.
  • Auth is MAU-priced above the free threshold. Clerk Free covers 10K MAU; Auth0 Free covers 7.5K MAU; Supabase Auth is included in the database plan.
  • Hosting cost scales with users for usage-based providers (Railway, Fly.io) and is flat for plan-based providers (Vercel, Render, DigitalOcean).

5. Data sources

All pricing is sourced from vendor pricing pages, dated 2026-04-24:

6. Known limitations

  • Stale pricing. The tool carries an AS_OF_DATE constant. When the date is more than 90 days old, the tool surfaces a refresh warning — this is the primary failure mode for an API-pricing tool in a fast-moving market.
  • No negotiated-rate modelling. Anthropic Scale, OpenAI Enterprise, and committed-use discounts on hyperscalers can cut inference cost 20–50%. The tool takes list prices at face value; users on enterprise plans should override with their negotiated rates.
  • No prompt-caching or context-window-reuse modelling. For products that reuse a large system prompt across many calls, Anthropic's prompt caching can cut input tokens by 80%+. Reflect this manually by reducing the avgInputTokens figure.
  • No usage-spike smoothing. The tool assumes steady-state per-user usage at each scale. Viral growth spikes, cron-triggered batch workloads, and regional bursts will produce bills the tool does not anticipate.
  • Per-user hosting cost is approximate. Vercel Pro is flat $20/mo up to bandwidth and function-execution quotas — the tool does not model those secondary caps.
  • No cost for dev-time services (CI/CD, feature flags, analytics vendors). Add these as custom line items if they are non-trivial.

7. Reproducibility

Input
10,000 MAU; 8 API calls/user/day; Claude Sonnet 4.6 list (input $3/M, output $15/M); 400 input tokens and 200 output tokens per call; Vercel Pro; Supabase Pro; Clerk Free; Resend Pro; Sentry Free; domain $12/year; no custom line items.

Expected output (as of 2026-04-24)
AI inference ≈ $1,440/mo (2.4M calls × ($0.0012 + $0.003)). Hosting $20, database $25, auth $0 (under free threshold), email ≈ $20, monitoring $0, domain $1/mo. Total ≈ $1,506/mo, roughly $0.15 per user. Dominant driver: AI inference at ~96% of total at the 10K tier.

8. Change log

  • 2026-04-24methodology page first published. Pricing snapshot 2026-04-24 across Anthropic, OpenAI, Google, Vercel, Supabase, Clerk, Resend, PlanetScale, Neon, Fly.io.

Worked example

Run live against the same engine this site ships (/engines/ai-stack-cost-calculator.js). The inputs and outputs below are recomputed on every build and independently re-verified in CI — they are never hand-authored.

Input

tool
ai_stack_cost_calculator
hosting_index
1
hosting_custom_cost
0
database_index
1
database_custom_cost
0
auth_index
0
auth_custom_cost
0
ai_model_index
0
ai_custom_input_cost
0
ai_custom_output_cost
0
avg_input_tokens
500
avg_output_tokens
1000
api_calls_per_user_per_day
5
email_index
0
email_custom_cost
0
monitoring_index
0
monitoring_custom_cost
0
domain_cost_yearly
15
other_monthly_costs
0

Output

tiers[0].users
100
tiers[0].hosting
20
tiers[0].database
25
tiers[0].auth
0
tiers[0].aiApi
487.5
tiers[0].email
0
tiers[0].monitoring
0
tiers[0].domain
1.25
tiers[0].other
0
tiers[0].total
533.75
tiers[0].costPerUser
5.34
tiers[1].users
1000
tiers[1].hosting
20
tiers[1].database
25
tiers[1].auth
0
tiers[1].aiApi
4875
tiers[1].email
0
tiers[1].monitoring
0
tiers[1].domain
1.25
tiers[1].other
0
tiers[1].total
4921.25
tiers[1].costPerUser
4.92
tiers[2].users
10000
tiers[2].hosting
20
tiers[2].database
25
tiers[2].auth
0
tiers[2].aiApi
48750
tiers[2].email
0
tiers[2].monitoring
0
tiers[2].domain
1.25
tiers[2].other
0
tiers[2].total
48796.25
tiers[2].costPerUser
4.88
tiers[3].users
100000
tiers[3].hosting
20
tiers[3].database
25
tiers[3].auth
1800
tiers[3].aiApi
487500
tiers[3].email
0
tiers[3].monitoring
0
tiers[3].domain
1.25
tiers[3].other
0
tiers[3].total
489346.25
tiers[3].costPerUser
4.89
dominantDriver
AI API
dominantDriverPercent
99.91
insight
AI API is 99.91% of your costs at 10K users. Consider caching responses, using a cheaper model for common queries, or batching requests.

Frequently asked questions

What does the AI Stack Cost Calculator estimate?
It estimates the fully-loaded monthly infrastructure cost of an AI-powered application at four user scales (100, 1K, 10K, 100K), pricing six categories — hosting, database, auth, AI inference, email, monitoring — plus domain and any custom line items. It does not model negotiated enterprise rates, committed-use discounts, prompt caching, or usage-spike smoothing.
Is the pricing live or a snapshot?
It is a snapshot, not a live pricing feed. The tool carries an AS_OF_DATE constant and surfaces a refresh warning when that date is more than 90 days old.
What does a worked example look like?
At 10,000 MAU, 8 API calls/user/day, Claude Sonnet list pricing (input $3/M, output $15/M), 400 input and 200 output tokens per call, Vercel Pro, Supabase Pro, Clerk Free, Resend Pro, Sentry Free, $12/year domain, no custom line items: AI inference ≈ $1,440/mo, total ≈ $1,506/mo (~$0.15 per user), with AI inference the dominant driver at ~96% of total.
Business planning estimates — not legal, tax, or accounting advice.