← All Tools

💸 Prompt Cost Calculator

Estimate LLM API costs from input tokens, output tokens, model pricing, request-volume scenarios, and daily or monthly usage.

Use your provider's current pricing for exact numbers. This calculator is deterministic and does not call any LLM API. Presets are examples; custom pricing is the safest choice for real budget planning.

Runs in your browser

Cost math runs locally in your browser. Shared links capture pricing/settings; no provider API is called.

What this tool does

Prompt Cost Calculator estimates LLM input, output, per-request, daily, one-time, and monthly cost from token counts and model pricing.

Why it is useful

It helps AI builders budget prompts, compare models, size batches, and avoid surprise spend before running agents, evals, or data pipelines.

How it works

The browser multiplies input and output tokens by per-million-token prices, then normalizes request volume as a one-time, daily, or monthly scenario.

Best input

Use provider-listed current pricing and realistic output-token estimates. Add retries, tool-call turns, and reasoning output separately when they matter.

Budget tip

Large monthly estimates usually improve with caching, smaller outputs, cheaper routing models, or batch API discounts.

Privacy note

Cost calculation runs locally in your browser.

Important limitation

Model prices change and providers may bill cached, reasoning, audio, image, or batch tokens differently.

Quick answers

Is pricing always current?

No. Presets are examples. Verify against the provider before making budget commitments.

Why estimate output tokens?

Output length can dominate cost for summaries, coding, and report generation.

Common Use Cases

Estimate an eval run

Combine input tokens, expected output length, and case count before launching a model evaluation batch.

Compare routing choices

Swap in budget, mid-tier, premium, or custom pricing to see how model selection changes daily and monthly spend.

Plan agent traffic costs

Project recurring request volume for support bots, coding agents, or report pipelines before turning them on for users.

API examples

Call the same deterministic core through Utilito’s compact API router. Send only data you intentionally submit to the server-side endpoint.

Try in API playground →Schema →
Estimate prompt cost with curl
curl
curl -X POST https://utilito.dev/api/run \
  -H "Content-Type: application/json" \
  -d '{"tool_id":"prompt-cost-calculator","input":{"inputTokens":3000,"outputTokens":800,"requests":1000,"preset":"budget","scenario":"daily"}}'
Estimate prompt cost from JavaScript
javascript
const res = await fetch('https://utilito.dev/api/run', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    tool_id: 'prompt-cost-calculator',
    input: { inputTokens: 3000, outputTokens: 800, requests: 1000, preset: 'budget', scenario: 'daily' }
  })
});
const data = await res.json();
console.log(data.result.output || data.result.report);
Estimate prompt cost from Python
python
import requests
payload = {
    "tool_id": "prompt-cost-calculator",
    "input": {"inputTokens": 3000, "outputTokens": 800, "requests": 1000, "preset": "budget", "scenario": "daily"},
}
result = requests.post("https://utilito.dev/api/run", json=payload).json()["result"]
print(result.get("output") or result.get("report"))

LLM Token Toolkit workflow

Move from prompt counting to cost estimation, context-window budgeting, and log trimming before spending LLM tokens.

🧮Token Counter🪟Context Window Calculator🧹Log Context Trimmer{}JSON Formatter🔐Base64 Encode / Decode🔗URL Encoder / Decoder
View all in Code →