LLM Pricing Calculator — Token Cost Estimator

Estimate per-call USD costs from input and output token counts. Paste a prompt to derive input tokens live, or enter counts from logs. Batch API, prompt caching, and monthly projections are included, all in your browser.

…
Browser-local LLM cost estimates
Turn token counts into USD per-call estimates using our maintained per-model price table. No live scraping, no provider billing APIs.

How pricing works

Rates come from a manually maintained table in llm-models.json, reviewed at least monthly. The verified date on this page reflects the last review, not your invoice. Per-million input and output rates are applied locally: (tokens / 1,000,000) × $/1M. This tool is an indicative planner, not a billing authority. For disputes, use your provider dashboard.

Token inputs

Use the number fields when you already have counts from logs or our LLM token counter. Optionally paste a prompt in Monaco. Input tokens are derived via the same countTokensAsync path as the token counter (Exact for OpenAI encodings, Estimate for Claude/Gemini). Output tokens are not auto-derived in v1. Set them manually when you expect completion tokens.

Batch API & prompt caching

Batch API (−50 %) applies a flat 50 % discount on the subtotal, a simplified v1 stand-in for provider batch pricing tiers. Cached input bills the cached slice at 10 % of the input rate (90 % savings on that portion). Enter how many input tokens you expect to be served from prompt cache on repeat calls.

Privacy

All math runs in your browser. FastMinify does not call provider pricing APIs, scrape live tariffs, or upload your prompts. Token derivation uses the same local tokenizer/heuristic stack as the token counter.

Limitations

USD only in v1. Rates change without notice on provider sites, so verify before large spend. Derived input counts on Estimate-tier models are heuristic (±5–15 %). Embeddings, images, and tool-call token rules are out of scope.

Related tools

Count tokens with the LLM token counter, check context fit with the context window calculator, or format message JSON with the JSON formatter.

Options that change the estimate

Model
Switches per-million input and output rates from the registry table. Models without input pricing show unavailable in compare view.
Input format
When deriving input tokens from pasted text: Auto-detect treats valid [{role, content}] arrays as Chat API messages with per-message overhead.
Batch API (−50 %)
Applies a flat 50 % discount on the subtotal (input + output USD before discount). Simplified v1 model of provider batch pricing.
Custom rates
Ignore the model table and use your own $/1M input and output rates. Useful for enterprise deals or private endpoints.
Compare all models
Lists every registry model with Fresh, Cached, Output, and Total USD columns for the same token counts. Copy the table with token fields and per-model costs. Batch and custom options apply uniformly. Select a row to choose that model.

FAQ

Pricing estimates, accuracy, and assumptions

Will this match my invoice exactly?

Usually not down to the cent. We apply published list rates from our table; your account may have discounts, cached-token billing nuances, or regional pricing. Use this for planning, and reconcile spend on the provider dashboard.

Who qualifies for Batch API pricing?

Providers offer batch endpoints with delayed processing and lower per-token rates. The −50 % toggle models a simplified flat discount on the subtotal. Confirm eligibility and actual batch tariffs on the provider site before relying on it for budgets.

How is prompt caching modeled?

Enter cached input tokens separately. That slice is billed at 10 % of the input rate (90 % savings versus input that is not cached). Real cache hit rates depend on your application, so this is a what-if lever, not a guarantee of cache behavior.

How is the monthly projection calculated?

When calls per day is greater than zero: daily USD = total per call × calls per day; monthly USD = daily × 30. It is a straight 30-day extrapolation with no weekend or seasonality adjustment.

Can I compare models by cost?

Yes. Toggle Compare all models to see total USD for every registry model with the same token counts and options. Select a row to return to single-model view with that model selected.

Count tokens, estimate API costs, check context-window fit, convert JSON to TOON and analyze prompts, all in your browser.