LLM cost calculator
Estimate API cost from input and output tokens and per-million pricing.
Runs in this tab. The file stays here.
| Model | $/MTok in | $/MTok out | Per call | Total | |
|---|---|---|---|---|---|
| $0.04 | $0.04 | ||||
| $0.00210 | $0.00210 | ||||
| $0.03 | $0.03 | ||||
| $0.05 | $0.05 | ||||
| $0.01 | $0.01 | ||||
| $0.02 | $0.02 | ||||
| $0.00660 | $0.00660 |
Prices are example starting values and change often — edit them to match your provider's pricing page. Cached-input and batch discounts are not modeled.
This runs in your browser. Nothing is uploaded.
About LLM cost calculator
Work out what an LLM request costs from token counts and per-million-token prices, for several models at once. Calculated in your browser.
Enter the input tokens and the output tokens for one call, the number of calls you expect, and read the cost for every model in the table: the price per call and the total. The table starts with seven models and their input and output prices per million tokens. Every name and price is an editable field, so it's as easy to try a model that isn't listed as it is to correct one that is. Output tokens are priced separately because they are almost always the more expensive side.
The page does not count tokens for you. It takes the numbers you type, which means the quality of the answer depends on the quality of those numbers. If you don't know them, use the token counter on a sample prompt and a sample reply, then bring the figures here. A few short test requests give you a better average than a guess.
The prices are examples from when the page was written, and providers change them often, so check the provider's pricing page before you use a total in a budget. Cached-input discounts, batch discounts, tiered rates, and per-image or per-minute charges aren't modelled. If you want to include one, lower the price per million by hand. The result is a rough line-item estimate, not a bill.
How to use LLM cost calculator
- 1Enter input tokens, output tokens, and the number of calls.
- 2Check the price columns against the provider's pricing page and edit any that are out of date.
- 3Read the per-call and total cost for each model.
What it won't do
- No token counting; you supply the numbers.
- One input price and one output price per model; no caching, batch, or tiered rates.
- Prices are editable examples and are not saved between visits.
Common questions
Are the prices current?
Treat them as examples. They were right when the page was written, and they drift. Edit the price fields to match what the provider shows today.
Where do I get the token counts?
From your provider's usage numbers on a real request, or from the token counter on a sample of your prompt and an example reply. This page only does the multiplication.
Does it handle caching or batch discounts?
No. It uses one input price and one output price per model. If your account has cached-input or batch pricing, enter the effective price per million yourself.
Can I compare models that aren't in the list?
Yes. Add a model, give it a name and its two prices, and it joins the comparison. The row is gone when you close the tab, as nothing is saved.
Related tools
Why this one doesn't upload your file
There is no server to upload to. This page is a static file, and the work happens in your browser using the same graphics and WebAssembly code that renders every other site you visit. Your file is read from disk into memory, processed, and handed back as a download. Once the page has loaded you can disconnect from the network entirely and it keeps working. The longer explanation