DevTools Logo

LLM Cost & Budget Forecaster

LLM Cost & Budget Forecaster

Forecast daily and monthly LLM spend from traffic, with separate input, cached input and output prices.

Runs in your browser
Price snapshot 2026-10-05 · USD per 1M tokens · 30-day month
Try an example

Scenario

3 models
Models to compare

Assumptions: every request has the same size, the month has 30 days, and list prices apply. Streaming changes latency, not token price. Batch discounts, taxes and committed-use deals are not included.

Cost by model

3 models

Input tokens per day

1,200,000

Cached input tokens per day

360,000

Output tokens per day

400,000

Model cost comparison
ModelInput / dayCached / dayOutput / dayTotal / dayTotal / month
GPT-5.6 Terra$2.10$0.0900$6.00$8.19$245.70
Claude Sonnet 5$1.68$0.0720$4.00$5.75$172.56
Gemini 3.6 Flash$1.26$0.0540$3.00$4.31$129.42

Money is computed with exact decimals and rounded only for display. Prices: GPT-5.6 Terra $2.5 in / $15 out; Claude Sonnet 5 $2 in / $10 out; Gemini 3.6 Flash $1.5 in / $7.5 out.

Compare common models using daily request volume, input/output tokens, and cache hit rate, then check the result against a monthly budget. Streaming does not change the cost; prices are a static snapshot from 2025-02-14.

    Examples

    Per-million pricing

    Input
    forecastLlmCosts({ dailyRequests: 1000, averageInputTokens: 1000, averageOutputTokens: 500, cacheHitPercent: 0 }, [gpt-4o-mini])
    Output
    { dailyInputCost: 0.15, dailyOutputCost: 0.30, monthlyCost: 13.5 }

    1M input tokens at $0.15/M plus 0.5M output tokens at $0.60/M, times 30 days.

    Cached input discount

    Input
    forecastLlmCosts({ dailyRequests: 1, averageInputTokens: 1000000, averageOutputTokens: 0, cacheHitPercent: 50, cacheDiscountPercent: 90 }, [gpt-4o-mini])
    Output
    { dailyInputCost: 0.0825 }

    Half the tokens bill at 10% weight: (0.5M + 0.05M) / 1M × $0.15.

    About this tool

    LLM Cost Budget Forecaster prices daily traffic with forecastLlmCosts(input, selectedModels): daily input/output tokens come from dailyRequests times average tokens, input cost is (uncached + discounted cached tokens) / 1e6 times inputPerMillion, output cost is tokens / 1e6 times outputPerMillion, and monthly cost multiplies daily by 30.

    Prompt caching only discounts input: cacheHitPercent selects the cached share and cacheDiscountPercent (default 90) shrinks its billed weight, while budgetMonthly flags budgetExceeded per model whenever its monthly total crosses the budget.

    Pricing is a static snapshot (PRICE_SNAPSHOT_DATE 2025-02-14) over five models — GPT-4o mini, GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, DeepSeek V3 — and buildCostForecastCsv exports every modeled row with per-day and per-month totals.

    How to use this tool

    1. Describe traffic

      Enter daily requests, average input/output tokens, and cache hit percent (discount defaults to 90%).

    2. Set a budget

      Add budgetMonthly to get a per-model budgetExceeded flag on monthly totals.

    3. Export the table

      Call buildCostForecastCsv on the result for quoted CSV rows covering all selected models.

    Use cases

    Choosing between models

    Compare monthly totals across the five snapshot models for the same traffic shape.

    Justifying prompt caching

    Raise cacheHitPercent to quantify how cached prefixes shrink the input bill.

    Setting spend alerts

    Pair budgetMonthly with the CSV export to review which models breach the cap.

    Common mistakes

    Mistake:Expecting the cache discount to lower output cost.

    Fix:Caching only reweights cached input tokens — output tokens always bill at full price.

    Mistake:Treating snapshot prices as live quotes.

    Fix:MODEL_PRICING is frozen at PRICE_SNAPSHOT_DATE; re-check provider pricing before signing budgets.

    Frequently asked questions

    What does this tool do?

    It forecasts spend with forecastLlmCosts from daily requests, average input/output tokens, cache hit and discount percents, and an optional monthly budget, across a five-model static price snapshot.

    How is caching and monthly cost computed?

    Cached input tokens bill at (1 − discount) weight with output always full price, and monthly cost is daily cost times 30 — budgetExceeded flags any model above budgetMonthly.

    Is my usage data uploaded or stored?

    No. Token math and CSV building run entirely in your browser.

    Why does the CSV list every model, or prices look stale?

    buildCostForecastCsv exports one row per selected model by default, and MODEL_PRICING is frozen at PRICE_SNAPSHOT_DATE (2025-02-14) — re-check provider pages for live quotes.

    References & standards