DuckyTools
Home AI & Writing LLM Cost Calculator

LLM Cost Calculator AI & Writing

Work out what an API workload costs per call, per day and per month, at your own prices.

LLM Cost Calculator is a free online tool that work out what an API workload costs per call, per day and per month, at your own prices. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.

Price
Free — no account, no quota, no watermark
Category
AI & Writing
Where it runs
In your browser, on your device
Files uploaded
None
Technology
plain JavaScript
Settings
8
Works offline
Yes, after the first visit

About LLM Cost Calculator

Three things dominate an API bill, and only one of them is obvious. Output tokens usually cost three to five times what input tokens cost, so a verbose answer is far more expensive than a verbose prompt. Prompt caching, where it is available, discounts repeated input by up to 90% — which changes the economics of a long system prompt completely. And the per-call figure is almost never the interesting one: it is the daily multiplier that turns a fraction of a cent into a budget.

How to use it

  1. Enter starting point, input price per 1m tokens and output price per 1m tokens.
  2. Adjust the remaining 5 settings if the defaults do not fit your case.

The 8 settings

SettingWhat it doesDefault
Starting pointChoose from 5: Custom — enter your own, Frontier tier (indicative), Mid tier (indicative), Small/fast tier (indicative), Cheapest tier (indicative).Mid tier (indicative)
Input price per 1M tokensRange 0–1000.3
Output price per 1M tokensRange 0–1000.15
Input tokens per callRange 0–2000000.2000
Output tokens per callRange 0–2000000.500
Calls per dayRange 0–100000000.1000
Share of input served from cacheRange 0–100%.0%
Cached input discountRange 0–100%.90%

Under the hood

Runs onplain JavaScript — runs the whole thing
ControlsStarting point, Input price per 1M tokens, Output price per 1M tokens, Input tokens per call, Output tokens per call, Calls per day, Share of input served from cache, Cached input discount

Questions

Why are the prices editable rather than fixed?

Because a hard-coded price table is wrong within months and confidently wrong is worse than empty. The presets are labeled indicative and exist to get you in the right order of magnitude; paste in your provider's current per-million rates and the arithmetic is right regardless of who changes pricing next.

What is prompt caching worth?

A great deal, if your workload repeats a long system prompt or document across many calls. Discounts of 50–90% on the cached portion are typical. The calculator lets you set both the share cached and the discount, because both vary by provider and neither is automatic.

How do I cut cost without cutting quality?

Shorten the output first — it is the expensive side. Ask for structured JSON rather than prose with an explanation. Cache anything that repeats. And check whether a smaller model does the job: the price gap between tiers is often 20x or more for tasks like classification where the frontier model is wasted.

Does this include anything besides tokens?

No. Fine-tuning, embeddings, image inputs, batch discounts and rate-limit tiers all have their own pricing. This covers the standard input-and-output token cost that makes up most of a typical bill.